sprite stuff
This commit is contained in:
parent
b09169256b
commit
5ea7373d3e
6 changed files with 16 additions and 16 deletions
BIN
data/gfx/logo.bmp
Normal file
BIN
data/gfx/logo.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
BIN
data/gfx/logo.psd
Normal file
BIN
data/gfx/logo.psd
Normal file
Binary file not shown.
10
src/Draw.pbi
10
src/Draw.pbi
|
@ -7,13 +7,15 @@
|
|||
; the dispatcher. The events are controlled by the
|
||||
; HandleEventMenu() function.
|
||||
Procedure DrawMenu()
|
||||
DisplaySprite(GFXLogo, 160, 50)
|
||||
|
||||
StartDrawing(ScreenOutput())
|
||||
Define Black = RGB(0, 0, 0)
|
||||
Define White = RGB(255, 255, 255)
|
||||
Define ActiveMenuItemColor = RGB(255, 0, 0)
|
||||
|
||||
DrawingFont(Font_H1)
|
||||
DrawText(50, 50, *ActiveMenu\Title, white, black)
|
||||
;DrawingFont(Font_H1)
|
||||
;DrawText(50, 50, *ActiveMenu\Title, white, black)
|
||||
|
||||
Define Offset = 0
|
||||
Define FontColor = White
|
||||
|
@ -25,7 +27,7 @@ Procedure DrawMenu()
|
|||
EndIf
|
||||
|
||||
DrawingFont(Font_H2)
|
||||
DrawText(50, 300+(Offset*30), *ActiveMenu\Entries()\Label, FontColor, Black)
|
||||
DrawText(200, 350+(Offset*30), *ActiveMenu\Entries()\Label, FontColor, Black)
|
||||
Offset = Offset+1
|
||||
Next
|
||||
StopDrawing()
|
||||
|
@ -37,5 +39,5 @@ Procedure DrawRunningGame()
|
|||
Box(0, 0, 200, 200, RGB(0, 255, 0))
|
||||
StopDrawing()
|
||||
|
||||
DisplaySprite(Tile01, 20, 20)
|
||||
DisplaySprite(GFXTileset, 20, 20)
|
||||
EndProcedure
|
||||
|
|
|
@ -3,9 +3,13 @@
|
|||
|
||||
; *****************************************************************************
|
||||
; * Tileset
|
||||
Procedure InitGraphics()
|
||||
GFXLogo = LoadSprite(#PB_Any, "../data/gfx/logo.bmp")
|
||||
GFXTileset = LoadSprite(#PB_Any, "../data/gfx/tileset01.bmp")
|
||||
EndProcedure
|
||||
|
||||
Procedure InitTileset()
|
||||
Tile01 = LoadSprite(#PB_Any, "../data/gfx/tileset01.bmp")
|
||||
;ClipSprite(#Tile01, 0, 0, 16, 16)
|
||||
ClipSprite(GFXTileset, 0, 0, 16, 16)
|
||||
EndProcedure
|
||||
|
||||
|
||||
|
|
|
@ -17,16 +17,8 @@ Global Font_H1 = LoadFont(1, "Courier", 40, #PB_Font_Bold)
|
|||
Global Font_H2 = LoadFont(2, "Verdana", 18)
|
||||
|
||||
; Graphics
|
||||
Global Tile01.i
|
||||
|
||||
Enumeration 500
|
||||
#Tile01
|
||||
#Tile02
|
||||
#Tile03
|
||||
#Tile04
|
||||
#Tile05
|
||||
#Tile06
|
||||
EndEnumeration
|
||||
Global GFXLogo.i
|
||||
Global GFXTileset.i
|
||||
|
||||
; Sounds
|
||||
LoadSound(0, #DATA_PATH + "sound/menu_change.wav")
|
||||
|
|
|
@ -74,6 +74,7 @@ menus("RLY_QUIT")\Entries() = Item
|
|||
If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCentered)
|
||||
OpenWindowedScreen(WindowID(0), 0, 0, Screen\Width, Screen\Height, 0, 0, 0)
|
||||
|
||||
InitGraphics()
|
||||
InitTileset()
|
||||
|
||||
Repeat
|
||||
|
@ -93,6 +94,7 @@ If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCent
|
|||
OpenWindowedScreen(WindowID(0), 0, 0, 800, 600, 0, 0, 0)
|
||||
Fullscreen = 0
|
||||
EndIf
|
||||
InitGraphics()
|
||||
EndIf
|
||||
|
||||
; Debug CurrentState
|
||||
|
|
Loading…
Reference in a new issue