![]() |
Routines |
| Prev: 6D38 | Up: Map | Next: 6D67 |
|
Used by the routine at StartLevelIntroduction.
Clears the screen and the attributes, and creates the actor for the ingredient which is needed for the level in the first of the six actor slots, using the data at IntroductionIngredients for the level (bits 0-2 of ActivePlayer_Level). The actor is created by CreateIntroductionActor.
|
||||
| CreateIntroductionIngredient | 6D45 | XOR A | Clear the flag which says whether Charlie is running (CharlieRunningFlag). | |
| 6D46 | LD ($5F29),A | |||
|
Self modifying code; this updates the command at 7515 to "CP 1E", so the colouring can go further to the right.
|
||||
| 6D49 | LD A,$1E | Write 1E to 7516. | ||
| 6D4B | LD ($7516),A | |||
| 6D4E | CALL ResetAttributes | Reset the attribute buffer using ResetAttributes. | ||
| 6D51 | CALL ResetScreen | Reset the screen buffer using ResetScreen. | ||
| 6D54 | LD HL,$6D7D | Point HL at IntroductionIngredients. | ||
| 6D57 | LD A,($5F2D) | Fetch the level of the active player. | ||
| 6D5A | LD C,$06 | C=06 (the ID for the ingredient). | ||
| 6D5C | RLCA | Multiply the level by two, as there are two bytes of data for each level. | ||
| 6D5D | AND %00001111 | Keep only bits 0-3. | ||
| 6D5F | LD E,A | Use the result as the offset into the table. | ||
| 6D60 | LD D,$00 | |||
| 6D62 | ADD HL,DE | Find the data for the level. | ||
| 6D63 | EX DE,HL | DE=the address of the data for the level. | ||
| 6D64 | LD HL,$5F55 | Point HL at the first spawned actor slot (ActorSpawnSlots). | ||
| Prev: 6D38 | Up: Map | Next: 6D67 |