From 80c735c6e02edbbaf0289f0cbcb012d53356c410 Mon Sep 17 00:00:00 2001 From: Randy Thiemann Date: Wed, 25 Oct 2023 22:42:30 +0200 Subject: [PATCH] Add quick restart. --- README.md | 1 + bin/DMGTRIS.GBC | Bin 65536 -> 65536 bytes bin/DMGTRIS.pocket | Bin 65536 -> 65536 bytes patch_pocket.py | 2 +- src/field.asm | 4 ++++ src/state_gameplay.asm | 16 +++++++++++++++- 6 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bdf8b7c..d323ea5 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ ScoreIncrement points are then awarded. - Up — Sonic/Hard drop - Down — Soft drop/Lock - Left/Right — Move +- A+B+Select — Bail to main menu if paused ### Game Over - A — Restart immediately diff --git a/bin/DMGTRIS.GBC b/bin/DMGTRIS.GBC index 0d03340085f2e411943315835519670e61ec4929..7ddf83f304bafa6a4035ca279f941d0254879824 100644 GIT binary patch delta 3323 zcmZ{mdvFui6^HlgX}!I!F|uRAZf(Z`jBT*|60kVoVQ8kc2s98J9&zYUXfjOGKfZn^2-qNJ&fL5+xav67V3Jk!0O8Go2wu*k&_hm|9KDZFyu6^s48sBqPRT zG<)})-}&y@tGnmyZd;qKtxeZ1h#z^xj}s`D!!4eW$WinTm&f649+3;C%#O#~s#-j_ zjKeFc@MI1@T8|HV@T(qtt``5h0>AFTBU7<36aTXopYRwsa<}LF1ZUt($IX?GJLPVr zOG3(i(HBI7%R?-2TNu57@)7|sld6uH?IB+E0xeAD+e5$yTI7AG)_iR$9}J496XnSr zI>ArSAG36jbhj*<7g`TmaD0Yj!_Ad}gYs4LdINY?+$=w3aWfMF@*9>F8jV%HW+`j+ zTWNOql9k%S2`jaROKj8}e$qy>!oRXnLwJvk>ca2Zs3v^U79u;TuAgQ_hiuduy=bG^ z(JyT@H~NK*I-_T8v@rUqE%2cYC~ZGAFv`RzE2A8Y%3;)mF-p@<_0d+qj0`g~%*rqa z!}v^0$C4QsWnz?tQ8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YOQi4B^!c3!Nsh zFJ%hTD)C6l9Htd`S3}n_(tzBz3AC@Ip>=!&O$!|Eg>rh0dDZRT-R!Pz-e29CcXhl0 Z&ou0UJLnAT()BGLT(M)T{zTKz{{Z(KCKCVv diff --git a/patch_pocket.py b/patch_pocket.py index 4ab6c6a..4e37379 100644 --- a/patch_pocket.py +++ b/patch_pocket.py @@ -1,5 +1,5 @@ logo = b"\x01\x10\xCE\xEF\x00\x00\x44\xAA\x00\x74\x00\x18\x11\x95\x00\x34\x00\x1A\x00\xD5\x00\x22\x00\x69\x6F\xF6\xF7\x73\x09\x90\xE1\x10\x44\x40\x9A\x90\xD5\xD0\x44\x30\xA9\x21\x5D\x48\x22\xE0\xF8\x60" -with open('bin/DMGTRIS.GBC', 'rb+') as f: +with open('bin/DMGTRIS.pocket', 'rb+') as f: f.seek(0x104) f.write(logo) diff --git a/src/field.asm b/src/field.asm index 8907043..bd0f769 100644 --- a/src/field.asm +++ b/src/field.asm @@ -1184,6 +1184,10 @@ FieldProcess:: ; ************************************************************** ; HANDLE UP + ; Assume 1G or lower. + ld a, 1 + ldh [hWantedG], a + ; Is a hard/sonic drop requested? Skip if in 20G mode. ldh a, [hCurrentGravityPerTick] cp a, 20 diff --git a/src/state_gameplay.asm b/src/state_gameplay.asm index 56dd017..4d52ab9 100644 --- a/src/state_gameplay.asm +++ b/src/state_gameplay.asm @@ -506,7 +506,21 @@ gameOverMode: pauseMode: - ldh a, [hStartState] + ; Quick reset. + ldh a, [hAState] + cp a, 0 + jr z, :+ + ldh a, [hBState] + cp a, 0 + jr z, :+ + ldh a, [hSelectState] + cp a, 0 + jr z, :+ + call SwitchToTitle + jp EventLoopPostHandler + + ; Unpause +: ldh a, [hStartState] cp a, 1 jr nz, :+ call FromBackupField