Prev: C05A Up: Map Next: C12E
C0E0: Handle collision detection for BLOB
Used by the routine at C14D.
C0E0 LD A,(IX+$01) if y-position for BLOB greater than $A0 and less than $10 then jump to change movement
C0E3 CP $A0
C0E5 JP NC,$C119
C0E8 CP $10
C0EA JP C,$C119
C0ED LD A,(IX+$00) if x-position for BLOB greater then $F0 and less than $10 then jump to change movement
C0F0 CP $F0
C0F2 JP NC,$C119
C0F5 CP $10
C0F7 JP C,$C119
C0FA LD A,(IX+$00) Set A0AF the new x-position based on x-delta
C0FD ADD A,(IX+$04)
C100 LD ($A0AF),A
C103 LD A,(IX+$01) Set A0B0 the new y-position based on y-delta
C106 ADD A,(IX+$05)
C109 LD ($A0B0),A
C10C LD A,(IX+$02) Set A to the direction of BLOB
C10F CALL $A503 Computes into HL address of tile buffer for the tile under BLOB
C112 LD DE,$0021
C115 ADD HL,DE
C116 LD A,(HL) Check tile type
C117 OR A Return if tile is background
C118 RET Z
C119 LD A,(IX+$04) Invert x-delta
C11C NEG
C11E LD (IX+$04),A
C121 LD A,(IX+$05) Invert y-delta
C124 NEG
C126 LD (IX+$05),A
C129 LD (IX+$11),$04 Reset state change counter
C12D RET
Prev: C05A Up: Map Next: C12E