![]() |
Routines |
| Prev: B390 | Up: Map | Next: B3D0 |
|
Blanks the play area, then prints the "TELEPORTING" message repeatedly while cycling its INK colour, playing a tone on each pass.
|
||||
|
Blank the play area and start the TELEPORTING cycle.
|
||||
| MessageTeleporting | B3A3 | DI | Disable interrupts. | |
| B3A4 | CALL BlankPlayArea | Call BlankPlayArea. | ||
| B3A7 | LD B,$10 | Set a colour cycle counter in B for 10 loops. | ||
| MessageTeleporting_Loop | B3A9 | PUSH BC | Stash BC (the colour cycling counter) on the stack. | |
|
Handle printing "
" messaging.
|
||||
| B3AA | LD HL,$7058 | HL=7058 (screen location). | ||
| B3AD | LD DE,$B3D0 | DE=String_Teleporting. | ||
| B3B0 | CALL PrintStringColour | Call PrintStringColour. | ||
|
Pause so the player can read the message. This inner loop runs once per INK change, so the wait is 2000*10.
|
||||
| B3B3 | LD HL,$2000 | HL=2000 (counter). | ||
| Teleporting_Pause | B3B6 | DEC HL | Decrease HL by one. | |
| B3B7 | LD A,L | Jump back to Teleporting_Pause until HL is zero. | ||
| B3B8 | OR H | |||
| B3B9 | JR NZ,Teleporting_Pause | |||
|
Handle cycling the text INK colour.
|
||||
| B3BB | LD A,($B3D0) | A=the attribute byte of String_Teleporting. | ||
| B3BE | INC A | Increment A by one. | ||
| B3BF | AND %00000111 | Keep only bits 0-2 (INK). | ||
| B3C1 | JR NZ,MessageTeleporting_SetBright | Jump to MessageTeleporting_SetBright if A was not zero. | ||
| B3C3 | INC A | Increment A by one. | ||
| MessageTeleporting_SetBright | B3C4 | OR %01000000 | Set bit 6 (BRIGHT). | |
| B3C6 | LD ($B3D0),A | Store A at String_Teleporting to overwrite the attribute byte. | ||
|
Restore the counter, play the repeated tone and loop until the counter is zero.
|
||||
| B3C9 | POP BC | Restore BC (the colour cycling counter) from the stack. | ||
| B3CA | CALL PlayRepeatedTone | Call PlayRepeatedTone. | ||
| B3CD | DJNZ MessageTeleporting_Loop | Decrease the counter by one and jump back to MessageTeleporting_Loop until it is zero. | ||
| B3CF | RET | Return. | ||
| Prev: B390 | Up: Map | Next: B3D0 |