Prev: 52544 Up: Map Next: 52637
52620: Test Move
Checks whether an object can move in the direction of its heading without going into a wall. A wall changes the speeds so that the object stops, and sets bit 0 of the flags.
Input
IX The address of the object
Output
F The carry flag is set if the object hit a wall
Clear bit 0 of the flags, then run the routine for the heading.
TestMove 52620 RES 0,(IX+7) Clear bit 0 of the flags of the object.
This entry point is used by the routines at HandleBullet and CheckWallsEachWay.
Run the routine for the heading, without clearing the flag.
CheckWalls 52624 LD A,(IX+6) Fetch the heading.
52627 RLCA Move the heading into the lowest two bits.
52628 RLCA
52629 AND %00000011 Keep only the heading.
52631 LD BC,52637 Point BC at CheckWallsRoutines.
52634 JP RunTableRoutine Jump to RunTableRoutine.
View the equivalent code in;
Prev: 52544 Up: Map Next: 52637