![]() |
Routines |
| Prev: 45856 | Up: Map | Next: 45878 |
|
Used by the routine at UpdateShipSpeeds.
Keeps the vertical speed of the ship within its limits: no faster than 253 downwards, and no faster than half the value at VerticalLimit upwards.
|
||||||||||||
| LimitVerticalSpeed | 45858 | LD A,H | A=H. | |||||||||
| 45859 | BIT 7,A | Jump to LimitVerticalSpeed_Up if bit 7 of A is clear. | ||||||||||
| 45861 | JR Z,LimitVerticalSpeed_Up | |||||||||||
| 45863 | CP 254 | Return if A is 254 or more. | ||||||||||
| 45865 | RET NC | |||||||||||
| 45866 | LD H,253 | H=253. | ||||||||||
| 45868 | RET | Return. | ||||||||||
| LimitVerticalSpeed_Up | 45869 | LD A,(23615) | The vertical scroll limit. | |||||||||
| 45872 | SRL A | Shift A right. | ||||||||||
| 45874 | CP H | Return if A is H or more. | ||||||||||
| 45875 | RET NC | |||||||||||
| 45876 | LD H,A | H=A. | ||||||||||
| 45877 | RET | Return. | ||||||||||
| Prev: 45856 | Up: Map | Next: 45878 |