X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fscreens.c;h=ddc28e8d6615a427dcdb009c110e367fe81a762d;hb=c405cf118d3d31c2b6e1fe935671ecdaeb031f8f;hp=9211c573411b2121b8897fa377786898cdfc180d;hpb=095207353ef58a65f5146e6ddc7eefb51bfe0f55;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 9211c573..ddc28e8d 100644 --- a/src/screens.c +++ b/src/screens.c @@ -501,12 +501,16 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) else #endif { -#if 1 - em_main(); -#else game_status = GAME_MODE_PLAYING; StopAnimation(); + +#if 1 + + em_main_init_game(); + +#else InitGame(); + #endif } } @@ -2948,6 +2952,24 @@ void HandleGameActions() if (game_status != GAME_MODE_PLAYING) return; +#if 1 + + { + byte summarized_player_action = 0; + int i; + + for (i = 0; i < MAX_PLAYERS; i++) + summarized_player_action |= stored_player[i].action; + + if (em_main_handle_game(summarized_player_action) != 0) + { + game_status = GAME_MODE_MAIN; + DrawMainMenu(); + } + } + +#else + if (local_player->LevelSolved) GameWon(); @@ -2959,6 +2981,8 @@ void HandleGameActions() if (tape.auto_play && !tape.playing) AutoPlayTape(); /* continue automatically playing next tape */ + +#endif } /* ---------- new screen button stuff -------------------------------------- */