![]() |
Routines |
| Prev: A378 | Up: Map | Next: A3C1 |
|
Mark the object as carried and set RoverCargoFlag.
|
||||||||
|
Mark the object as carried and set RoverCargoFlag.
|
||||||||
| AttachCarriedItem | A39C | SET 2,(IX+$08) | Set bit 2 of the actor flags. | |||||
| A3A0 | LD A,$01 | Write 01 to RoverCargoFlag. | ||||||
| A3A2 | LD ($5EA3),A | |||||||
|
Record in the actor flags which way the rover faces.
|
||||||||
| A3A5 | LD A,($6090) | Fetch Rover_Slot. | ||||||
| A3A8 | CP $22 | Compare it against 22. | ||||||
| A3AA | LD A,$00 | A=00. | ||||||
| A3AC | JR C,AttachCarriedItem_KeepBit3 | Jump to AttachCarriedItem_KeepBit3 if the rover type is below 22. | ||||||
| A3AE | ADD A,$08 | Add 08. | ||||||
|
Keep the facing bit from the actor type and merge it into the flags.
|
||||||||
| AttachCarriedItem_KeepBit3 | A3B0 | XOR (IX+$00) | XOR it with the actor type. | |||||
| A3B3 | AND %00001000 | Keep only bit 3. | ||||||
| A3B5 | LD C,A | Stash that bit in C. | ||||||
| A3B6 | LD A,(IX+$08) | Fetch the actor flags. | ||||||
| A3B9 | AND %11110111 | Reset bit 3. | ||||||
| A3BB | OR C | Merge the rover-facing bit back in. | ||||||
| A3BC | LD (IX+$08),A | Write the flags back. | ||||||
| A3BF | JR Handler_WorldObject_Loop | Jump to Handler_WorldObject_Loop. | ||||||
| Prev: A378 | Up: Map | Next: A3C1 |