mirror of https://github.com/deater/tb1.git
snes: better enemy movement
This commit is contained in:
parent
da4593e688
commit
4acb1d16c8
|
@ -1,2 +1,2 @@
|
||||||
.word $e6b2 ; Complement of checksum
|
.word $d328 ; Complement of checksum
|
||||||
.word $194d ; Unsigned 16-bit sum of ROM
|
.word $2cd7 ; Unsigned 16-bit sum of ROM
|
||||||
|
|
|
@ -1110,11 +1110,11 @@ move_enemy_x:
|
||||||
|
|
||||||
lsr A
|
lsr A
|
||||||
|
|
||||||
; cmp ENEMY_XMIN ; are we less than xmin?
|
cmp ENEMY_XMIN ; are we less than xmin?
|
||||||
; bmi switch_dir_enemy_x ; if so, switch direction
|
bmi switch_dir_enemy_x ; if so, switch direction
|
||||||
|
|
||||||
; cmp ENEMY_XMAX ; are we greater than xmax?
|
cmp ENEMY_XMAX ; are we greater than xmax?
|
||||||
; bpl switch_dir_enemy_x ; if so, switch direction
|
bpl switch_dir_enemy_x ; if so, switch direction
|
||||||
|
|
||||||
jmp move_enemy_y
|
jmp move_enemy_y
|
||||||
|
|
||||||
|
@ -1164,26 +1164,21 @@ no_y_special_case:
|
||||||
lsr A
|
lsr A
|
||||||
lsr A
|
lsr A
|
||||||
|
|
||||||
; cmp #$12 ; is y<=12?
|
cmp #50 ; is y<=12?
|
||||||
; bmi done_enemy_y ; if so no need to do anything
|
bmi done_enemy_y ; if so no need to do anything
|
||||||
; beq done_enemy_y
|
beq done_enemy_y
|
||||||
|
|
||||||
; off screen
|
; off screen
|
||||||
|
|
||||||
; pla ; pop saved Y off stack
|
jsr deactivate_sprite ; set enemy[i].out=0
|
||||||
; tay
|
|
||||||
; pha ; push y back on stack
|
|
||||||
|
|
||||||
; lda #$0
|
dec TOTAL_ENEMIES_OUT
|
||||||
; sta (ENEMY_PL),Y ; set enemy[i].out=0
|
|
||||||
|
|
||||||
; dec TOTAL_ENEMIES_OUT
|
lda BONUS_FLAGS
|
||||||
|
and #<(~PERFECT_KILLS)
|
||||||
|
sta BONUS_FLAGS
|
||||||
|
|
||||||
; lda BONUS_FLAGS
|
jmp skip_to_next_enemy ; skip to next enemy
|
||||||
; and #<(~PERFECT_KILLS)
|
|
||||||
; sta BONUS_FLAGS
|
|
||||||
|
|
||||||
; jmp skip_to_next_enemy ; skip to next enemy
|
|
||||||
|
|
||||||
|
|
||||||
done_enemy_y:
|
done_enemy_y:
|
||||||
|
|
Loading…
Reference in New Issue