From 1a9252c7cfc77d9d616bd0a3f538cce2d24e2f74 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 1 Apr 2015 19:24:27 +0200 Subject: [PATCH] changed some details in play/pause game button handling --- graphics/gfx_classic/RocksDoor2.ilbm | Bin 11904 -> 11904 bytes src/conf_gfx.c | 4 ++-- src/game.c | 12 +++++++----- src/tape.c | 9 ++++++++- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/graphics/gfx_classic/RocksDoor2.ilbm b/graphics/gfx_classic/RocksDoor2.ilbm index ef9d5f57afd892f04b50e1df66dec82130f3940d..ad783160a75a03f10f77b8ff517509bd2f09d140 100644 GIT binary patch delta 1160 zcmZva-%C?r7{^^IQ=~b!bKK5!JF9dmku)kW8+lWdLJD0J2&Q6}!IE9r)p>1p86zih5 zWoh5kRB%XR5{EN6li;#|iv}yhBWXeqFG_nvd=kW#so6oV5-f)qj2eQ-8>|8sWQ%Ao z?Tw(mE{LqD*!%m&sOukapCw0(oj`4Givfj&i0#jDb;8 zFpQWyq&o%EO-v)|Yl5*6qk`Kb7=suSqsV9xCK6MId5>Vc#552yL(h+M#tz>-qh6X* zCI&N6%p5WW!p^k%V8R>b7M&a&(bs}U=u2-Mio#+6i|~z5r&5P5Sx)aMbxtuuP8qyc z>YOfF8}ax?m47#qr@do=a)6FD1#Y?g@Xjak*iLLG%R~6#6G5K{K?HrJOT=~}gDoC( zvg@`u4R$POepm3@B2-$*VbJ23?swm;J0`L z)sOyRd!yEFhp0N&;VkVv8PO3b0Qy*e&%>MEAz3=Cq~;R=svNu?S_cfMa5@x`y^-zb z%UtngedTNVdtUY{nh2WKTllY{~_*p|em94Rb*c2y`>yh`rjW3K9_R z4?;k7z(U_3_1CMSoy2%7ITOFmy$$yFLcVX9s_RW1qQy>pJeCU9s(kv^vC2x%hBdv` zyam4YUnbE(=#qu=<~5OJ@!Ei}SQT)KBoOa^#s%jfJ#du_WJ4E4had@34}Wn1m;=+Y g6xr^3EGpqd;Mh|Czv{VWC)chP0}HlQP5of|3$LnpZU6uP delta 1112 zcmZY7%WD&15CCv15mVcy&8vAdk5$_|4lM>1YAl`jP>G=6!9!BaL4_EKLMSmi&Ntu2Cg!lGZ+O41#kV^M%ie{7 z{VP54@{Koo7%KkzuID0N`QyetVZyn!lcsBX*FX0M$BLDyZ 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; -- 2.34.1