![]() |
Routines |
| Prev: 47442 | Up: Map | Next: 47459 |
|
Used by the routines at BlockMovementInX, BlockMovementInY, BlockMovementInZ, KeepObjectInRoomInX, KeepObjectInRoomInY and StopObjectAtFloor.
Moves a signed value one step closer to zero.
|
||||||||||||||
| BringSpeedCloserToZero | 47450 | AND A | Return if the value is zero. | |||||||||||
| 47451 | RET Z | |||||||||||||
| 47452 | JP P,BringSpeedCloserToZero_Subtract | Jump to BringSpeedCloserToZero_Subtract if the value is positive. | ||||||||||||
| 47455 | INC A | Add two to a negative value... | ||||||||||||
| 47456 | INC A | |||||||||||||
| BringSpeedCloserToZero_Subtract | 47457 | DEC A | ...and subtract one from a positive value (or one from the two added to a negative value). | |||||||||||
| 47458 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 47442 | Up: Map | Next: 47459 |