![]() |
Routines |
| Prev: CF48 | Up: Map | Next: CF5F |
|
Used by the routine at TestMoveRight.
Checks whether an object that is moving in the direction of heading one touches a wall in the cell containing a point. If it does, HorizontalSpeed is reduced by twice the depth and the object is marked as having hit a wall.
|
||||||||||||||||
|
Check the walls, then push the object back if it is touching one.
|
||||||||||||||||
| CheckWallHorizontal | CF50 | CALL CheckWallsVerticalFirst | Call CheckWallsVerticalFirst. | |||||||||||||
| CF53 | RET NC | Return if the object is not touching a wall. | ||||||||||||||
|
This entry point is used by the routine at CheckWallHorizontalReverse.
Reduce HorizontalSpeed by twice the depth.
|
||||||||||||||||
| CheckWallHorizontal_PushBack | CF54 | ADD A,A | Double the depth and keep it in C. | |||||||||||||
| CF55 | LD C,A | |||||||||||||||
| CF56 | LD A,($A214) | Fetch HorizontalSpeed. | ||||||||||||||
| CF59 | ADD A,C | Add the depth and set HorizontalSpeed. | ||||||||||||||
| CF5A | LD ($A214),A | |||||||||||||||
| CF5D | JR CheckWall_Hit | Jump to CheckWall_Hit. | ||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||
| Prev: CF48 | Up: Map | Next: CF5F |