Prev: D7D8 Up: Map Next: D80C
D7ED: Update Shot
The routine for objects of type 50 to 5F, the shots that the player fires. A shot moves in a straight line, and turns into a burst when it hits something.
Move the shot along both axes.
UpdateShot D7ED LD A,(IX+$05) Set the velocity of the shot from its speed and direction.
D7F0 CALL SetVelocityFromSpeed
D7F3 CALL NextSpriteNumber Change the sprite of the shot.
D7F6 CALL TestMove Check whether the scenery blocks the move along one axis.
D7F9 CALL MoveObject Move the shot.
D7FC CALL TestMove_Keep Check whether the scenery blocks the move along the other axis.
D7FF CALL MoveObject Move the shot.
Burst if the shot has hit something.
D802 BIT 0,(IX+$07) Return if the shot has not hit anything.
D806 RET Z
D807 LD (IX+$00),$0C Turn the shot into a burst and return.
D80B RET
Prev: D7D8 Up: Map Next: D80C