Prev: 885F Up: Map Next: 88A7
8878: Enemy movement: Polar Y of enemy < $22
Used by the routine at create_enemy_shot_and_move.
L8878 8878 LD A,(sprite_countdown) Get sprite countdown
887B OR A Return if not zero
887C RET NZ ...
887D LD A,(IX+$03) Get counter
8880 CP $40 If >= $40
8882 JR NC,L88D4 Then jump to ...
8884 CALL stage_data_addr Get stage data address in IY
8887 RST $20 Random number
8888 AND (IY+$03) AND stage data byte 3 ($3F, $1F, $0F)
888B JR NZ,L88A7 If not all zeros, then jump (more likely on earlier stages)
888D DEC (IX+$01) Decrement polar y
8890 LD A,(IX+$01) Get polar y
8893 CP $08 If it's 8
8895 JR Z,L88BE_0 Then jump ahead
8897 RST $20 Random number
8898 AND $0F 0 - 15
889A JR NZ,L88BE If it's not 0 then jump ahead
This entry point is used by the routine at L88BE.
L8878_0 889C LD A,($7004) Ship polar x
889F CALL move_towards_x Move towards x
88A2 INC B
88A3 LD (IX+$03),B Set counter
88A6 RET Return to return_from_sprite_handler
Prev: 885F Up: Map Next: 88A7