mirror of
https://github.com/deater/tb1.git
synced 2024-12-22 13:29:48 +00:00
snes: another step closer to moving enemies
This commit is contained in:
parent
b99f48b7d5
commit
a6a8904c1c
@ -1,2 +1,2 @@
|
||||
.word $190 ; Complement of checksum
|
||||
.word $fe6f ; Unsigned 16-bit sum of ROM
|
||||
.word $f93f ; Complement of checksum
|
||||
.word $6c0 ; Unsigned 16-bit sum of ROM
|
||||
|
@ -1068,17 +1068,13 @@ move_enemies:
|
||||
; Move Enemies! (first thing, if no new added)
|
||||
;==============================================
|
||||
|
||||
; ldy #$0 ; point to enemies[0]
|
||||
ldy #$20 ; point to enemies[0]
|
||||
handle_enemies:
|
||||
|
||||
; tya
|
||||
; pha ; store y on stack
|
||||
|
||||
; lda (ENEMY_PL),Y ; get enemy[y].out
|
||||
; bne load_enemy_zero_page ; if enemy.out then we are good
|
||||
|
||||
; jmp skip_to_next_enemy ; enemy is not out, so skip to next
|
||||
jsr is_sprite_active ; set if enemy[y].out
|
||||
bcs load_enemy_zero_page ; if enemy.out then we are good
|
||||
|
||||
jmp skip_to_next_enemy ; enemy is not out, so skip to next
|
||||
|
||||
|
||||
;==========================================
|
||||
@ -1452,13 +1448,12 @@ save_from_zero_page:
|
||||
skip_to_next_enemy:
|
||||
|
||||
; pla ; get saved value of Y
|
||||
; clc
|
||||
; adc #$9 ; add 9 to point to next
|
||||
; tay
|
||||
|
||||
; cpy #NUM_ENEMIES*9 ; have we looped through them all?
|
||||
; beq draw_the_boss ; if not, loop
|
||||
; jmp handle_enemies
|
||||
iny
|
||||
|
||||
cpy #($20+NUM_ENEMIES) ; have we looped through them all?
|
||||
beq draw_the_boss ; if not, loop
|
||||
jmp handle_enemies
|
||||
|
||||
|
||||
;===================================================
|
||||
|
Loading…
Reference in New Issue
Block a user