diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-02 07:51:13 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-02 07:51:13 +0200 |
| commit | 98e1b21daf3b9ed2fa4fb38dde3c94c6a9f0a459 (patch) | |
| tree | 83da66f8af265abb1841a7a11045781e427778b7 | |
| parent | 1272d402ce2651e4e3966ecd2af2417eea66b0a3 (diff) | |
| download | jetpac.nes-98e1b21daf3b9ed2fa4fb38dde3c94c6a9f0a459.tar.gz jetpac.nes-98e1b21daf3b9ed2fa4fb38dde3c94c6a9f0a459.zip | |
Fix wrong initialization on shuttle reassemble
The shuttle should be reassembled every 4 stages, not 8. I did not
remember well how this worked and I jumped ahead with the conveniency of
the 'Globals::zp_level_kind' variable.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
| -rw-r--r-- | .nasm/segments.txt | 2 | ||||
| -rw-r--r-- | src/items.s | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/.nasm/segments.txt b/.nasm/segments.txt index 2d03c64..a741401 100644 --- a/.nasm/segments.txt +++ b/.nasm/segments.txt @@ -1,4 +1,4 @@ - HEADER: 16/16 (100%) -- ROM0: 9114/32762 (27.82%) +- ROM0: 9120/32762 (27.84%) - ROMV: 6/6 (100%) - ROM2: 8192/8192 (100%) diff --git a/src/items.s b/src/items.s index 164d5b7..9ad1aba 100644 --- a/src/items.s +++ b/src/items.s @@ -130,7 +130,9 @@ .proc init_level ldx #0 - lda Globals::zp_level_kind + ;; We have to re-assemble the shuttle every 4 stages. + lda Globals::zp_level + and #$03 bne @other_screens ;; Zero out the state except for the 'C' bit. @@ -640,9 +642,10 @@ bit Items::zp_state bmi @next - ;; We don't need extra precautions except when the level kind is the - ;; first one. In that case we must guarantee the right shuttle order. - lda Globals::zp_level_kind + ;; We don't need extra precautions except when we are re-arrenging the + ;; shuttle. In that case we must guarantee the right shuttle order. + lda Globals::zp_level + and #$03 bne @do_follow_player ;; Is this the first shuttle part to be collected? @@ -1005,7 +1008,8 @@ .proc prepare_background_scene jsr draw_low_part_shuttle - lda Globals::zp_level_kind + lda Globals::zp_level + and #$03 beq @end @rest_of_the_rocket: |
