Prev: 8E89 Up: Map Next: 8F0F
8E9D: Create mines
Used by the routine at create_or_display_mines.
create_mines 8E9D LD IY,ship_background_data Ship background data
8EA1 LD A,$80 Store name
8EA3 LD (mine_name),A ...
8EA6 LD A,($7004) Ship polar x
8EA9 ADD A,$08 Polar x + 8
8EAB AND $3F Mod 64
8EAD LD E,A E = new polar x
8EAE LD D,$17 D = polar y
8EB0 PUSH DE Save coordinates
8EB1 LD HL,three_spheres_graphics 3 spheres graphics (if double shot on)
8EB4 LD C,$40 Color
8EB6 LD A,(other_flags) Test double shot flag
8EB9 BIT 1,A ...
8EBB JR NZ,create_mines_0 If set then skip ahead
8EBD LD HL,mine_graphics Mine graphics (if double shot off)
8EC0 LD C,$90
create_mines_0 8EC2 CALL create_mine Create mine
8EC5 POP DE Restore coordinates
8EC6 PUSH DE Save coordinates
8EC7 LD A,E Polar x
8EC8 ADD A,$08 Polar x + 8
8ECA AND $3F Mod 64
8ECC LD E,A Set new polar x
8ECD LD HL,three_spheres_graphics 3 spheres graphics
8ED0 LD C,$40 Color
8ED2 CALL create_mine Create mine
8ED5 POP DE Restore coordinate
8ED6 LD A,E Polar x
8ED7 SUB $08 Polar x - 8
8ED9 AND $3F Mod 64
8EDB LD E,A Set new polar x
8EDC LD HL,three_spheres_graphics 3 spheres graphics
8EDF LD C,$40 Color
8EE1 CALL create_mine Create mine
8EE4 LD A,$02 Set action to display mines
8EE6 LD (mines_action),A ...
8EE9 INC A A = 3
8EEA LD (mines_left),A Set mines left
8EED LD HL,total_enemies Total enemies
8EF0 ADD A,(HL) Add 3
8EF1 LD (HL),A Save again
8EF2 XOR A
8EF3 LD (mines_movement_table_offset),A
8EF6 LD (mines_destroyed),A No mines destroyed
8EF9 INC A
8EFA LD (mine_countdown_to_shoot),A Set countdown to shoot to 1
8EFD CALL create_shot_from_mine Create shot from mine
8F00 CALL stage_data_addr Get stage data address in IY
8F03 LD A,(IY+$05)
8F06 LD (mines_time_left),A
8F09 LD A,$07 Play sound
8F0B CALL call_play_sound ...
8F0E RET
Prev: 8E89 Up: Map Next: 8F0F