Example #1
0
int main() {

	int x, y; //플레이어의 실시간좌표

	setcursortype(NOCURSOR);

	LoadingStage();

	Round = 0;

	while (1) {
		memcpy(stage, StageData[Round], sizeof(stage));

		clrscr();


		for (y = 0; y < 18; y++) {

			for (x = 0; x < 20; x++) {

				if (stage[y][x] == '@') {

					Rx = x; //플레이어 좌표지정
					Ry = y; //플레이어 좌표지정
					stage[y][x] = ' '; //공백으로 지우기

				}

			}
		}

		while (1) {

			DrawStage();
			PlayerMove();
		}
	}

	

	getchar();
	return 0;

}
Example #2
0
File: main.cpp Project: boredzo/CCX
void RefreshAll( void )
{	
	DrawBackdrop( );

	ShowGrayMonitor( 0 );
	ShowGrayMonitor( 1 );

	RefreshNext( 0 );
	RefreshNext( 1 );

	RefreshPlayerWindow( 0 );
	RefreshPlayerWindow( 1 );

	DrawFrozenOpponent( );
	DrawStage( );

	ShowScore( 0 );
	ShowScore( 1 );
}
Example #3
0
File: game.c Project: jc429/276game
void DrawVersus(){
	DrawStage(stage);
	DrawFighters(screen);
	DrawMeters(&f1,&f2);	
	DrawNextRoundTimer(nexttimer);
	int DEBUGSTATE = 1;
	if(DEBUGSTATE){
		char a[20];
		sprintf(a,"P1state: %d",f1.state);
		DrawText(a,270,20);
	}
	if(f2.combo>0){
		char a[20]; 
		sprintf(a,"Combo: %d!",f2.combo);
		DrawText(a,40,120);
	}
	if(f1.combo>0){
		char a[20]; 
		sprintf(a,"Combo: %d!",f1.combo);
		DrawText(a,840,120);
	}
}
Example #4
0
void SokobanMain(void)
{
	int x, y;

	ckTerminalSetCursorType(TERMINAL_CURSOR_NOCURSOR);

	LoadingStage();

	RoundNum = 0;

	while (1)
	{
		memcpy(stage, StageData[RoundNum], sizeof(stage));
		for (y = 0; y < 18; y++)
		{
			for (x = 0; x < 20; x++)
			{
				if (stage[y][x] == '@')
				{
					Roundx = x;			// 플레이어 좌표 지정
					Roundy = y;			// 플레이어 좌표 지정
					stage[y][x] = ' ';	// 공백으로 지워주자
				}
			}
		}

		clrscr();
		NumMove = 0;

		while (1)
		{
			DrawStage();
			PrintInfo();
			PlayerMoveAction();

			if (OnRestart == 1)
			{
				OnRestart = 0;
				break;
			}

			if (TestStageClear())
			{
				clrscr();
				if (RoundNum < MAXSTAGE - 1)
				{
					gotoxy(30,4);
					printf("><Congratulation!><");
					gotoxy(29,5);
					printf("%d stage clear!", RoundNum+1);
					gotoxy(34,8);
					printf("Let's move to the next stage~");
					gotoxy(34,10);
					printf("press enter...");
					getchar();
					RoundNum++;
				}
				else
				{
					gotoxy(30,4);
					printf("><Congratulation!><");
					gotoxy(29,5);
					printf("all stage clear!");
					gotoxy(34,8);
					printf("press enter to exit...");
					getchar();
					exit(0);
				}
				break;
			}
		}
	}

	ckTaskExit();
}