![]() |
Routines |
| Prev: B952 | Up: Map | Next: B963 |
|
Used by the routines at BlockMovementInX, BlockMovementInY, BlockMovementInZ, KeepObjectInRoomInX, KeepObjectInRoomInY and StopObjectAtFloor.
Moves a signed value one step closer to zero.
|
||||||||||||||
| BringSpeedCloserToZero | B95A | AND A | Return if the value is zero. | |||||||||||
| B95B | RET Z | |||||||||||||
| B95C | JP P,BringSpeedCloserToZero_Subtract | Jump to BringSpeedCloserToZero_Subtract if the value is positive. | ||||||||||||
| B95F | INC A | Add two to a negative value... | ||||||||||||
| B960 | INC A | |||||||||||||
| BringSpeedCloserToZero_Subtract | B961 | DEC A | ...and subtract one from a positive value (or one from the two added to a negative value). | |||||||||||
| B962 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: B952 | Up: Map | Next: B963 |