Prev: 944C Up: Map Next: 9494
9457: Update routine for type $1C, the bullets, pick-ups and wreck pieces
The small things: what the attackers drop (attacker_fires), the pick-ups, and the five pieces of the ship's wreck (wreck_ship). The frame picks the contact effect (small_object_effects). A wreck piece (+$14 = 2) accelerates (accelerate); the others fly straight. The ship icon and the ball (frames 8 and 9) keep their frame; the rest animate. Each lives as many passes as +$15 says, then explodes, and explodes at once on touching the landscape (move_or_explode).
Input
IX The record
update_small_object 9457 LD A,(IX+$13) Contact effect by frame
945A AND $0F
945C LD HL,small_object_effects
945F CALL add_a_to_hl
9462 LD A,(HL)
9463 LD (contact_effect),A
9466 LD A,(IX+$14) A wreck piece accelerates
9469 CP $02
946B CALL Z,accelerate
946E LD A,(IX+$13) The ship icon and the ball: a 42-wide box, no animation
9471 AND $0F
9473 CP $08
9475 LD C,$2A
9477 JR Z,update_small_object_0
9479 CP $09
947B JR Z,update_small_object_0
947D CALL animate_object The rest animate, 24 wide
9480 LD C,$18
update_small_object_0 9482 LD B,$18 24 high; move, or explode on the landscape
9484 CALL move_or_explode
9487 DEC (IX+$15) Count its life down; at 0 it explodes; place and draw it
948A JP NZ,place_draw
948D SET 3,(IX+$17)
9491 JP place_draw
Prev: 944C Up: Map Next: 9494