aboutsummaryrefslogtreecommitdiff
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
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>
-rw-r--r--.nasm/segments.txt2
-rw-r--r--src/driver.s13
2 files changed, 14 insertions, 1 deletions
diff --git a/.nasm/segments.txt b/.nasm/segments.txt
index 7f0b6d9..5d8e4c8 100644
--- a/.nasm/segments.txt
+++ b/.nasm/segments.txt
@@ -1,4 +1,4 @@
- HEADER: 16/16 (100%)
-- ROM0: 9201/32762 (28.08%)
+- ROM0: 9216/32762 (28.13%)
- ROMV: 6/6 (100%)
- ROM2: 8192/8192 (100%)
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