![]() |
Routines |
| Prev: ABA6 | Up: Map | Next: AC08 |
|
Used by the routine at update_ground_objects.
For each ground object that is not a pick-up, is on the screen, is not already dissolving and is not of kind $0B, while the special beam is out (special_beam_on): its box is set from where it was drawn (object_box), the beam's record found (find_special_beam, which leaves IY at it) and tested against the box (the entry near the start of test_player_shots, through test_shot_box). Kind $0B (a ringed planet, by its picture) is the one kind the beam cannot destroy. If that started the object dissolving (bit 3 of +$17), it is marked gone in map_object_kinds. Then, for graphic $0D only: an ore deposit (kind 8 to $0A) gives its kind to the beam's +$13, which brings the ore back to the tank (load_ore); kinds 6 and 7 set the bit for their map square in the player's record (map_square_bit).
|
||||||||
| beam_hits_ground_object | ABA8 | BIT 7,(IX+$03) | Only for a ground object on the screen, not dissolving and not of kind $0B, while the beam is out | |||||
| ABAC | RET NZ | |||||||
| ABAD | LD A,(special_beam_on) | |||||||
| ABB0 | AND A | |||||||
| ABB1 | RET Z | |||||||
| ABB2 | BIT 7,(IX+$10) | |||||||
| ABB6 | RET Z | |||||||
| ABB7 | BIT 3,(IX+$17) | |||||||
| ABBB | RET NZ | |||||||
| ABBC | LD A,(IX+$13) | |||||||
| ABBF | CP $0B | |||||||
| ABC1 | RET Z | |||||||
| ABC2 | CALL object_box | Box it, find the beam, and test | ||||||
| ABC5 | CALL find_special_beam | |||||||
| ABC8 | CALL test_shot_box | |||||||
| ABCB | BIT 3,(IX+$17) | Not hit | ||||||
| ABCF | RET Z | |||||||
| ABD0 | LD A,(IX+$18) | Hit: mark it gone | ||||||
| ABD3 | AND $01 | |||||||
| ABD5 | LD H,A | |||||||
| ABD6 | LD L,(IX+$19) | |||||||
| ABD9 | LD DE,map_object_kinds | |||||||
| ABDC | ADD HL,DE | |||||||
| ABDD | SET 7,(HL) | |||||||
| ABDF | LD A,(IX+$00) | Graphic $0D only | ||||||
| ABE2 | CP $0D | |||||||
| ABE4 | RET NZ | |||||||
| ABE5 | LD A,(IX+$13) | Kinds 8 to $0A, ore: give the kind to the beam | ||||||
| ABE8 | CP $08 | |||||||
| ABEA | JR C,beam_hits_ground_object_0 | |||||||
| ABEC | CP $0B | |||||||
| ABEE | RET NC | |||||||
| ABEF | LD (IY+$13),A | |||||||
| ABF2 | RET | |||||||
| beam_hits_ground_object_0 | ABF3 | CP $06 | Kinds 6 and 7 only | |||||
| ABF5 | RET C | |||||||
| ABF6 | LD E,(IX+$01) | Set the bit for its map square (the SET's bit number is patched in) | ||||||
| ABF9 | LD D,(IX+$04) | |||||||
| ABFC | CALL map_square_bit | |||||||
| ABFF | LD A,B | |||||||
| AC00 | ADD A,$C6 | |||||||
| AC02 | LD ($AC06),A | |||||||
| AC05 | SET 0,(HL) | |||||||
| AC07 | RET | |||||||
| Prev: ABA6 | Up: Map | Next: AC08 |