changed some details in play/pause game button handling
authorHolger Schemel <info@artsoft.org>
Wed, 1 Apr 2015 17:24:27 +0000 (19:24 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 1 Apr 2015 17:24:27 +0000 (19:24 +0200)
graphics/gfx_classic/RocksDoor2.ilbm
src/conf_gfx.c
src/game.c
src/tape.c

index ef9d5f57afd892f04b50e1df66dec82130f3940d..ad783160a75a03f10f77b8ff517509bd2f09d140 100644 (file)
Binary files a/graphics/gfx_classic/RocksDoor2.ilbm and b/graphics/gfx_classic/RocksDoor2.ilbm differ
index bbf92ef026b3a8ebd6f7bd81892c1289ea6b2174..11eb95ed348c57e6a318bb272cb1150704873193 100644 (file)
@@ -7370,8 +7370,8 @@ struct ConfigInfo image_config[] =
   { "game.button.stop.y",                      "-1"                    },
   { "game.button.pause.x",                     "35"                    },
   { "game.button.pause.y",                     "215"                   },
-  { "game.button.play.x",                      "-1"                    },
-  { "game.button.play.y",                      "-1"                    },
+  { "game.button.play.x",                      "35"                    },
+  { "game.button.play.y",                      "215"                   },
   { "game.button.undo.x",                      "5"                     },
   { "game.button.undo.y",                      "215"                   },
   { "game.button.redo.x",                      "65"                    },
index ee52b55f5eb6f4b7395fa2724b2e022809d95484..1f64845d156cbe6a3d9b739e61f376a8ebdbb468 100644 (file)
@@ -14998,18 +14998,22 @@ void MapUndoRedoButtons()
 {
   UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO);
   UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO);
+  UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_PLAY);
 
   MapGadget(game_gadget[GAME_CTRL_ID_UNDO]);
   MapGadget(game_gadget[GAME_CTRL_ID_REDO]);
+  MapGadget(game_gadget[GAME_CTRL_ID_PLAY]);
 }
 
 void UnmapUndoRedoButtons()
 {
   UnmapGadget(game_gadget[GAME_CTRL_ID_UNDO]);
   UnmapGadget(game_gadget[GAME_CTRL_ID_REDO]);
+  UnmapGadget(game_gadget[GAME_CTRL_ID_PLAY]);
 
   MapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO);
   MapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO);
+  MapGameButtonsAtSamePosition(GAME_CTRL_ID_PLAY);
 }
 
 void MapGameButtons()
@@ -15018,7 +15022,8 @@ void MapGameButtons()
 
   for (i = 0; i < NUM_GAME_BUTTONS; i++)
     if (i != GAME_CTRL_ID_UNDO &&
-       i != GAME_CTRL_ID_REDO)
+       i != GAME_CTRL_ID_REDO &&
+       i != GAME_CTRL_ID_PLAY)
       MapGadget(game_gadget[i]);
 }
 
@@ -15128,10 +15133,7 @@ static void HandleGameButtonsExt(int id, int button)
          SendToServer_ContinuePlaying();
        else
 #endif
-       {
-         tape.pausing = FALSE;
-         DrawVideoDisplay(VIDEO_STATE_PAUSE_OFF, 0);
-       }
+         TapeTogglePause(TAPE_TOGGLE_MANUAL);
       }
       break;
 
index bb0f08f8112ec4e065aa8ff28f2b2a4dab3e7e59..7a896e807bf79e7ebb6864cf0e50e09670f718fb 100644 (file)
@@ -747,7 +747,7 @@ void TapeTogglePause(boolean toggle_manual)
     }
   }
 
-  if (CheckEngineSnapshotList())
+  if (game_status == GAME_MODE_PLAYING && CheckEngineSnapshotList())
   {
     if (tape.pausing)
       MapUndoRedoButtons();
@@ -1412,6 +1412,13 @@ static void HandleTapeButtonsExt(int id)
       break;
 
     case TAPE_CTRL_ID_PLAY:
+      if (tape.recording && tape.pausing)      /* PAUSE -> RECORD */
+      {
+       // ("TAPE_IS_EMPTY(tape)" is TRUE here -- probably fix this)
+
+       TapeTogglePause(TAPE_TOGGLE_MANUAL);
+      }
+
       if (TAPE_IS_EMPTY(tape))
        break;