aboutsummaryrefslogtreecommitdiff
path: root/.nasm
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-03-06 16:14:17 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-03-06 16:14:17 +0100
commit3302f760f1461bc4582c99ee2e4ed0ccc1d5b186 (patch)
tree8a9808677dc972c1115f6d6a75cab86a6651992a /.nasm
parent695d225256ed129ce55eb2dfde9de33d3d5f3af9 (diff)
downloadjetpac.nes-3302f760f1461bc4582c99ee2e4ed0ccc1d5b186.tar.gz
jetpac.nes-3302f760f1461bc4582c99ee2e4ed0ccc1d5b186.zip
Don't toggle pause from a holded button
If you just holded the Select or Start buttons, it would be forever toggling pause/unpause, which is an unexpected behavior. Fix this by saving which value from the joypad was previously read. With this, whenever the pause timer reaches zero, we can check whether either button is still pressed, and avoid toggling if that is the case. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to '.nasm')
-rw-r--r--.nasm/memory.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/.nasm/memory.txt b/.nasm/memory.txt
index c47526d..95b5ea9 100644
--- a/.nasm/memory.txt
+++ b/.nasm/memory.txt
@@ -11,6 +11,7 @@ $0A: zp_rand
$10: zp_displayed
$11: zp_timer
$20: zp_flags
+$21: zp_prev
$22: zp_buttons1
$23: zp_buttons2
$24: zp_level