![]() |
Routines |
| Prev: 57355 | Up: Map | Next: 57376 |
|
Used by the routine at TestMoveRight.
Tests an object that is moving to the right (along the positive X axis) against the walls in one cell. If the object hits a wall then its velocity along the X axis is reduced by twice the depth that it has gone into the wall, and the flag for a collision is set.
|
||||||||||||||||
|
Check the walls, then push the object back if it is touching one.
|
||||||||||||||||
| TestCellMovingRight | 57363 | CALL CheckWallsVerticalFirst | Check whether the object hits a wall in the cell. | |||||||||||||
| 57366 | RET NC | Return if it did not. | ||||||||||||||
|
This entry point is used by the routine at TestCellMovingLeft.
Reduce the velocity along the X axis.
|
||||||||||||||||
| ReduceVelocityX | 57367 | ADD A,A | Double the depth. | |||||||||||||
| 57368 | ADD A,(IX+10) | Add it to the velocity along the X axis, which stops the object at the wall. | ||||||||||||||
| 57371 | LD (IX+10),A | |||||||||||||||
| 57374 | JR SetCollisionFlag | Jump to SetCollisionFlag to set the flag for a collision. | ||||||||||||||
| Prev: 57355 | Up: Map | Next: 57376 |