From 98e1b21daf3b9ed2fa4fb38dde3c94c6a9f0a459 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 2 Apr 2026 07:51:13 +0200 Subject: Fix wrong initialization on shuttle reassemble MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- src/items.s | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') 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: -- cgit v1.2.3