![]() |
Routines |
| Prev: 60885 | Up: Map | Next: 60920 |
|
Used by the routines at Berk_Interact_With_Entity and ScriptRoutine_CloseTrapDoor.
Close the trap door: queue a sound, switch the lever graphic layout to closed facing right, and update the related scenery entity types.
|
||||
| Close_TrapDoor | 60891 | PUSH IX | Stash IX, HL and DE on the stack. | |
| 60893 | PUSH HL | |||
| 60894 | PUSH DE | |||
| 60895 | LD HL,29363 | Point HL at the game event flags (GameEventFlags). | ||
| 60898 | BIT 4,(HL) | Is "task-two / upstairs event latch" (bit 4 of GameEventFlags) set? If so, jump to TrapDoor_RestoreAndReturn. | ||
| 60900 | JR NZ,TrapDoor_RestoreAndReturn | |||
| 60902 | RES 1,(HL) | Clear "trap door is open / trap door event armed" (bit 1 of GameEventFlags). | ||
|
|
||||
| 60904 | LD A,6 | Load A with sound index 6. | ||
| 60906 | CALL Queue_Sound | Call Queue_Sound to queue sound. | ||
| 60909 | LD HL,43017 | Point HL at the lever closed, facing right (GraphicLayout_LeverClosedRight). | ||
| 60912 | LD (37239),HL | Store HL in the lever layout pointer (Pointer_TrapDoorLayout). | ||
| 60915 | LD HL,60873 | Point HL at the closed-trap type list (Data_TrapDoorClosedTypes). | ||
| 60918 | JR UpdateTrapDoorEntityTypes | Jump to UpdateTrapDoorEntityTypes to handle the trap door. | ||
| Prev: 60885 | Up: Map | Next: 60920 |