Prev: 26896 Up: Map Next: 26940
26905: Display Night Driver Text
Used by the routine at CreateWindow.
If it is night, shows "NIGHT DRIVER" for a short time and then removes it again.
Before After
night-driver-before night-driver-after
DisplayNightDriver 26905 LD A,(24131) Return if Flag_DayNight is zero (i.e. it is "day").
26908 AND A
26909 RET Z
Else it is night so handle the interlude to display "Night Driver".
26910 LD HL,16496 HL=16496 (pixel co-ordinates: H is the Y position and L is the X position).
26913 LD DE,26940 Point DE at the "NIGHT DRIVER" text (NightDriver_Text).
26916 CALL PrintStringColour Print the text using PrintStringColour.
Display the text for a short time.
26919 LD B,4 Set the delay count to 4.
26921 CALL Delay Wait using Delay.
Remove the messaging.
26924 LD HL,16496 HL=16496 (pixel co-ordinates: H is the Y position and L is the X position).
26927 PUSH HL Stash the pixel co-ordinates on the stack.
26928 CALL ScreenAddress Convert them to a screen address using ScreenAddress.
26931 LD A,0 Set the attribute to 0 which hides the text.
26933 EX AF,AF' Keep the attribute in the shadow AF register.
26934 LD DE,27365 Point DE at the blank text (Blank_Text).
26937 JP PrintStringColour_UseAttribute Jump to PrintStringColour_UseAttribute to print the blank text.
Prev: 26896 Up: Map Next: 26940