ld21-ESCape/src/Draw.pbi

52 lines
1.2 KiB
Plaintext
Raw Normal View History

2011-08-20 14:49:54 +02:00
; Here we draw stuff on screen. These are the dispatch
; functions which will be called from the state dispatch
; process.
; Draw the current activated menu. This will be set from
; the dispatcher. The events are controlled by the
; HandleEventMenu() function.
Procedure DrawMenu()
2011-08-20 20:14:22 +02:00
DisplaySprite(GFXLogo, 160, 50)
2011-08-20 19:42:09 +02:00
StartDrawing(ScreenOutput())
Define Black = RGB(0, 0, 0)
Define White = RGB(255, 255, 255)
Define ActiveMenuItemColor = RGB(255, 0, 0)
2011-08-20 20:14:22 +02:00
;DrawingFont(Font_H1)
;DrawText(50, 50, *ActiveMenu\Title, white, black)
2011-08-20 14:49:54 +02:00
2011-08-20 19:42:09 +02:00
Define Offset = 0
Define FontColor = White
ForEach *ActiveMenu\Entries()
If *ActiveMenu\Entries()\Selected
FontColor = ActiveMenuItemColor
Else
FontColor = White
EndIf
DrawingFont(Font_H2)
2011-08-20 20:14:22 +02:00
DrawText(200, 350+(Offset*30), *ActiveMenu\Entries()\Label, FontColor, Black)
2011-08-20 19:42:09 +02:00
Offset = Offset+1
Next
StopDrawing()
2011-08-20 14:49:54 +02:00
EndProcedure
Procedure DrawRunningGame()
2011-08-20 20:15:44 +02:00
DrawMap()
2011-08-21 21:05:34 +02:00
; FIXME: This does not work quite well ...
;StartDrawing(ScreenOutput())
;DrawPlayerNoise()
;StopDrawing()
CalculateShadow()
DrawShadow()
2011-08-20 22:52:29 +02:00
DrawPlayer()
2011-08-21 17:59:16 +02:00
DrawHUD()
2011-08-21 19:59:15 +02:00
EndProcedure