Prev: 8FED Up: Map Next: 9046
900E: Create shot from mine
Used by the routines at create_mines and display_mines.
create_shot_from_mine 900E LD HL,mine_countdown_to_shoot Decrement countdown
9011 DEC (HL) ...
9012 RET NZ Return if not 0
9013 LD IY,mines_background_data Mine data
9017 LD A,(IY+$04) Check if mine exists
901A OR (IY+$05) ...
901D JR Z,create_shot_from_mine_0 Skip ahead if not
901F LD HL,active_enemy_shots Increment enemy shots
9022 INC (HL) ...
9023 RST $28 Allocate sprite
9024 LD (IX+$00),$12 Missile
9028 LD (IX+$0B),$0A Set color
902C LD A,(IY+$07) Set polar y to mine polar y
902F LD (IX+$01),A ...
9032 LD A,(IY+$08) Set polar x to mine polar x
9035 LD (IX+$02),A ...
9038 RST $30 Load sprite pattern
create_shot_from_mine_0 9039 CALL stage_data_addr Get stage data address in IY
903C RST $20 Random number
903D AND $3F 0-63
903F ADD A,(IY+$06) Add ?
9042 LD (mine_countdown_to_shoot),A Set countdown to random value
9045 RET
Prev: 8FED Up: Map Next: 9046