aboutsummaryrefslogtreecommitdiff
path: root/src/interrupts.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-03-23 23:59:26 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-03-23 23:59:26 +0100
commit0c9b0ad7938e2ba7e994574b4947e25c82440b8c (patch)
treecb6721fc9689104463b5a71ca02303299486af9e /src/interrupts.s
parentfb23cf51040f06bfcfbaf318d7b452d76ffbedfb (diff)
downloadjetpac.nes-0c9b0ad7938e2ba7e994574b4947e25c82440b8c.tar.gz
jetpac.nes-0c9b0ad7938e2ba7e994574b4947e25c82440b8c.zip
Implement the "take off" animation
This is the animation that is done after clearing a stage. Moreover, and for the first time since I started development, now we can move into the next level as intended from the game's design. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/interrupts.s')
-rw-r--r--src/interrupts.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interrupts.s b/src/interrupts.s
index 2c78099..6c7e75b 100644
--- a/src/interrupts.s
+++ b/src/interrupts.s
@@ -103,8 +103,18 @@
tax
and #%00100000
beq @game_status
+
+ ;; Yes! Then, if there are no collected items, we just clear out the shuttle
+ ;; entirely (i.e. it's the shuttle take off animation), otherwise we go into
+ ;; the usual route.
+ lda Items::zp_collected
+ bne @do_update_shuttle
+ jsr Background::clear_shuttle
+ jmp @unset_shuttle_flag
+@do_update_shuttle:
jsr Items::update_shuttle
+@unset_shuttle_flag:
;; And unset the flag.
lda Globals::zp_flags
and #%11011111