![]() |
Routines |
| Prev: 96D8 | Up: Map | Next: 97BD |
|
Used by the routine at draw_ship.
Called by draw_ship. The part the ship carries is kept at offset $1A of the player record (score; $FF none). When the ship is over the rocket's place (page column $52 pixel $5C) in page row 10 or above, the part is let go: a record is found for it (find_record_for_part) and filled as type $1E (update_rocket_part) at column $52 pixel $68 and the ship's height, falling with a Y velocity made from the ship's (its Y velocity word in bare_ship, negated) and a slight downward acceleration ($1B), to stop at row 10 at line $73 plus the part's Y offset (rocket_part_table). Part 6 is let go only when full -- when the ore loaded into it (a count in bare_ship, filled by load_ore) is 18 -- and falls with frame 8; its load and a byte of the player record are cleared. Then the ship carries nothing.
It all ran in the build's sessions (the deliveries of part 0 and of the ore tank).
|
||||
| drop_part | 9724 | LD A,(rocket_part_carried) | Carrying nothing | |
| 9727 | INC A | |||
| 9728 | RET Z | |||
| 9729 | LD A,(view_page_row) | Not over the rocket's place | ||
| 972C | CP $0B | |||
| 972E | RET NC | |||
| 972F | LD A,(view_page_column) | |||
| 9732 | CP $52 | |||
| 9734 | RET NZ | |||
| 9735 | LD A,(view_page_x) | |||
| 9738 | CP $5C | |||
| 973A | RET NZ | |||
| 973B | LD A,(rocket_part_carried) | Part 6 only when loaded with 18 | ||
| 973E | CP $06 | |||
| 9740 | JR NZ,drop_part_0 | |||
| 9742 | LD A,(ore) | |||
| 9745 | CP $12 | |||
| 9747 | RET NZ | |||
| 9748 | LD A,$08 | |||
| drop_part_0 | 974A | OR $80 | +$1F of the ship's record (part_being_fitted) gets $80 plus the part (or 8) | |
| 974C | LD (part_being_fitted),A | |||
| 974F | CALL find_record_for_part | A record, emptied | ||
| 9752 | CALL free_object | |||
| 9755 | LD HL,(ship_down_speed) | Its Y velocity, from the ship's | ||
| 9758 | LD A,L | |||
| 9759 | LD L,H | |||
| 975A | LD H,A | |||
| 975B | CALL negate_hl | |||
| 975E | LD (IX+$09),H | |||
| 9761 | LD (IX+$0A),L | |||
| 9764 | LD (IX+$10),$23 | Type $1E; top speed 4, and it cannot be shot; falling | ||
| 9768 | LD (IX+$0F),$1B | |||
| 976C | LD (IX+$00),$1E | |||
| 9770 | LD A,(rocket_part_carried) | Frame the part's number; it stops at line $73 plus the part's offset | ||
| 9773 | LD (IX+$13),A | |||
| 9776 | LD B,A | |||
| 9777 | ADD A,A | |||
| 9778 | ADD A,A | |||
| 9779 | ADD A,B | |||
| 977A | ADD A,$04 | |||
| 977C | LD HL,rocket_part_table | |||
| 977F | CALL add_a_to_hl | |||
| 9782 | LD B,(HL) | |||
| 9783 | LD A,$73 | |||
| 9785 | ADD A,B | |||
| 9786 | LD (IX+$16),A | |||
| 9789 | LD A,(view_page_row) | At the ship's height, column $52 pixel $68 | ||
| 978C | LD (IX+$04),A | |||
| 978F | LD (IX+$01),$52 | |||
| 9793 | LD (IX+$02),$68 | |||
| 9797 | LD A,(view_page_y) | |||
| 979A | LD (IX+$05),A | |||
| 979D | LD (IX+$0D),$FF | Flashing white; it stops in row 10 | ||
| 97A1 | LD (IX+$15),$0A | |||
| 97A5 | LD A,(rocket_part_carried) | Part 6: frame 8, emptied | ||
| 97A8 | CP $06 | |||
| 97AA | JR NZ,drop_part_1 | |||
| 97AC | LD (IX+$13),$08 | |||
| 97B0 | XOR A | |||
| 97B1 | LD (ore),A | |||
| 97B4 | LD (ore_kept),A | |||
| drop_part_1 | 97B7 | LD A,$FF | Nothing carried | |
| 97B9 | LD (rocket_part_carried),A | |||
| 97BC | RET | |||
| Prev: 96D8 | Up: Map | Next: 97BD |