diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-05 23:57:16 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-05 23:57:16 +0200 |
| commit | 134c671e18b6617b1ac2417ff4efaa8c6b8fc4b6 (patch) | |
| tree | e4faa3e422f2421453c482d6a4efb0af5aac98d1 | |
| parent | 193231c11e89bdec2e027a1ea6822281df2bf6bf (diff) | |
| download | jetpac.nes-134c671e18b6617b1ac2417ff4efaa8c6b8fc4b6.tar.gz jetpac.nes-134c671e18b6617b1ac2417ff4efaa8c6b8fc4b6.zip | |
Cancel the take off animation before shuttle change
Just as it was on the original game, if we cleared the stage right
before changing the shuttle kind, then we don't go down again.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
| -rw-r--r-- | .nasm/segments.txt | 2 | ||||
| -rw-r--r-- | src/driver.s | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/.nasm/segments.txt b/.nasm/segments.txt index a63d9cd..e98dba4 100644 --- a/.nasm/segments.txt +++ b/.nasm/segments.txt @@ -1,4 +1,4 @@ - HEADER: 16/16 (100%) -- ROM0: 9187/32762 (28.04%) +- ROM0: 9195/32762 (28.07%) - ROMV: 6/6 (100%) - ROM2: 8192/8192 (100%) diff --git a/src/driver.s b/src/driver.s index 67cba5c..1bcef27 100644 --- a/src/driver.s +++ b/src/driver.s @@ -870,14 +870,22 @@ ;; Flip the 'D' bit. If doing so results on a zero bit, then we know we ;; are back at the ground and hence we should stop the - ;; animation. Otherwise we should store the result so we move downwards - ;; next time. + ;; animation. lda Driver::zp_flags eor #$02 tax and #$02 + beq @over + + ;; If in the next level the shuttle kind will change, then we call off + ;; the animation, as it happened in the original game. Otherwise we + ;; should store the result so we move downwards next time. + lda Globals::zp_level + and #$03 + cmp #$03 bne @set + @over: ;; The animation is over. Reset the flags to the expected 'S' one. Not ;; that we care too much about it, but at least we will be consistent ;; with player's death and other scenarios like that. |
