![]() |
Routines |
| Prev: 43699 | Up: Map | Next: 43889 |
|
Used by the routine at GameRestart.
Initialise Entity Data walking the entity tables at StateData_SimpleEntities / StateData_Boney.
|
||||
| Initialise_Entity_Data | 43825 | LD HL,64014 | Point HL at the entity-state backup buffer (Buffer_EntityStateBackup). | |
| 43828 | LD DE,36585 | Point DE at Boney's complex entity state (StateData_Boney). | ||
| 43831 | LD BC,(29347) | Load BC with the entity-state copy length (CopyLength_EntityStateData). | ||
| 43835 | LDIR | Copy the block at HL to DE. | ||
|
Reset the dumb waiter's y-band and prepare to stamp closed-trap types.
|
||||
| 43837 | LD IX,36221 | Point IX at the dumb-waiter entity (36221). | ||
| 43841 | LD (IX+5),29 | Write 29 to the current entity's y-coordinate. | ||
| 43845 | LD (IX+6),35 | Write 35 to the current entity's y-extent. | ||
| 43849 | LD HL,60873 | Point HL at the closed-trap type list (Data_TrapDoorClosedTypes). | ||
| 43852 | LD IX,36487 | Point IX at the simple-entity slot at 36487. | ||
| 43856 | LD DE,14 | Each entity record is 0014 bytes long, then load that length into DE. | ||
| 43859 | LD B,6 | Load B with 6 as a loop counter. | ||
|
Walk the simple-entity slots and apply each closed-trap type from Data_TrapDoorClosedTypes, then restore the closed-trap lever.
|
||||
| Initialise_Entity_Data_ApplyType | 43861 | LD A,(HL) | Fetch the next byte from Data_TrapDoorClosedTypes. | |
| 43862 | LD (IX+0),A | Set the current entity's entity type. | ||
| 43865 | INC HL | Advance Data_TrapDoorClosedTypes by one byte. | ||
| 43866 | ADD IX,DE | Advance IX to the next entity record. | ||
| 43868 | DJNZ Initialise_Entity_Data_ApplyType | Decrease the loop counter in B and jump to Initialise_Entity_Data_ApplyType if more iterations remain. | ||
|
Point the lever at closed facing right, then restore task/game state from the backup.
|
||||
| 43870 | LD HL,43017 | Point HL at the lever closed, facing right (GraphicLayout_LeverClosedRight). | ||
| 43873 | LD (37239),HL | Write the lever layout pointer to Pointer_TrapDoorLayout. | ||
| 43876 | LD HL,(29351) | Load HL with the entity-state backup end pointer (Pointer_EntityStateBackupEnd). | ||
| 43879 | LD DE,29358 | Point DE at the current task index (CurrentTaskIndex). | ||
| 43882 | LD BC,(29349) | Load BC with the game-state copy length (CopyLength_GameState). | ||
| 43886 | LDIR | Copy the block at HL to DE. | ||
| 43888 | RET | Return. | ||
| Prev: 43699 | Up: Map | Next: 43889 |