From: Holger Schemel Date: Wed, 1 Apr 2015 17:24:27 +0000 (+0200) Subject: changed some details in play/pause game button handling X-Git-Tag: 4.0.0.0-rc1~218 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1a9252c7cfc77d9d616bd0a3f538cce2d24e2f74;p=rocksndiamonds.git changed some details in play/pause game button handling --- diff --git a/graphics/gfx_classic/RocksDoor2.ilbm b/graphics/gfx_classic/RocksDoor2.ilbm index ef9d5f57..ad783160 100644 Binary files a/graphics/gfx_classic/RocksDoor2.ilbm and b/graphics/gfx_classic/RocksDoor2.ilbm differ diff --git a/src/conf_gfx.c b/src/conf_gfx.c index bbf92ef0..11eb95ed 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -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" }, diff --git a/src/game.c b/src/game.c index ee52b55f..1f64845d 100644 --- a/src/game.c +++ b/src/game.c @@ -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; diff --git a/src/tape.c b/src/tape.c index bb0f08f8..7a896e80 100644 --- a/src/tape.c +++ b/src/tape.c @@ -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;