Prev: 8934 Up: Map Next: 8986
8970: Reverse Vertical Speed
Used by the routine at FireShot.
Part of FireShot. Sets a random speed and, unless the object is moving fast, reverses its vertical direction.
Input
IX Address of the shot
IY Address of the object
ReverseVerticalSpeed 8970 CALL SetRandomSpeed Give the object a random speed.
8973 LD A,(IX+$12) Fetch the second state byte of the shot.
8976 CP $67 Jump to FireShot_Sound if it is 67 or higher.
8978 JP NC,FireShot_Sound
897B LD A,(IY+$09) Fetch the vertical speed of the object.
897E NEG Negate it.
8980 LD (IY+$09),A Store it.
8983 JP FireShot_Sound Jump to FireShot_Sound.
Prev: 8934 Up: Map Next: 8986