Prev: 687B Up: Map Next: 6900
68A0: Create Game Window
Used by the routines at GameInitialisation, GameOver, GameInit and HandlerCup.
CreateWindow 68A0 LD HL,$5E68 Write 00 to 0C bytes starting from 5E68.
68A3 LD BC,$0C00
CreateWindow_0 68A6 LD (HL),C
68A7 INC HL
68A8 DJNZ CreateWindow_0
68AA LD HL,$FFFF Write FFFF to PlayerWorldPosition.
68AD LD ($5E34),HL
68B0 LD HL,$65FD HL=TerrainDots.
68B3 LD B,$10 B=10.
CreateWindow_Terrain 68B5 RES 0,(HL) Reset bit 0 of the byte HL is pointing to.
68B7 INC HL Increment HL by two.
68B8 INC HL
68B9 DJNZ CreateWindow_Terrain Decrease counter by one and loop back to CreateWindow_Terrain until counter is zero.
68BB CALL ResetAttributes Call ResetAttributes.
68BE CALL DrawPlayArea Call DrawPlayArea.
68C1 CALL PlotMapPoints Call PlotMapPoints.
68C4 CALL DisplayCupsCollected Call DisplayCupsCollected.
68C7 CALL DisplayPlayerLives Call DisplayPlayerLives.
68CA CALL DisplayMiles Call DisplayMiles.
68CD LD HL,$5808 HL=5808 (attribute buffer).
68D0 LD BC,$1801 BC=1801.
68D3 PUSH BC Stash BC on the stack.
68D4 CALL AttributesPlayArea Call AttributesPlayArea.
68D7 LD HL,$5AE8 HL=5AE8 (attribute buffer).
68DA POP BC Restore BC from the stack.
68DB CALL AttributesPlayArea Call AttributesPlayArea.
68DE LD HL,$5828 HL=5828 (attribute buffer).
68E1 LD BC,$0116 BC=0116.
68E4 PUSH BC Stash BC on the stack.
68E5 CALL AttributesPlayArea Call AttributesPlayArea.
68E8 POP BC Restore BC from the stack.
68E9 LD HL,$583F HL=583F (attribute buffer).
68EC CALL AttributesPlayArea Call AttributesPlayArea.
68EF LD HL,$0050 HL=0050.
68F2 LD DE,$6031 DE=Text_ScoreHi.
68F5 CALL PrintStringColour Call PrintStringColour.
68F8 CALL Score_Player Call Score_Player.
68FB CALL Score_HI Call Score_HI.
68FE JR DisplayNightDriver Jump to DisplayNightDriver.
Prev: 687B Up: Map Next: 6900