rnd-20040822-2-src
[rocksndiamonds.git] / src / screens.c
index 50c8685ab59f7116c9ba68ec9612545b50d0430c..d3728d2c2a298ba18a29f04c4f9bc56107f7529b 100644 (file)
@@ -495,7 +495,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
        if (setup.autorecord)
          TapeStartRecording();
 
-#if defined(PLATFORM_UNIX)
+#if defined(NETWORK_AVALIABLE)
        if (options.network)
          SendToServer_StartPlaying();
        else
@@ -2409,6 +2409,8 @@ static void drawPlayerSetupInputInfo(int player_nr)
 
   DrawText(mSX+11*32, mSY+2*32, int2str(player_nr +1, 1), FONT_INPUT_1_ACTIVE);
 #if 1
+  ClearRectangleOnBackground(drawto, mSX + 8 * TILEX, mSY + 2 * TILEY,
+                            TILEX, TILEY);
   DrawGraphicThruMaskExt(drawto, mSX + 8 * TILEX, mSY + 2 * TILEY,
                         PLAYER_NR_GFX(IMG_PLAYER_1, player_nr), 0);
 #else
@@ -2942,6 +2944,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();
 
@@ -2953,6 +2973,8 @@ void HandleGameActions()
 
   if (tape.auto_play && !tape.playing)
     AutoPlayTape();    /* continue automatically playing next tape */
+
+#endif
 }
 
 /* ---------- new screen button stuff -------------------------------------- */