Prev: 9E0E Up: Map Next: 9E48
9E2F: Aim Flame At Player
Used by the routine at ChooseFlameDirection.
Sets the velocity of a flame so that it heads in the direction of the player: the X velocity is C0 (left) or 40 (right) and the Y velocity is set to 40 (down). If the player is above the flame then the code at AimFlameUp writes 40 to the X velocity again instead of changing the Y velocity, so the Y velocity is left as it was.
Input
IX Flame record
AimFlameAtPlayer 9E2F LD A,($9705) Fetch the X position of the player from 9705.
9E32 CP (IX+$03) Jump to AimFlameLeft if the player is to the left of the flame.
9E35 JR C,AimFlameLeft
9E37 LD (IX+$06),$40 Set the X velocity of the flame to 40 (moving right).
This entry point is used by the routine at AimFlameLeft.
AimFlameAtPlayer_Vertical 9E3B LD A,($9706) Fetch the Y position of the player from 9706.
9E3E CP (IX+$04) Jump to AimFlameUp if the player is above the flame.
9E41 JR C,AimFlameUp
9E43 LD (IX+$07),$40 Set the Y velocity of the flame to 40 (moving down).
9E47 RET Return.
Prev: 9E0E Up: Map Next: 9E48