aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-04-06 21:43:44 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-04-06 21:43:44 +0200
commitf9ca8ca80b9d0cf0d54f9aa59a3fbb517c37fc9c (patch)
treec915ce9da9092e3624ba192092ae3b6c5ada566a /src
parentae15803a88f82a16ceb08ebf0a17f5c0e9e31c4e (diff)
downloadjetpac.nes-f9ca8ca80b9d0cf0d54f9aa59a3fbb517c37fc9c.tar.gz
jetpac.nes-f9ca8ca80b9d0cf0d54f9aa59a3fbb517c37fc9c.zip
Clear out sprites after the take off animation
This was hidden before commit 134c671e18b6 ("Cancel the take off animation before shuttle change"), as the sprites and the background matched perfectly. That wasn't the case in the case where the shuttle kind was to change. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src')
-rw-r--r--src/driver.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/driver.s b/src/driver.s
index 1bcef27..fca43f1 100644
--- a/src/driver.s
+++ b/src/driver.s
@@ -892,6 +892,19 @@
lda #$80
sta Driver::zp_flags
+ ;; Clear the sprites from the animation now, as it will be distracting
+ ;; before the player et al are initialized.
+ ldx #0
+ lda #$FF
+ @clear_loop:
+ sta OAM::m_sprites, x
+ inx
+ inx
+ inx
+ inx
+ cpx #(12 * 4) ; NOTE: 12 sprites from the shuttle.
+ bne @clear_loop
+
;; Increase the level :)
inc Globals::zp_level
lda Globals::zp_level