diff --git a/ootw/Makefile b/ootw/Makefile index 1d501f8b..634eb4fd 100644 --- a/ootw/Makefile +++ b/ootw/Makefile @@ -98,7 +98,7 @@ ootw_c4.o: ootw_c4.s \ gr_putsprite.s gr_putsprite_flipped.s gr_putsprite_crop.s \ keyboard.s gr_run_sequence.s physicist.s \ ootw_c4_city.s ootw_c4_action.s \ - door.s laser.s shield.s blast.s \ + door.s laser.s shield.s blast.s charger.s \ ootw_graphics/sprites/physicist.inc \ ootw_graphics/l4city/ootw_c4_city.inc ca65 -o ootw_c4.o ootw_c4.s -l ootw_c4.lst diff --git a/ootw/charger.s b/ootw/charger.s new file mode 100644 index 00000000..bac057a7 --- /dev/null +++ b/ootw/charger.s @@ -0,0 +1,217 @@ + + ;====================== + ;====================== + ; draw charger + ;====================== + ;====================== +draw_charger: + + lda #6 + sta XPOS + lda #24 + sta YPOS + + lda CHARGER_COUNT + tay + + lda charger_sequence_lo,Y + sta INL + + lda charger_sequence_hi,Y + sta INH + + jsr put_sprite + + lda FRAMEL ; slow it down + and #$7 + bne done_drawing_charger + + inc CHARGER_COUNT + lda CHARGER_COUNT + cmp #11 + bne done_drawing_charger + + lda #200 ; actually charge + sta GUN_CHARGE + + lda #0 + sta CHARGER_COUNT + +done_charging: + +done_drawing_charger: + + + rts + +charger_sequence_hi: + .byte >zapper1_sprite + .byte >zapper2_sprite + .byte >zapper3_sprite + .byte >zapper4_sprite + .byte >zapper5_sprite + .byte >zapper6_sprite + .byte >zapper7_sprite + .byte >zapper8_sprite + .byte >zapper9_sprite + .byte >zapper10_sprite + .byte >zapper11_sprite + +charger_sequence_lo: + .byte