From 603ea33edf6c44684348949ab2685e1944affb15 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 22 Aug 2019 12:45:58 -0400 Subject: [PATCH] ootw: laser: aliens shooting lasers now --- ootw/alien_laser.s | 3 ++- ootw/collision.s | 2 ++ ootw/laser.s | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ootw/alien_laser.s b/ootw/alien_laser.s index af2a4ddc..288c1227 100644 --- a/ootw/alien_laser.s +++ b/ootw/alien_laser.s @@ -63,7 +63,8 @@ alien_laser_left: ldx LASER_TEMP lda alien_x,X -; dex + sec + sbc #2 sta laser1_end ; txa diff --git a/ootw/collision.s b/ootw/collision.s index aa23e478..47fceda2 100644 --- a/ootw/collision.s +++ b/ootw/collision.s @@ -483,6 +483,8 @@ calc_gun_left_alien_loop: lda COLLISION_X cmp alien_x,X + beq calc_gun_left_alien_continue ; if exact equal + ; might be ourselves bcc calc_gun_left_alien_continue ; blt ; only if closer than previous found diff --git a/ootw/laser.s b/ootw/laser.s index aa0c632a..dc15ac8b 100644 --- a/ootw/laser.s +++ b/ootw/laser.s @@ -262,6 +262,9 @@ no_move_laser: inc laser_count,X done_move_laser: + inx + cpx #MAX_LASERS + bne move_laser_loop rts @@ -335,8 +338,8 @@ laser_hit_friend: ; jmp done_hit_something done_hit_something: - - rts + jmp done_move_laser +; rts