Prev: 39898 Up: Map Next: 40229
40206: Check Beam Hit
Used by the routine at UpdateBeams.
Checks whether the ship is touching a beam, and if so hurts it.
CheckBeamHit 40206 LD A,(38571) Fetch the delivery flag from 38571.
40209 AND A Test it.
40210 RET NZ Return if it is set.
40211 LD E,1 Set the height of the beam to one pixel.
40213 CALL TestBoxAgainstShip Test whether the beam touches the hit box of the ship.
40216 LD A,(23580) Fetch the result of the test.
40219 AND A Test it.
40220 RET Z Return if the beam missed.
40221 LD A,16 Wait 16 frames before the beam can hurt the ship again.
40223 LD (40239),A Store the delay.
40226 JP DamageShip_Hit Damage the ship.
Prev: 39898 Up: Map Next: 40229