![]() |
Routines |
| Prev: 49152 | Up: Map | Next: 49262 |
|
Spawn or refresh a helper entity from the current task-two state.
|
||||||||
| ScriptRoutine_TaskTwoSpawnHelper | 49191 | LD A,(IX+4) | Load A with the current entity's room index. | |||||
| 49194 | LD B,(IX+6) | Load B with the current entity's y-extent. | ||||||
| 49197 | LD C,(IX+7) | Load C with the current entity's x-coordinate. | ||||||
| 49200 | LD IY,36823 | Point IY at the spawned-helper entity (StateData_Complex_17). | ||||||
| 49204 | LD (IY+0),6 | Write 6 to the referenced entity's entity type. | ||||||
| 49208 | LD (IY+4),A | Set the referenced entity's room index. | ||||||
| 49211 | INC C | Advance the helper's x-coordinate in C by one. | ||||||
| 49212 | LD (IY+7),C | Store C in the referenced entity's x-coordinate. | ||||||
| 49215 | INC C | Advance the helper's x-extent base in C by one. | ||||||
| 49216 | LD (IY+8),C | Store C in the referenced entity's x-extent. | ||||||
| 49219 | INC B | Step the Y value in B on by one. | ||||||
| 49220 | LD (IY+5),B | Store B in the referenced entity's y-coordinate. | ||||||
| 49223 | INC B | Step the Y value in B on by one. | ||||||
| 49224 | LD (IY+6),B | Store B in the referenced entity's y-extent. | ||||||
| 49227 | SET 7,(IY+1) | Set bit 7 of the referenced entity's flags byte 1. | ||||||
| 49231 | LD A,(29363) | Load A with the game event flags (GameEventFlags). | ||||||
| 49234 | SET 0,A | Set bit 0 of game event flags. | ||||||
| 49236 | LD (29363),A | Set the game event flags (GameEventFlags). | ||||||
| 49239 | LD A,(29376) | Load A with the entity spawn timer (EntitySpawnTimer). | ||||||
| 49242 | INC A | Advance entity spawn timer by one. | ||||||
| 49243 | LD (29376),A | Set the entity spawn timer (EntitySpawnTimer). | ||||||
| 49246 | CP 4 | Is entity spawn timer equal to 4? If not, jump to AdvanceScriptInstruction. | ||||||
| 49248 | JP NZ,AdvanceScriptInstruction | |||||||
| 49251 | LD A,(29365) | Load A with the task-two flags (TaskTwoFlags). | ||||||
| 49254 | SET 2,A | Set bit 2 of task-two flags. | ||||||
| 49256 | LD (29365),A | Set the task-two flags (TaskTwoFlags). | ||||||
| 49259 | JP AdvanceScriptInstruction | Jump to AdvanceScriptInstruction to run the next script instruction. | ||||||
| Prev: 49152 | Up: Map | Next: 49262 |