![]() |
Routines |
| Prev: 41751 | Up: Map | Next: 41848 |
|
Route a fuel pod, bomb or pickup through collect, drop and action-key tests.
|
||||||||
|
Reset the drop bit unless the action key is held.
|
||||||||
| Handler_WorldObject | 41765 | CALL TestActionKey | Jump to Handler_WorldObject_DispatchFlags if the action key is pressed. | |||||
| 41768 | JR NZ,Handler_WorldObject_DispatchFlags | |||||||
| 41770 | RES 1,(IX+8) | Reset bit 1 of the actor flags. | ||||||
|
Dispatch on carried, attached or free-in-world.
|
||||||||
| Handler_WorldObject_DispatchFlags | 41774 | BIT 2,(IX+8) | Jump to Handler_HeldObject if bit 2 of the actor flags is set. | |||||
| 41778 | JP NZ,Handler_HeldObject | |||||||
| 41781 | BIT 0,(IX+8) | Jump to PlaceCarriedItem if bit 0 of the actor flags is set. | ||||||
| 41785 | JP NZ,PlaceCarriedItem | |||||||
|
Settle the object on the ground, then attach it if the rover is free and in range.
|
||||||||
| 41788 | CALL ClampObjectToGround | Call ClampObjectToGround. | ||||||
| 41791 | LD A,(24227) | Fetch RoverCargoFlag. | ||||||
| 41794 | AND A | Jump to Handler_WorldObject_TestAction if the rover is already carrying. | ||||||
| 41795 | JR NZ,Handler_WorldObject_TestAction | |||||||
| 41797 | CALL CompareActorDistance | Call CompareActorDistance. | ||||||
| 41800 | JR C,AttachCarriedItem | Jump to AttachCarriedItem if the object is in range. | ||||||
|
On action, attach this object if Jetman can collect it.
|
||||||||
| Handler_WorldObject_TestAction | 41802 | BIT 1,(IX+8) | Jump to Handler_WorldObject_Loop if bit 1 of the actor flags is set. | |||||
| 41806 | JR NZ,Handler_WorldObject_Loop | |||||||
| 41808 | CALL TestActionKey | Call TestActionKey. | ||||||
| 41811 | JR Z,Handler_WorldObject_Loop | Jump to Handler_WorldObject_Loop if the action key is not pressed. | ||||||
| 41813 | LD A,(24696) | Fetch Jetman_Slot. | ||||||
|
Type 17 and above means Jetman is not on foot.
|
||||||||
| 41816 | CP 17 | Jump to Handler_WorldObject_Loop if Jetman's type is at least 17. | ||||||
| 41818 | JR NC,Handler_WorldObject_Loop | |||||||
| 41820 | CALL TestJetmanAction_ComparePosition | Call TestJetmanAction_ComparePosition. | ||||||
| 41823 | JR NC,Handler_WorldObject_Loop | Jump to Handler_WorldObject_Loop if the object is out of range. | ||||||
|
Mark Jetman as carrying and flag the object as held.
|
||||||||
| 41825 | LD HL,24704 | HL=Jetman_Flags. | ||||||
| 41828 | BIT 0,(HL) | Jump to Handler_WorldObject_Loop if bit 0 is set. | ||||||
| 41830 | JR NZ,Handler_WorldObject_Loop | |||||||
| 41832 | SET 0,(HL) | Set bit 0 of Jetman_Flags. | ||||||
| 41834 | SET 0,(IX+8) | Set bit 0 of the actor flags. | ||||||
| 41838 | SET 1,(IX+8) | Set bit 1 of the actor flags. | ||||||
| 41842 | CALL SoundsTakeObject | Call SoundsTakeObject. | ||||||
|
This entry point is used by the routines at ReleaseCarriedItem, AttachCarriedItem and PlaceCarriedItem.
|
||||||||
| Handler_WorldObject_Loop | 41845 | JP DrawCurrentActor_Draw | Jump to DrawCurrentActor_Draw. | |||||
| Prev: 41751 | Up: Map | Next: 41848 |