Prev: B320 Up: Map Next: B336
B322: Clamp the ship's climb speed
Used by the routine at move_ship.
Down (negative) no faster than -3 and a fraction; up no faster than half the top climb (top_climb): 1, or 2 with add-on 5.
Input
H the whole part of the climb speed
clamp_climb B322 LD A,H falling: from -3.99 to -3.0 becomes -3 and the fraction
B323 BIT 7,A
B325 JR Z,clamp_climb_0
B327 CP $FE
B329 RET NC
B32A LD H,$FD
B32C RET
clamp_climb_0 B32D LD A,(top_climb) climbing: no more than top_climb / 2
B330 SRL A
B332 CP H
B333 RET NC
B334 LD H,A
B335 RET
Prev: B320 Up: Map Next: B336