From 23c56bec0fd1b8eb7bc7d744ab6913ea85cf9cf1 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 14 Aug 2019 15:48:48 -0400 Subject: [PATCH] ootw: c4: clean up loose ends with blast remove now unneeded ZP usage add head to end of blast --- ootw/blast.s | 21 ++++++++++++++++++++- ootw/ootw_c4_city.s | 23 ----------------------- ootw/zp.inc | 8 ++------ 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/ootw/blast.s b/ootw/blast.s index b771ec5b..4159368e 100644 --- a/ootw/blast.s +++ b/ootw/blast.s @@ -79,7 +79,7 @@ draw_blast: lda blast0_out beq done_draw_blast - lda #$f6 + lda #$fe sta hlin_color_smc+1 lda #$00 @@ -96,6 +96,25 @@ draw_blast: jsr hlin + ldy blast0_y + sty YPOS + + lda blast0_direction + beq blast_going_left + ldy blast0_end + jmp blast_going_done +blast_going_left: + ldy blast0_start +blast_going_done: + sty XPOS + + lda #gun_charge_sprite8 + sta INH + + jsr put_sprite_crop + done_draw_blast: rts diff --git a/ootw/ootw_c4_city.s b/ootw/ootw_c4_city.s index 5521e2f8..44a5f5fe 100644 --- a/ootw/ootw_c4_city.s +++ b/ootw/ootw_c4_city.s @@ -662,29 +662,6 @@ no_fire_laser: jsr handle_gun - ;================ - ; activate_shield - ;================ - -; lda ACTIVATE_SHIELD -; beq no_activate_shield -; jsr activate_shield -;no_activate_shield: -; lda #0 -; sta ACTIVATE_SHIELD - - ;================ - ; fire blast - ;================ - -; lda ACTIVATE_BLAST -; beq no_fire_blast -; jsr fire_blast -;no_fire_blast: -; lda #0 -; sta ACTIVATE_BLAST - - ;================ ; draw gun effect ;================ diff --git a/ootw/zp.inc b/ootw/zp.inc index eed96858..cc5ac659 100644 --- a/ootw/zp.inc +++ b/ootw/zp.inc @@ -118,13 +118,9 @@ LZ4_DONE = $96 ; More zero-page addresses ; we try not to conflict with anything DOS, MONITOR or BASIC related -GUN_FIRE = $D4 ; 2+ +GUN_FIRE = $D6 ; 2+ -GUN_STATE = $D5 ; 2+ - -ACTIVATE_BLAST = $D6 ; 2+ - -ACTIVATE_SHIELD = $D7 ; 2+ +GUN_STATE = $D7 ; 2+ BLAST_OUT = $D8 ; 2+