Prev: 9507 Up: Map Next: 955F
9524: Update routine for type $1E, a rocket part falling into place
Reached through the type table at object_handlers (its last word). A part the ship has let go of (drop_part) falls under its own acceleration, harmless to touch apart from a push (effect $10), and does not test the landscape. It stops when it reaches its place -- page row +$15 and the line in +$16, set by drop_part -- and is freed: as soon as it is in that row with its line at or below the slot's, so a part let go no higher than its slot is freed on its first pass without falling (run in SkoolKit's simulator for the Animations page); the parts delivered (offset $1B of the player record, score) go up by one and the player scores 1500. Then it is drawn (draw_object, the tail of update_attacker).
Input
IX The part's record
update_rocket_part 9524 LD A,$10 Push only
9526 LD (contact_effect),A
9529 CALL accelerate Accelerate, and move
952C CALL move_object
952F LD A,(IX+$04) At its page row and line: free it
9532 CP (IX+$15)
9535 JR NZ,update_rocket_part_0
9537 LD A,(IX+$05)
953A CP (IX+$16)
953D JR C,update_rocket_part_0
953F SET 4,(IX+$10)
update_rocket_part_0 9543 CALL place_object Place it (freed now if marked)
9546 PUSH HL Freed?
9547 LD HL,(current_object)
954A LD A,(HL)
954B INC A
954C JR NZ,update_rocket_part_1
954E LD A,(parts_built) One more part delivered, and 1500 points
9551 INC A
9552 LD (parts_built),A
9555 LD BC,$1500
9558 CALL add_score
update_rocket_part_1 955B POP HL Draw it
955C JP draw_object
Prev: 9507 Up: Map Next: 955F