![]() |
Routines |
| Prev: CF44 | Up: Map | Next: D036 |
|
Used by the routine at Update_Miscellaneous_Entities.
Animate the vat entity for the current room: bubble state, contained objects and whether Berk can interact.
|
||||
| Update_Vat | D012 | LD HL,($72D3) | Load HL with the Drutt script-position pointer (Pointer_DruttScriptPosition). | |
| D015 | LD ($72CF),HL | Store HL in the active script cursor (Pointer_ActiveScriptCursor). | ||
| D018 | LD IX,$8FC9 | Point IX at the crusher entity (StateData_Complex_16). | ||
| D01C | LD A,(IX+$00) | Fetch the current entity's type for the type test. | ||
| D01F | CP $0C | Is the current entity's entity type equal to 0C? If not, jump to Update_Vat_TestEventAndDirBit0. | ||
| D021 | JR NZ,Update_Vat_TestEventAndDirBit0 | |||
| D023 | BIT 7,(IX+$01) | Is bit 07 of the current entity's flags byte 1 set? If so, jump to Update_Drutt_RunScript. | ||
| D027 | JR NZ,Update_Drutt_RunScript | |||
| D029 | BIT 0,(IX+$02) | Is bit 00 of the current entity's flags byte 2 set? If not, jump to AdvanceScriptInstruction. | ||
| D02D | JP Z,AdvanceScriptInstruction | |||
|
Run the Drutt script at Data_DruttScripts for an active type-0C entity.
|
||||
| Update_Drutt_RunScript | D030 | LD HL,$CF44 | Point HL at the Drutt script (Data_DruttScripts). | |
| D033 | JP ScriptInstruction | Jump to ScriptInstruction to execute the script instruction at HL. | ||
| Prev: CF44 | Up: Map | Next: D036 |