![]() |
Routines |
| Prev: 51879 | Up: Map | Next: 51952 |
|
Used by the routine at Update_Task_Four_Entities.
Advance task-four entity scripts and start/stop the entity when game event flags at GameEventFlags change.
|
||||
| Update_TaskFourEntityState | 51908 | LD A,(29363) | Load A with the game event flags (GameEventFlags). | |
| 51911 | BIT 7,A | Is bit 7 of game event flags set? If so, jump to AdvanceScriptInstruction. | ||
| 51913 | JP NZ,AdvanceScriptInstruction | |||
| 51916 | BIT 7,(IX+0) | Is bit 7 of the current entity's entity type set? If so, jump to Update_TaskFour_StopEntity. | ||
| 51920 | JR NZ,Update_TaskFour_StopEntity | |||
| 51922 | BIT 1,A | Is bit 1 of game event flags set? If so, jump to AdvanceScriptInstruction. | ||
| 51924 | JP NZ,AdvanceScriptInstruction | |||
|
This entry point is used by the routine at ScriptRoutine_TaskFourClearScriptFlags.
Shared entry used by script routine ScriptRoutine_TaskFourClearScriptFlags to start the task-four entity script.
|
||||
| Update_TaskFour_StartEntity | 51927 | SET 7,(IX+0) | Set bit 7 of the current entity's entity type. | |
| 51931 | XOR A | Clear the current task phase (idle). | ||
| 51932 | LD (29359),A | Set the current task phase (CurrentTaskPhase). | ||
| 51935 | LD HL,51747 | Point HL at task-four script Data_TaskFourScript. | ||
| 51938 | LD (29391),HL | Store HL in the active script cursor (Pointer_ActiveScriptCursor). | ||
| 51941 | RET | Return. | ||
|
Stop the task-four entity when game-event bit 1 is set: clear type bit 7 and continue the script.
|
||||
| Update_TaskFour_StopEntity | 51942 | BIT 1,A | Is bit 1 of game event flags set? If not, return. | |
| 51944 | RET Z | |||
| 51945 | RES 7,(IX+0) | Reset bit 7 of the current entity's entity type. | ||
| 51949 | JP AdvanceScriptInstruction | Jump to AdvanceScriptInstruction to run the next script instruction. | ||
| Prev: 51879 | Up: Map | Next: 51952 |