![]() |
Routines |
| Prev: BF8F | Up: Map | Next: BFEA |
|
Lift the task-two entity when its matching game-event bit is set.
|
||||||||
| ScriptRoutine_TaskTwoRiseOnEvent | BFBF | LD A,($72B3) | Load A with the game event flags (GameEventFlags). | |||||
| BFC2 | BIT 1,A | Is bit 01 of game event flags set? If not, jump to ScriptRoutine_TaskTwoRiseOnEvent_RunStartScript. | ||||||
| BFC4 | JR Z,ScriptRoutine_TaskTwoRiseOnEvent_RunStartScript | |||||||
| BFC6 | LD A,(IX+$05) | Load A with the current entity's y-coordinate. | ||||||
| BFC9 | INC A | Advance the current entity's y-coordinate by one. | ||||||
| BFCA | CP $27 | Is the current entity's y-coordinate equal to 27? If so, jump to Update_TaskTwo_ClearTrapFlags. | ||||||
| BFCC | JP Z,Update_TaskTwo_ClearTrapFlags | |||||||
| BFCF | CP $1B | Is the current entity's y-coordinate equal to 1B? If not, jump to ScriptRoutine_TaskTwoRiseOnEvent_IncY. | ||||||
| BFD1 | JR NZ,ScriptRoutine_TaskTwoRiseOnEvent_IncY | |||||||
| BFD3 | LD A,($72B3) | Load A with the game event flags (GameEventFlags). | ||||||
| BFD6 | SET 4,A | Set bit 04 of game event flags. | ||||||
| BFD8 | LD ($72B3),A | Set the game event flags (GameEventFlags). | ||||||
|
Keep lowering the rising helper one row, then continue the script.
|
||||||||
| ScriptRoutine_TaskTwoRiseOnEvent_IncY | BFDB | INC (IX+$05) | Move this entity one character down. | |||||
| BFDE | INC (IX+$06) | |||||||
| BFE1 | JP AdvanceScriptInstruction | Jump to AdvanceScriptInstruction to run the next script instruction. | ||||||
|
Trap closed: restart the rise routine from script BirdScript_RiseLoop.
|
||||||||
| ScriptRoutine_TaskTwoRiseOnEvent_RunStartScript | BFE4 | LD HL,$BE79 | Point HL at bird script data BirdScript_RiseLoop. | |||||
| BFE7 | JP ScriptInstruction | Jump to ScriptInstruction to execute the script instruction at HL. | ||||||
| Prev: BF8F | Up: Map | Next: BFEA |