Prev: FA83 Up: Map Next: FC1C
FC07: Step a position along x, if x is moving
Used by the routines at MEET_DECOY and STEP_ALL_AXES.
Two units, or one when z is moving too. The way is bit 2 of the direction in WORK_DIRECTION: set for -x, clear for +x (bit 3).
Input
C The axes moving: bit 0 x, bit 1 y, bit 2 z
B x
Output
B x after the step
STEP_ALONG_X FC07 BIT 0,C x not moving
FC09 RET Z
FC0A BIT 2,(IY+WORK_DIRECTION-V) Which way?
FC0E JR Z,STEP_ALONG_X_0
FC10 DEC B -x: one, or two if z is not moving
FC11 BIT 2,C
FC13 RET NZ
FC14 DEC B
FC15 RET
STEP_ALONG_X_0 FC16 INC B +x the same
FC17 BIT 2,C
FC19 RET NZ
FC1A INC B
FC1B RET
Prev: FA83 Up: Map Next: FC1C