Prev: C14D Up: Map Next: C213
C1CA: Handle lateral collision detection for POD and MINE LAYER and shot for MINE LAYER
Used by the routine at BFEF.
C1CA LD A,(IX+$02) Jump to handle right collision detection if enemy moves right
C1CD OR A
C1CE CALL Z,$C3E0
C1D1 LD A,(IX+$02) Jump ot handle left collision detection if enemy moves left
C1D4 OR A
C1D5 CALL NZ,$C4A6
C1D8 LD A,(IX+$09) Return if enemy is not a MINE LAYER
C1DB CP $0D
C1DD RET NZ
C1DE CALL $A375 Set A to a pseudo random number
C1E1 CP $F0 Return if number less than $F0
C1E3 RET C
release a Mine
C1E4 LD A,(IX+$00) Set A093 to the x-position for the MINE
C1E7 ADD A,$08
C1E9 LD ($A093),A
C1EC LD A,(IX+$01) Set A095 to the y-position for the MINE
C1EF ADD A,$04
C1F1 LD ($A095),A
Create a new Mine
C1F4 PUSH IX Save IX
C1F6 CALL $D858 Check for an avaliable slot into Enemy configuration buffer to configure the mine
C1F9 CALL $CDD8 Configure a mine
C1FC LD (IX+$09),$0E Set enemy type to MINE
C200 LD (IX+$0C),$01 Set mine alive/visible
C204 LD A,($A093) Set mine x-position
C207 LD (IX+$00),A
C20A LD A,($A095) Set mine y-position
C20D LD (IX+$01),A
C210 POP IX Restore IX
C212 RET
Prev: C14D Up: Map Next: C213