![]() |
Routines |
| Prev: AAB3 | Up: Map | Next: AB71 |
|
Used by the routine at GameRestart.
Initialise Entity Data walking the entity tables at StateData_SimpleEntities / StateData_Boney.
|
||||
| Initialise_Entity_Data | AB31 | LD HL,$FA0E | Point HL at the entity-state backup buffer (Buffer_EntityStateBackup). | |
| AB34 | LD DE,$8EE9 | Point DE at Boney's complex entity state (StateData_Boney). | ||
| AB37 | LD BC,($72A3) | Load BC with the entity-state copy length (CopyLength_EntityStateData). | ||
| AB3B | LDIR | Copy the block at HL to DE. | ||
|
Reset the dumb waiter's y-band and prepare to stamp closed-trap types.
|
||||
| AB3D | LD IX,$8D7D | Point IX at the dumb-waiter entity (8D7D). | ||
| AB41 | LD (IX+$05),$1D | Write 1D to the current entity's y-coordinate. | ||
| AB45 | LD (IX+$06),$23 | Write 23 to the current entity's y-extent. | ||
| AB49 | LD HL,$EDC9 | Point HL at the closed-trap type list (Data_TrapDoorClosedTypes). | ||
| AB4C | LD IX,$8E87 | Point IX at the simple-entity slot at 8E87. | ||
| AB50 | LD DE,$000E | Each entity record is 000E bytes long, then load that length into DE. | ||
| AB53 | LD B,$06 | Load B with 06 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 | AB55 | LD A,(HL) | Fetch the next byte from Data_TrapDoorClosedTypes. | |
| AB56 | LD (IX+$00),A | Set the current entity's entity type. | ||
| AB59 | INC HL | Advance Data_TrapDoorClosedTypes by one byte. | ||
| AB5A | ADD IX,DE | Advance IX to the next entity record. | ||
| AB5C | 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.
|
||||
| AB5E | LD HL,$A809 | Point HL at the lever closed, facing right (GraphicLayout_LeverClosedRight). | ||
| AB61 | LD ($9177),HL | Write the lever layout pointer to Pointer_TrapDoorLayout. | ||
| AB64 | LD HL,($72A7) | Load HL with the entity-state backup end pointer (Pointer_EntityStateBackupEnd). | ||
| AB67 | LD DE,$72AE | Point DE at the current task index (CurrentTaskIndex). | ||
| AB6A | LD BC,($72A5) | Load BC with the game-state copy length (CopyLength_GameState). | ||
| AB6E | LDIR | Copy the block at HL to DE. | ||
| AB70 | RET | Return. | ||
| Prev: AAB3 | Up: Map | Next: AB71 |