Пример #1
0
	void Render()
	{
		clock_t CurTime = clock();
		int j = 0;

		ScreenClear();


		for (int i = startIndex; i < startIndex + printStr - 1; i++, j++)
		{
			ScreenPrint(15, j, IntroPrint[i]); // (15,j) 지점에 출력 // 수진언니 편집
		}

		if (upFlag == true)
		{
			if (CurTime - OldTime > PrintTime) // 문구 올라가는 시간 : 2초
			{
				if (startIndex >= printStr)
					upFlag = false;

				startIndex++;

				OldTime = CurTime;
			}
		}

		ScreenFlipping();
	}
Пример #2
0
	// 출력
	void Render()
	{
		char string[100] = { 0 };
		ScreenClear();
		int gLength, i;
		// 출력 시작

		if (p_GameState == RUNNING)
		{

			// 좌우에 벽을 만듬 (클리핑) 

			if (Player.X < 0)
				ScreenPrint(0, Player.MoveY, &strPlayer[Player.X * (-1)]);
			else if (Player.MoveX + (Length - Player.MoveX + Player.CenterX + 1) > 79)
			{
				strncat(string, strPlayer, Length - ((Player.MoveX + Player.CenterX + 1) - 79));
				ScreenPrint(Player.X, Player.Y, string);
			}
			else {
				ScreenPrint(Player.X, Player.Y, strPlayer);
			}

			ScreenPrint(Ball.bMoveX, Ball.bMoveY, "◎");
			sprintf(string, "주인공 이동좌표 : %d, %d              점 수 : %d/%d               초기화 : R 버튼 ", Player.MoveX, Player.Y, BallCount, p_GoalCount);
			ScreenPrint(0, 0, string);


			//골대 출력 

			ScreenPrint(Goal.gMoveX, Goal.gMoveY, "ㅁ");
			gLength = Goal.gLength * 2 + 1;

			for (i = 0; i < gLength; i++)
				ScreenPrint(Goal.gLineX[i], Goal.gMoveY, "ㅡ");

			ScreenPrint(Goal.gLineX[gLength - 1] + 2, Goal.gMoveY, "ㅁ");

			//세레머니 출력

			if (GoalIn == 1)
			{
				//ScreenClear();
				//GoalCere(10,5);
				ScreenPrint(50, 5, "** G O A L  I N **");
			}

		}
		// 상태 출력
		ScreenPrint(20, 10, StateString);

		//출력 끝


		ScreenFlipping();
	}
Пример #3
0
	void Render()
	{
		ScreenClear();

		char InBoxNum[5];
		char temp[5];

		/*
		if (GameStatus == START)
		{
			ScreenPrint(10, 2, startPrint);
		}
		*/
		StatusPrint(); // GameStatus에 따른 문구 출력 

		if (GameStatus == RUNNING || GameStatus == FINISH)
		{
			sprintf(guidePrint, "숫자 세 개를 입력하세요. 남은 목숨 : %d \n", Player.life);
			ScreenPrint(10, 5, guidePrint);

			// 입력한 수 출력
			for (int i = 0; i < 3; i++)
			{
				if (InBox[i].num != -1) // 숫자가 있는 것만 출력
				{
					sprintf(InBoxNum, "%d", InBox[i].num);
					ScreenPrint(InBox[i].X, InBox[i].Y, InBoxNum);
				}
			}
			/*
			// 테스트용 정답 출력
			sprintf(temp, "%d", Computer.x);
			ScreenPrint(10, 13, temp);
			sprintf(temp, "%d", Computer.y);
			ScreenPrint(10, 16, temp);
			sprintf(temp, "%d", Computer.z);
			ScreenPrint(10, 19, temp); 
			*/
			ScreenPrint(10, 10, gueAftPrint); // 추측 후 메시지 출력
		}

		ScreenFlipping();
	}
Пример #4
0
void Draw()
{
	int i;
	ScreenClear();
	SetColor(11, 0);

	DrawUI();
	SetColor(9, 0);
	ScreenPrint(g_nCharXPos, g_nCharYPos, "!!");
	SetColor(12, 0);
	for (i = 0; i < 3; i++){
		ScreenPrint(g_nEnemyXPos[i], g_nEnemyYPos[i], "00");
	}
	SetColor(14, 0);
	ScreenPrint(g_nCoinXPos, g_nCoinYPos, "$");
	for (i = 0; i < 5; i++){
		if (g_nBulletFalg[i] == TRUE)
		{
			SetColor(14, 0);
			ScreenPrint(g_nBulletXPos[i], g_nBulletYPos[i], "||");
		}
	}
	if (g_nItemKeyFlag == TRUE){
		SetColor(13, 0);
		ScreenPrint(g_nItemXPos, g_nItemYPos, "+");
	}

	sprintf(strTemp, "%d", g_nLife);
	sprintf(strTemp2, "%d", g_nTimeElapsed);
	sprintf(strTemp3, "%d", g_nKills);

	SetColor(15, 0);
	ScreenPrint(0, 22, "Life: ");
	ScreenPrint(6, 22, strTemp);
	ScreenPrint(0, 24, "Score: ");
	ScreenPrint(7, 24, strTemp2);
	ScreenPrint(0, 23, "Kills: ");
	ScreenPrint(7, 23, strTemp3);

	ScreenFlipping();
}
void Render()
{
	char string[100] = {0};
	ScreenClear();
	int gLength, i;
	// 출력 시작
	
	// 좌우에 벽을 만듬 (클리핑) 
	
	if(Player.X < 0) 
		ScreenPrint(0, Player.MoveY, &strPlayer[Player.X * (-1)]);
	else if(Player.MoveX + (Length - Player.MoveX + Player.CenterX + 1) > 79)
	{
		strncat_s(string, strPlayer, Length - ((Player.MoveX + Player.CenterX + 1) - 79));	
	 	ScreenPrint(Player.X, Player.Y, string);
	 }else{
		ScreenPrint(Player.X, Player.Y, strPlayer);
	}
	
	ScreenPrint(Ball.bMoveX, Ball.bMoveY, "○");
	sprintf_s(string, "주인공 이동좌표 : %d, %d", Player.MoveX, Player.Y);
	ScreenPrint(0, 0, string);
	
	
	//골대 출력 
	
	ScreenPrint(Goal.gMoveX, Goal.gMoveY, "ㅁ");
	gLength = Goal.gLength * 2 + 1;
	
	for(i = 0; i < gLength; i++)
		ScreenPrint(Goal.gLineX[i], Goal.gMoveY, "ㅡ");
		
	ScreenPrint(Goal.gLineX[gLength - 1] + 2, Goal.gMoveY, "ㅁ");
	
	//출력 끝
    		
	
	ScreenFlipping(); 
 }
Пример #6
0
void Render()
{
	ScreenClear();

	char TheTopBar[81];
		
	StatusPrint(); // 상태별 화면 출력

	// 게임 화면
	if (GameStatus == RUNNING)
	{
		// 상단바 출력
		sprintf(TheTopBar, "현 스테이지 : %d | Life : %d  \t\t    [Map%d]", Stage.level + 1, Player.Life, MapIndex);
		ScreenPrint(17, 2, TheTopBar);

		// Board 출력
		// 각모서리
		ScreenPrint(Board.leftX, Board.topY, "┌"); // 좌측 상단
		ScreenPrint(Board.rightX, Board.topY, "┐"); // 우측 상단
		ScreenPrint(Board.leftX, Board.bottomY, "└"); // 좌측 하단
		ScreenPrint(Board.rightX, Board.bottomY, "┘"); // 우측 하단

													   // 위아래벽
		for (int i = Board.leftX + 2; i < Board.rightX; i++)
		{
			ScreenPrint(i, Board.topY, "-");
			ScreenPrint(i, Board.bottomY, "-");
		}
		// 좌우벽
		for (int i = Board.topY + 1; i < Board.bottomY; i++)
		{
			ScreenPrint(Board.leftX, i, "│");
			ScreenPrint(Board.rightX, i, "│");
		}

		// Goal 출력
		if (Goal.IsEnable)
		{
			ScreenPrint(Goal.X, Goal.Y, "G");
		}

		// Player 출력
		ScreenPrint(Player.X, Player.Y, "-●-");

		// Block 출력
		for (int i = 0; i < MaxBlockCount; i++)
		{
			if (Block[i].X == 0 && Block[i].Y == 0) continue; // 좌표가 주어지지 않은 Block 표시 X
			ScreenPrint(Block[i].X, Block[i].Y, "■");
		}

		// Portal 출력
		for (int i = 0; i < 4; i++)
		{
			if (Portal[i].IsEnable == false) // 유효하지 않은 포탈이면
				continue;

			ScreenPrint(Portal[i].X, Portal[i].Y, "★");
		}
	}
	ScreenFlipping();
}
void Render()
{
	char string[100];
	
	char MoveLine[] = { "===============================================================================" }; // 행동범위 제한

	ScreenClear();

	// 렌더링

	StatusPrint();

	if (GameStatus == RUNNING || GameStatus == STOP || GameStatus == GO)
	{
		sprintf(string, "\tLife : %d        Star : %d (총 %d 점 )          게임 종료 : Q 버튼\n", Player.Life, Star.Catch, Star.SumCatch);
		ScreenPrint(0, 0, string);
		ScreenPrint(0, 1, MoveLine);

		// 1, 2 스테이지에서 MoveLine

		if (Stage != 2)
		{
			ScreenPrint(0, Player.Y - 1, MoveLine); 
			ScreenPrint(0, Player.Y + 1, MoveLine); 
		}

		ScreenPrint(Player.X, Player.Y, Player_Shape); // 플레이어 표시

		// Dot 표시

		switch (Stage)
		{
		case 2:
			for (int i = DotNum * 2; i < DotNum * 3; i++) // →
			{
				ScreenPrint(Dot[i].X, Dot[i].Y, Dot_Shape[2]); // 점 표시
			}
			for (int i = DotNum * 3; i < DotNum * 4; i++) // ←
			{
				ScreenPrint(Dot[i].X, Dot[i].Y, Dot_Shape[3]); // 점 표시
			}

		case 1:
			for (int i = DotNum; i < DotNum * 2; i++) // ↑
			{
				ScreenPrint(Dot[i].X, Dot[i].Y, Dot_Shape[1]); // 점 표시
			}

			for (int i = 0; i < DotNum; i++) // ↓
			{
				ScreenPrint(Dot[i].X, Dot[i].Y, Dot_Shape[0]); // 점 표시
			}
			break;

		case 0:
			for (int i = 0; i < Zero; i++) // ↓
			{
				ScreenPrint(Dot[i].X, Dot[i].Y, Dot_Shape[0]); // 점 표시
			}
			break;
		}

		ScreenPrint(Star.X, Star.Y, Star_Shape); // Star 표시
	}
	ScreenFlipping();
}
Пример #8
0
	void Render()
	{
		char BarPrint[100];

		ScreenClear();

		// GameStatus에 따른 화면 출력 함수
		StatusPrint();

		// RUNNIG 시 출력 문구
		if (GameStatus == RUNNING)
		{
			// 상태바 출력
			sprintf(BarPrint, "남은 뒤집기 : %d     맞춘 카드 : %d    남은 카드 : %d", selectChance, matchCardCount, (Stage.CardCount / 2) - matchCardCount);
			ScreenPrint(16, 2, BarPrint);

			// Board 출력
			// 각모서리
			ScreenPrint(Board.leftX, Board.topY, "┌"); // 좌측 상단
			ScreenPrint(Board.rightX, Board.topY, "┐"); // 우측 상단
			ScreenPrint(Board.leftX, Board.bottomY, "└"); // 좌측 하단
			ScreenPrint(Board.rightX, Board.bottomY, "┘"); // 우측 하단

			// 위아래벽
			for (int i = Board.leftX + 2; i < Board.rightX; i++)
			{
				ScreenPrint(i, Board.topY, "-");
				ScreenPrint(i, Board.bottomY, "-");
			}
			// 좌우벽
			for (int i = Board.topY + 1; i < Board.bottomY; i++)
			{
				ScreenPrint(Board.leftX, i, "│");
				ScreenPrint(Board.rightX, i, "│");
			}

			// Card 출력
			if (Stage.CardCount == 12)
			{
				for (int i = 0; i < Stage.CardCount; i++)
				{
					ScreenPrint(Card[i].X, Card[i].Y, Card[i].PrintForm);
				}
			}
			else
			{
				for (int i = 0; i < Stage.CardCount; i++)
				{
					ScreenPrint(Card[i].X, Card[i].Y - 2, Card[i].PrintForm);
				}
			}

			// Choice 출력
			if (Stage.CardCount == 12)
			{
				ScreenPrint(Choice.X, Choice.Y, "▷");
			}
			else
			{
				ScreenPrint(Choice.X, Choice.Y - 2, "▷");
			}
		}
		/*
		//test 시작
		for (int i = 0; i < 4; i++)
		{
			ScreenPrint(24 + (10*i), 8, "※");
		}
		for (int i = 0; i < 4; i++)
		{
			ScreenPrint(24, 8 + (4*i), "※");
		}
		//test 끝
		*/

		ScreenFlipping();
	}