diff --git a/data/gfx/logo.bmp b/data/gfx/logo.bmp new file mode 100644 index 0000000..eea6151 Binary files /dev/null and b/data/gfx/logo.bmp differ diff --git a/data/gfx/logo.psd b/data/gfx/logo.psd new file mode 100644 index 0000000..29b097a Binary files /dev/null and b/data/gfx/logo.psd differ diff --git a/src/Draw.pbi b/src/Draw.pbi index eb9fd8b..00b40ac 100644 --- a/src/Draw.pbi +++ b/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 diff --git a/src/Functions.pbi b/src/Functions.pbi index b6e0f6f..21ff40e 100644 --- a/src/Functions.pbi +++ b/src/Functions.pbi @@ -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 diff --git a/src/Globals.pbi b/src/Globals.pbi index fe8404f..a949008 100644 --- a/src/Globals.pbi +++ b/src/Globals.pbi @@ -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") diff --git a/src/Main.pb b/src/Main.pb index 2bfa365..60b9b58 100644 --- a/src/Main.pb +++ b/src/Main.pb @@ -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