Prev: AA01 Up: Map Next: AA27
AA15: Bounce Vertically
Used by the routine at CheckMapObjectCollisions.
Makes the ship rebound after hitting something above or below it: the vertical speed of the ship is reversed and halved by ReverseAndHalveSpeed.
BounceVertically AA15 PUSH HL Stash HL on the stack.
AA16 LD HL,($C8EE) Fetch the word at C8EE into HL.
AA19 CALL ReverseAndHalveSpeed Call ReverseAndHalveSpeed.
AA1C LD ($C8EE),HL Update the high byte of the ship's vertical speed.
AA1F LD A,H A=H.
AA20 LD H,L H=L.
AA21 LD L,A L=A.
AA22 CALL UpdateVerticalScrollSpeed Call UpdateVerticalScrollSpeed.
AA25 POP HL Bring HL back off the stack.
AA26 RET Return.
Prev: AA01 Up: Map Next: AA27