Start with teh drawing
This commit is contained in:
parent
9dba2fb5ee
commit
ce00b27eae
5 changed files with 32 additions and 6 deletions
|
@ -34,4 +34,6 @@ Procedure DrawRunningGame()
|
||||||
;Box(0, 0, 200, 200, RGB(0, 255, 0))
|
;Box(0, 0, 200, 200, RGB(0, 255, 0))
|
||||||
|
|
||||||
DrawImage(ImageID(#Tile01), 20, 20)
|
DrawImage(ImageID(#Tile01), 20, 20)
|
||||||
|
|
||||||
|
DrawMap()
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
|
@ -4,10 +4,20 @@
|
||||||
; *****************************************************************************
|
; *****************************************************************************
|
||||||
; * Tileset
|
; * Tileset
|
||||||
Procedure InitTileset()
|
Procedure InitTileset()
|
||||||
|
|
||||||
;ClipSprite(#Tile01, 0, 0, 16, 16)
|
;ClipSprite(#Tile01, 0, 0, 16, 16)
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
|
Procedure DrawTile(number.i, x.i, y.i)
|
||||||
|
Debug number.i
|
||||||
|
Debug x.i
|
||||||
|
Debug y.i
|
||||||
|
EndProcedure
|
||||||
|
|
||||||
|
Procedure DrawMap()
|
||||||
|
|
||||||
|
EndProcedure
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; *****************************************************************************
|
; *****************************************************************************
|
||||||
; * Menu
|
; * Menu
|
||||||
|
@ -23,3 +33,5 @@ Procedure Menu_GotoCurrent()
|
||||||
Next
|
Next
|
||||||
EndIf
|
EndIf
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,20 @@ Global Title.s = "ESCape - Build " + Str(#PB_Editor_BuildCount)
|
||||||
Global Screen.ScreenDimension\width = 800
|
Global Screen.ScreenDimension\width = 800
|
||||||
Screen.ScreenDimension\height = 600
|
Screen.ScreenDimension\height = 600
|
||||||
|
|
||||||
|
; Player
|
||||||
|
Global Player.MapPoint\X = 10
|
||||||
|
Player.MapPoint\Y = 10
|
||||||
|
|
||||||
|
; Them map
|
||||||
|
Global Dim GameField(50, 50)
|
||||||
|
|
||||||
NewMap GameStates.GameState()
|
NewMap GameStates.GameState()
|
||||||
Global NewMap Menus.GameMenu()
|
Global NewMap Menus.GameMenu()
|
||||||
Global CurrentState.s = "MAIN_MENU"
|
Global CurrentState.s = "MAIN_MENU"
|
||||||
Global *ActiveMenu.GameMenu
|
Global *ActiveMenu.GameMenu
|
||||||
|
|
||||||
; Fonts
|
; Fonts
|
||||||
Global Font_H1 = LoadFont(1, "Courier", 40, #PB_Font_Bold)
|
Global Font_H1 = LoadFont(1, "Arial", 40, #PB_Font_Bold)
|
||||||
Global Font_H2 = LoadFont(2, "Verdana", 18)
|
Global Font_H2 = LoadFont(2, "Verdana", 18)
|
||||||
|
|
||||||
; Graphics
|
; Graphics
|
||||||
|
@ -30,7 +37,7 @@ EndEnumeration
|
||||||
LoadSound(0, #DATA_PATH + "sound/menu_change.wav")
|
LoadSound(0, #DATA_PATH + "sound/menu_change.wav")
|
||||||
LoadSound(1, #DATA_PATH + "sound/menu_select.wav")
|
LoadSound(1, #DATA_PATH + "sound/menu_select.wav")
|
||||||
|
|
||||||
: Images
|
; Images
|
||||||
UseJPEGImageDecoder()
|
UseJPEGImageDecoder()
|
||||||
Debug LoadImage(#Tile01, #DATA_PATH+"gfx/tileset01.jp")
|
Debug LoadImage(#Tile01, #DATA_PATH+"gfx/tileset01.jpg")
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ EndIf
|
||||||
|
|
||||||
XIncludeFile "Structs.pbi"
|
XIncludeFile "Structs.pbi"
|
||||||
XIncludeFile "Globals.pbi"
|
XIncludeFile "Globals.pbi"
|
||||||
XIncludeFile "Draw.pbi"
|
|
||||||
XIncludeFile "Functions.pbi"
|
XIncludeFile "Functions.pbi"
|
||||||
|
XIncludeFile "Draw.pbi"
|
||||||
XIncludeFile "Events.pbi"
|
XIncludeFile "Events.pbi"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,4 +30,9 @@ EndStructure
|
||||||
Structure GameMenu
|
Structure GameMenu
|
||||||
Title.s
|
Title.s
|
||||||
List Entries.GameMenuItem()
|
List Entries.GameMenuItem()
|
||||||
EndStructure
|
EndStructure
|
||||||
|
|
||||||
|
Structure MapPoint
|
||||||
|
X.i
|
||||||
|
Y.i
|
||||||
|
EndStructure
|
||||||
|
|
Loading…
Reference in a new issue