fixed game loop handling if menu support is disabled

This commit is contained in:
Christian Kroll 2011-03-07 02:28:42 +00:00
parent f4c812bcf4
commit c1b55278cd
1 changed files with 16 additions and 42 deletions

View File

@ -199,7 +199,6 @@ void display_loop(){
menu(); menu();
mode = oldOldmode; mode = oldOldmode;
#else #else
#ifdef GAME_TETRIS
case 42: case 42:
if (JOYISFIRE) if (JOYISFIRE)
mode = 43; mode = 43;
@ -208,64 +207,39 @@ void display_loop(){
break; break;
case 43: case 43:
waitForFire = 0; waitForFire = 0; // avoid circular jumps
while (JOYISFIRE); while (JOYISFIRE); // wait until user released the fire button
wait(25); // wait for button to settle
#ifdef GAME_TETRIS
tetris(); tetris();
while (JOYISFIRE);
mode = oldOldmode;
waitForFire = 1;
break;
#endif #endif
#ifdef GAME_BASTET #ifdef GAME_BASTET
case 44:
waitForFire = 0;
while (JOYISFIRE);
tetris_bastet(); tetris_bastet();
while (JOYISFIRE);
mode = oldOldmode;
waitForFire = 1;
break;
#endif #endif
#ifdef GAME_TETRIS_FP #ifdef GAME_TETRIS_FP
case 45:
waitForFire = 0;
while (JOYISFIRE);
tetris_fp(); tetris_fp();
while (JOYISFIRE);
mode = oldOldmode;
waitForFire = 1;
break;
#endif #endif
#ifdef GAME_SPACE_INVADERS #ifdef GAME_SPACE_INVADERS
case 45:
waitForFire = 0;
while (JOYISFIRE);
borg_invaders(); borg_invaders();
while (JOYISFIRE);
mode = oldOldmode;
waitForFire = 1;
break;
#endif #endif
#ifdef GAME_SNAKE #ifdef GAME_SNAKE
case 46:
waitForFire = 0;
while (JOYISFIRE);
snake_game(); snake_game();
while (JOYISFIRE);
mode = oldOldmode;
waitForFire = 1;
break;
#endif #endif
#ifdef GAME_BREAKOUT #ifdef GAME_BREAKOUT
case 47:
waitForFire = 0;
while (JOYISFIRE);
borg_breakout(0); borg_breakout(0);
while (JOYISFIRE);
mode = oldOldmode;
waitForFire = 1;
break;
#endif #endif
while (JOYISFIRE); // avoid an unwanted restart of the game loop
wait(25); // wait for button to settle
mode = oldOldmode; // restore old animation mode
waitForFire = 1; // reenable joystick query of the wait() function
break;
#endif #endif
#ifdef ANIMATION_OFF #ifdef ANIMATION_OFF