Prev: 45968 Up: Map Next: 46032
45987: Message: Teleporting
Used by the routine at StartTeleport.
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 45987 DI Disable interrupts.
45988 CALL BlankPlayArea Call BlankPlayArea.
45991 LD B,16 Set a colour cycle counter in B for 16 loops.
MessageTeleporting_Loop 45993 PUSH BC Stash BC (the colour cycling counter) on the stack.
Handle printing "teleporting" messaging.
45994 LD HL,28760 HL=28760 (screen location).
45997 LD DE,46032 DE=String_Teleporting.
46000 CALL PrintStringColour Call PrintStringColour.
Pause so the player can read the message. This inner loop runs once per INK change, so the wait is 8192*16.
46003 LD HL,8192 HL=8192 (counter).
Teleporting_Pause 46006 DEC HL Decrease HL by one.
46007 LD A,L Jump back to Teleporting_Pause until HL is zero.
46008 OR H
46009 JR NZ,Teleporting_Pause
Handle cycling the text INK colour.
46011 LD A,(46032) A=the attribute byte of String_Teleporting.
46014 INC A Increment A by one.
46015 AND %00000111 Keep only bits 0-2 (INK).
46017 JR NZ,MessageTeleporting_SetBright Jump to MessageTeleporting_SetBright if A was not zero.
46019 INC A Increment A by one.
MessageTeleporting_SetBright 46020 OR %01000000 Set bit 6 (BRIGHT).
46022 LD (46032),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.
46025 POP BC Restore BC (the colour cycling counter) from the stack.
46026 CALL PlayRepeatedTone Call PlayRepeatedTone.
46029 DJNZ MessageTeleporting_Loop Decrease the counter by one and jump back to MessageTeleporting_Loop until it is zero.
46031 RET Return.
Prev: 45968 Up: Map Next: 46032