From de2230033229c30b5b4d344d57f9b61d7be941d3 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 18 Feb 2024 14:34:28 +0100 Subject: [PATCH] added optional button to restart game (door, panel and touch variants) --- graphics/gfx_classic/RocksDoor2.png | Bin 1402 -> 2252 bytes graphics/gfx_classic/RocksTouch.png | Bin 2926 -> 4216 bytes src/conf_gfx.c | 21 +++++++++++ src/game.c | 56 +++++++++++++++++++++------- src/game.h | 5 +++ 5 files changed, 68 insertions(+), 14 deletions(-) diff --git a/graphics/gfx_classic/RocksDoor2.png b/graphics/gfx_classic/RocksDoor2.png index 73efd72d531f0335a909cce09790a0d894ebf171..7d150be02f4870e85a87db166bd812208a54bd16 100644 GIT binary patch literal 2252 zcmeH|>sL})7{(756@?VjG+R?0ja-^ilbMybj&!_bp@2-uYADcXJerIyQky0N)4)r! zuuL;=g;t`OT9T!fnN*`tISQtkF`4D0UA$*C>cFfu|HQ2JhrQpu-}l}7d46AZMi@14 zk=Zgc000&R2f=gzKuPs+7!ISKf%)!v0KfoYJHq|-yMls(W5AG*@FWH+c0-!)V|+f&78=PE9v?OryqZhUyy%}k zKG#*U8lQH_#zewGdNi;Y}|EiAQ49+n@jyHKAvi@H6~gr z!oc~`@vYSPs)g1oHK~vUSud>UYi3W<>kF3PCE2Vf(8?L!?Q4r;l8vSDoNDqEjSzH) zrF0y<+1b9u!$m}|*&pHxUq2K^A_wpTat?u1zTS88Dt1*R^)gN^md(PEPG3FR^ zjXco$+(nC3&t)lvVOrz@BcGN9UwFKzttcpNl(1kh4m{8z8aUHrsv;bT zMuK+`^54+fftMBj*uhJl$&ys7HVY)!wYZ}7apEkr89A!zYBy1wg|0YzEyO0ih1Xzh zasFgWFecj^hRJqdNOqk)*v+@ILZ?=)#tz+cs>)@VNVh)KG*0c!0-QZMI#6_VvlsSg zr)t83K$_mRH6M}rFou)oe6feSR8u_kg{m|7q3zd+Q}*c^*`blxkCWG^+vQp}>C~ci zc+zL94^S`i8WYUCiQ!b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VmlOz;HH__k2)(g)(EZ{m z=RBc7;EYbY-wp=E@&ac>$oh4+1LEDMDCGryPlTwBrzm%yG*)MI3ZYCI>(c9kRd5yM z3qFsKS5e%hFUV0JWrTl>kRd^utMM(>{vgfO_<6AET8$4^dxTKR|5}aj3v%$)_`VCMWQ2^6Zx(`2EA?8$U?4iAynckg#}J9TQE^AwEKSbJHwEaTLkM%+dyNlLB>{e9070L-Ix6pq|(J!R@SlssKf|PM{ zRzZYnf!H7S45_y8dLWgvN-e#FT5!D^)eB+$LnN*^OPN6=J_y@}z!`&t6!?Dt6bMGD z_xcViwM_2ly}psDWg3my{y4nGZgz`CHFneYVwdddesRC7*=gQ;_gg}o-7m9a2HzSG zadWKlK?=Lmy!ST&QFo-m2eG4gcK@a*_ZAYWepS=>5i&wX$i0M&tMP{`{{f}Eu^A19 RFev~4002ovPDHLkV1jAiflB}Y diff --git a/graphics/gfx_classic/RocksTouch.png b/graphics/gfx_classic/RocksTouch.png index 4cb63e9c68d4929844f6eab27cd17e4be683e0c0..919207ce5eaf21550ea24974081405c46842d1b5 100644 GIT binary patch literal 4216 zcma)83pkYN+keK4F)^65PEp(F|I{?Ra-LsAnLIQyRL6D)Lp_P>tBFV?chs9!X zx!kO*EQGzLrlzf}O)M5qPfx=zYzu%h0Kouo0muPB06+%-;{YHcVRdzwOor|4VI~t! zN`mw9V4=`f8#wF$Ofuk_fE;Tea0VSdU_2PW(Ev_ShqK6Vp*>vAgoRwVBM%k}ZLNW` zJqY##Tn@-d2ZA!t(G14ltWO+<)!`K~ykZY8GT{|2ypjj62mvC<1AqtsQUE9fpay_0 z04CQ3sl)1fV6p>j9}F{-U~VCt*9Z%NxjArl2EoCA%LO?(Kp+4e9bkMMiS7)qu;7&> z7|wxLYGAkxh6fN<$Qj12Az=73MU~&#@Uko#A;G{MrHveWMkoCS0gfh zz3BhzD2IHy+g)BKaqsC$eOKpsbM$OX*W_~7 z%D$dOCpRrp4377c=o3+H6sML_maG8jr>ywnp|rj{lwO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W%2IDCZVJqC6%7|8!(&{d&t!4RO#p`MU0FO1#a!IJpo+Q^|5!&l> z8=80QDTE`5*$~KXJz<7ho)Nct1sbKKj(%i=s~*|j)CvUigq6LEA2xhd1eIAuu;Z8( zj$~1}kt*g-vPDc1LZ?X>OL8p~Htv-bh(ezmVT=dKdNPHUOCtNO=XD=;oP5^s?Mge6 zb+WXv2912ny*Np}ggt-${hlmZ#eJ_&9IChmhm;pzo+O{cUPG(Wj+O79by?$eUqy3H z3q?y@>(V6b@`~Ml9qNC~f5tjn+7EYVbVO*%$FEKbf{FIHP58qNpKcxSprTe`M#v<5 ztW9u}u*nARiPgtc`)@hW7PHi*i|Lv#;Pll47i~-+-uL(*iQop_xpOwa zQ_V?SdSxX=ZHInfVEs*&Uf{U2d!<%!^VrHmwR z*?-XtF5+WD{c}%F#&B3r%E!gi=3%#b!)L{F3(HsBqxT`xcho9>#sJ-MAGKoF!888? D^MVsr diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 7b9d243e..62bdab0e 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -6420,6 +6420,13 @@ struct ConfigInfo image_config[] = { "gfx.game.button.load.height", "30" }, { "gfx.game.button.load.pressed_xoffset", "-100" }, + { "gfx.game.button.restart", "RocksDoor2.png" }, + { "gfx.game.button.restart.x", "200" }, + { "gfx.game.button.restart.y", "50" }, + { "gfx.game.button.restart.width", "30" }, + { "gfx.game.button.restart.height", "30" }, + { "gfx.game.button.restart.pressed_xoffset", "30" }, + { "gfx.game.button.sound_music", "RocksDoor.png" }, { "gfx.game.button.sound_music.x", "305" }, { "gfx.game.button.sound_music.y", "245" }, @@ -6445,6 +6452,7 @@ struct ConfigInfo image_config[] = { "gfx.game.button.panel_stop", UNDEFINED_FILENAME }, { "gfx.game.button.panel_pause", UNDEFINED_FILENAME }, { "gfx.game.button.panel_play", UNDEFINED_FILENAME }, + { "gfx.game.button.panel_restart", UNDEFINED_FILENAME }, { "gfx.game.button.panel_sound_music", UNDEFINED_FILENAME }, { "gfx.game.button.panel_sound_loops", UNDEFINED_FILENAME }, @@ -6464,6 +6472,13 @@ struct ConfigInfo image_config[] = { "gfx.game.button.touch_pause.pressed_xoffset", "-200" }, { "gfx.game.button.touch_pause.active_yoffset", "60" }, + { "gfx.game.button.touch_restart", "RocksTouch.png" }, + { "gfx.game.button.touch_restart.x", "210" }, + { "gfx.game.button.touch_restart.y", "240" }, + { "gfx.game.button.touch_restart.width", "60" }, + { "gfx.game.button.touch_restart.height", "60" }, + { "gfx.game.button.touch_restart.pressed_xoffset", "-200" }, + { "gfx.tape.button.eject", "RocksDoor.png" }, { "gfx.tape.button.eject.x", "305" }, { "gfx.tape.button.eject.y", "357" }, @@ -9733,6 +9748,8 @@ struct ConfigInfo image_config[] = { "game.button.pause2.y", "-1" }, { "game.button.load.x", "-1" }, { "game.button.load.y", "-1" }, + { "game.button.restart.x", "-1" }, + { "game.button.restart.y", "-1" }, { "game.button.sound_music.x", "5" }, { "game.button.sound_music.y", "245" }, { "game.button.sound_loops.x", "35" }, @@ -9746,6 +9763,8 @@ struct ConfigInfo image_config[] = { "game.button.panel_pause.y", "-1" }, { "game.button.panel_play.x", "-1" }, { "game.button.panel_play.y", "-1" }, + { "game.button.panel_restart.x", "-1" }, + { "game.button.panel_restart.y", "-1" }, { "game.button.panel_sound_music.x", "-1" }, { "game.button.panel_sound_music.y", "-1" }, { "game.button.panel_sound_loops.x", "-1" }, @@ -9757,6 +9776,8 @@ struct ConfigInfo image_config[] = { "game.button.touch_stop.y", "0" }, { "game.button.touch_pause.x", "-60" }, { "game.button.touch_pause.y", "0" }, + { "game.button.touch_restart.x", "-1" }, + { "game.button.touch_restart.y", "-1" }, { "tape.button.eject.x", "5" }, { "tape.button.eject.y", "77" }, diff --git a/src/game.c b/src/game.c index 872b4e9b..fd943b99 100644 --- a/src/game.c +++ b/src/game.c @@ -1017,19 +1017,22 @@ static struct GamePanelControlInfo game_panel_controls[] = #define GAME_CTRL_ID_SAVE 5 #define GAME_CTRL_ID_PAUSE2 6 #define GAME_CTRL_ID_LOAD 7 -#define GAME_CTRL_ID_PANEL_STOP 8 -#define GAME_CTRL_ID_PANEL_PAUSE 9 -#define GAME_CTRL_ID_PANEL_PLAY 10 -#define GAME_CTRL_ID_TOUCH_STOP 11 -#define GAME_CTRL_ID_TOUCH_PAUSE 12 -#define SOUND_CTRL_ID_MUSIC 13 -#define SOUND_CTRL_ID_LOOPS 14 -#define SOUND_CTRL_ID_SIMPLE 15 -#define SOUND_CTRL_ID_PANEL_MUSIC 16 -#define SOUND_CTRL_ID_PANEL_LOOPS 17 -#define SOUND_CTRL_ID_PANEL_SIMPLE 18 - -#define NUM_GAME_BUTTONS 19 +#define GAME_CTRL_ID_RESTART 8 +#define GAME_CTRL_ID_PANEL_STOP 9 +#define GAME_CTRL_ID_PANEL_PAUSE 10 +#define GAME_CTRL_ID_PANEL_PLAY 11 +#define GAME_CTRL_ID_PANEL_RESTART 12 +#define GAME_CTRL_ID_TOUCH_STOP 13 +#define GAME_CTRL_ID_TOUCH_PAUSE 14 +#define GAME_CTRL_ID_TOUCH_RESTART 15 +#define SOUND_CTRL_ID_MUSIC 16 +#define SOUND_CTRL_ID_LOOPS 17 +#define SOUND_CTRL_ID_SIMPLE 18 +#define SOUND_CTRL_ID_PANEL_MUSIC 19 +#define SOUND_CTRL_ID_PANEL_LOOPS 20 +#define SOUND_CTRL_ID_PANEL_SIMPLE 21 + +#define NUM_GAME_BUTTONS 22 // forward declaration for internal use @@ -16246,6 +16249,11 @@ static struct GAME_CTRL_ID_LOAD, NULL, TRUE, FALSE, "load game" }, + { + IMG_GFX_GAME_BUTTON_RESTART, &game.button.restart, + GAME_CTRL_ID_RESTART, NULL, + TRUE, FALSE, "restart game" + }, { IMG_GFX_GAME_BUTTON_PANEL_STOP, &game.button.panel_stop, GAME_CTRL_ID_PANEL_STOP, NULL, @@ -16261,6 +16269,11 @@ static struct GAME_CTRL_ID_PANEL_PLAY, NULL, FALSE, FALSE, "play game" }, + { + IMG_GFX_GAME_BUTTON_PANEL_RESTART, &game.button.panel_restart, + GAME_CTRL_ID_PANEL_RESTART, NULL, + FALSE, FALSE, "restart game" + }, { IMG_GFX_GAME_BUTTON_TOUCH_STOP, &game.button.touch_stop, GAME_CTRL_ID_TOUCH_STOP, NULL, @@ -16271,6 +16284,11 @@ static struct GAME_CTRL_ID_TOUCH_PAUSE, NULL, FALSE, TRUE, "pause game" }, + { + IMG_GFX_GAME_BUTTON_TOUCH_RESTART, &game.button.touch_restart, + GAME_CTRL_ID_TOUCH_RESTART, NULL, + FALSE, TRUE, "restart game" + }, { IMG_GFX_GAME_BUTTON_SOUND_MUSIC, &game.button.sound_music, SOUND_CTRL_ID_MUSIC, &setup.sound_music, @@ -16350,7 +16368,10 @@ void CreateGameButtons(void) id == GAME_CTRL_ID_PLAY || id == GAME_CTRL_ID_PANEL_PLAY || id == GAME_CTRL_ID_SAVE || - id == GAME_CTRL_ID_LOAD) + id == GAME_CTRL_ID_LOAD || + id == GAME_CTRL_ID_RESTART || + id == GAME_CTRL_ID_PANEL_RESTART || + id == GAME_CTRL_ID_TOUCH_RESTART) { button_type = GD_TYPE_NORMAL_BUTTON; checked = FALSE; @@ -16698,6 +16719,13 @@ static void HandleGameButtonsExt(int id, int button) TapeQuickLoad(); break; + case GAME_CTRL_ID_RESTART: + case GAME_CTRL_ID_PANEL_RESTART: + case GAME_CTRL_ID_TOUCH_RESTART: + TapeRestartGame(); + + break; + case SOUND_CTRL_ID_MUSIC: case SOUND_CTRL_ID_PANEL_MUSIC: if (setup.sound_music) diff --git a/src/game.h b/src/game.h index c555578b..3752ba00 100644 --- a/src/game.h +++ b/src/game.h @@ -123,6 +123,8 @@ struct GameButtonInfo struct XY pause2; struct XY load; + struct XY restart; + struct XY sound_music; struct XY sound_loops; struct XY sound_simple; @@ -131,12 +133,15 @@ struct GameButtonInfo struct XY panel_pause; struct XY panel_play; + struct XY panel_restart; + struct XY panel_sound_music; struct XY panel_sound_loops; struct XY panel_sound_simple; struct XY touch_stop; struct XY touch_pause; + struct XY touch_restart; }; struct GameSnapshotInfo -- 2.34.1