Prev: CD58 Up: Map Next: CDAF
CD9E: How far an ending picture should move across this turn
Used by the routine at ENDING_VILLAIN.
Input
A where it is going (x)
IX its record
Output
A the difference from its x, kept to -4..4
STEP_TOWARDS_X CD9E SUB (IX+$0A) at or to the right of it: 0-4
CDA1 JR C,STEP_TOWARDS_X_0
CDA3 CP $04
CDA5 RET C
CDA6 LD A,$04
CDA8 RET
STEP_TOWARDS_X_0 CDA9 CP $FC to the left: -4 to -1
CDAB RET NC
CDAC LD A,$FC
CDAE RET
Prev: CD58 Up: Map Next: CDAF