![]() |
Routines |
| Prev: DCDC | Up: Map | Next: DD01 |
|
Used by the routines at MONSTER112_UPDATE, SPARKLE_FLY, ANTIBODY_FLIGHT, OBJECT_FLIGHT, VILLAIN_WANDER and WALK_ON.
The step (+A, +B) is the speed along the one axis the record faces: U if bit 6 of the facing is set, V if not, negative if bit 7 is set. Only four directions; the random wanderers set their steps themselves (WANDER_STEP).
|
||||||||||
| SET_STEP | DCE0 | LD H,$00 | H (V) or L (U) the speed, the other 0 | |||||||
| DCE2 | LD L,A | |||||||||
| DCE3 | BIT 6,(IX+$06) | |||||||||
| DCE7 | JR NZ,SET_STEP_0 | |||||||||
| DCE9 | LD H,A | |||||||||
| DCEA | LD L,$00 | |||||||||
| SET_STEP_0 | DCEC | BIT 7,(IX+$06) | Facing -V or -U: negate both | |||||||
| DCF0 | JR Z,SET_STEP_1 | |||||||||
| DCF2 | LD A,L | |||||||||
| DCF3 | NEG | |||||||||
| DCF5 | LD L,A | |||||||||
| DCF6 | LD A,H | |||||||||
| DCF7 | NEG | |||||||||
| DCF9 | LD H,A | |||||||||
| SET_STEP_1 | DCFA | LD (IX+$0A),L | The step | |||||||
| DCFD | LD (IX+$0B),H | |||||||||
| DD00 | RET | |||||||||
| Prev: DCDC | Up: Map | Next: DD01 |