From 53b6d7eb0461d63f580c5a2612b71a735a5ecba1 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 6 Mar 2026 23:23:03 +0100 Subject: Fix bounce up for cross enemies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some old code was checking on the kind of level and skipping the bottom check if it was a half-sized enemy. However, the 'bounce' algorithm is not used by any half-sized enemy. Thus, the check can be removed entirely. Signed-off-by: Miquel Sabaté Solà --- src/enemies.s | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src') diff --git a/src/enemies.s b/src/enemies.s index b4511e6..b6005fc 100644 --- a/src/enemies.s +++ b/src/enemies.s @@ -872,7 +872,7 @@ inc Globals::zp_arg1 inc Globals::zp_arg1 jsr Background::collides - beq @check_front_or_bottom + beq @prepare_check_front_collision ;; There was a (hopefully purely) upper collision! @bounce_down: @@ -891,16 +891,6 @@ rts - ;; Now, depending on the level, the enemy might be the regular size or - ;; shorter. If it's on the shorter end, then move to check the bottom - ;; corners directly. - @check_front_or_bottom: - lda Globals::zp_level_kind - cmp #2 - beq @prepare_check_front_collision - cmp #1 - bne @check_bottom - @prepare_check_front_collision: ;; We are checking the "front" (center) of the enemy, which corresponds ;; to the regular sized enemy. This means to increase the Y tile -- cgit v1.2.3