This commit is contained in:
Ruben Müller 2011-08-20 17:40:18 +02:00
parent 8b2ea22581
commit 30a48990e2
7 changed files with 19 additions and 5 deletions

BIN
data/gfx/flyer.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

BIN
data/gfx/tileset01.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -1 +1 @@
; This file holds all the functions If it gets too big, ; we can split it in categories ; ***************************************************************************** ; * Tileset Procedure InitTileset() LoadImage EndProcedure ; ***************************************************************************** ; ***************************************************************************** ; * Menu Procedure Menu_GotoCurrent() If *ActiveMenu\Entries()\Selected <> #True FirstElement(*ActiveMenu\Entries()); ForEach *ActiveMenu\Entries() If *ActiveMenu\Entries()\Selected = #True Break EndIf Next EndIf EndProcedure ; ***************************************************************************** ; This file holds all the functions If it gets too big, ; we can split it in categories ; ***************************************************************************** ; * Tileset Procedure InitTileset() CatchSprite(#Tile01, ?Gfx_Tileset) ;ClipSprite(0, 0, 0, 16, 16) ; test the sprite ;DisplaySprite(0, 20, 20) EndProcedure ; ***************************************************************************** ; ***************************************************************************** ; * Menu Procedure Menu_GotoCurrent() If *ActiveMenu\Entries()\Selected <> #True FirstElement(*ActiveMenu\Entries()); ForEach *ActiveMenu\Entries() If *ActiveMenu\Entries()\Selected = #True Break EndIf Next EndIf EndProcedure ; *****************************************************************************

View file

@ -12,4 +12,14 @@ Global *ActiveMenu.GameMenu
; Fonts ; Fonts
Global Font_H1 = LoadFont(1, "Courier", 40, #PB_Font_Bold) Global Font_H1 = LoadFont(1, "Courier", 40, #PB_Font_Bold)
Global Font_H2 = LoadFont(2, "Verdana", 18) Global Font_H2 = LoadFont(2, "Verdana", 18)
; Graphics
Enumeration 500
#Tile01
#Tile02
#Tile03
#Tile04
#Tile05
#Tile06
EndEnumeration

View file

@ -47,8 +47,6 @@ If ReadFile(0, "../data/menu.data")
CloseFile(0) CloseFile(0)
EndIf EndIf
InitTileset()
Menus("MAIN_MENU")\Title = "ESCape" Menus("MAIN_MENU")\Title = "ESCape"
Define Item.GameMenuItem Define Item.GameMenuItem
@ -73,6 +71,8 @@ If InitSprite() = 0 Or InitKeyboard() = 0
End End
EndIf EndIf
InitTileset()
; Start the main loop which will create the window, wait for events and draw things ; Start the main loop which will create the window, wait for events and draw things
; on the screen. To escape from this loop, press ESC or close the window. ; on the screen. To escape from this loop, press ESC or close the window.
If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCentered) If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCentered)
@ -112,4 +112,8 @@ If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCent
Until KeyboardPushed(#PB_Key_Escape) Until KeyboardPushed(#PB_Key_Escape)
EndIf EndIf
End End
DataSection
Gfx_Tileset:
IncludeBinary "../data/gfx/tileset01.bmp"