![]() |
Routines |
| Prev: 61667 | Up: Map | Next: 61798 |
|
Make the entity pick up / restore the held-entity state.
|
||||||||
| ScriptRoutine_PickUpHeld | 61758 | RES 4,(IX+3) | Reset bit 4 of the current entity's flags byte 3. | |||||
| 61762 | LD A,(29422) | Load A with the saved held-entity height from CameraXCoordinate. | ||||||
| 61765 | LD C,A | Keep the camera origin X in C. | ||||||
| 61766 | LD A,(29417) | Load A with the held-entity y-extent (HeldEntityYExtent). | ||||||
| 61769 | OR A | Is the held-entity y-extent (HeldEntityYExtent) zero? If not, jump to ScriptRoutine_PickUpHeld_ApplyHeldY. | ||||||
| 61770 | JR NZ,ScriptRoutine_PickUpHeld_ApplyHeldY | |||||||
| 61772 | LD A,(IX+6) | Load A with the current entity's y-extent. | ||||||
| 61775 | DEC A | Decrease A by one. | ||||||
|
Snap the held entity back under Berk using height CameraXCoordinate and clear bit 5.
|
||||||||
| ScriptRoutine_PickUpHeld_ApplyHeldY | 61776 | LD IY,(29356) | Load IY with the current-entity pointer (Pointer_CurrentEntity). | |||||
| 61780 | RES 5,(IY+1) | Reset bit 5 of the referenced entity's flags byte 1. | ||||||
| 61784 | LD (IY+6),A | Set the referenced entity's y-extent. | ||||||
| 61787 | SUB C | Subtract C from A. | ||||||
| 61788 | LD (IY+5),A | Set the referenced entity's y-coordinate. | ||||||
| 61791 | XOR A | Clear A to 0. | ||||||
| 61792 | LD (29417),A | Set the held-entity y-extent (HeldEntityYExtent). | ||||||
| 61795 | JP AdvanceScriptInstruction | Jump to AdvanceScriptInstruction to run the next script instruction. | ||||||
| Prev: 61667 | Up: Map | Next: 61798 |