diff --git a/data/gfx/hud.psd b/data/gfx/hud.psd new file mode 100644 index 0000000..86aabe4 Binary files /dev/null and b/data/gfx/hud.psd differ diff --git a/data/gfx/playerset01.bmp b/data/gfx/playerset01.bmp new file mode 100644 index 0000000..00b3449 Binary files /dev/null and b/data/gfx/playerset01.bmp differ diff --git a/data/gfx/playerset01.psd b/data/gfx/playerset01.psd new file mode 100644 index 0000000..54a1f3c Binary files /dev/null and b/data/gfx/playerset01.psd differ diff --git a/src/Functions.pbi b/src/Functions.pbi index 44e0e87..5a5fce7 100644 --- a/src/Functions.pbi +++ b/src/Functions.pbi @@ -166,6 +166,8 @@ EndProcedure Procedure DrawHUD() EndProcedure +; and .. + ; ***************************************************************************** ; * Menu @@ -188,4 +190,4 @@ EndProcedure ; Folding = --- ; EnableXP ; EnableCompileCount = 0 -; EnableBuildCount = 0 \ No newline at end of file +; EnableBuildCount = 0 diff --git a/src/Globals.pbi b/src/Globals.pbi index 06e43c8..6fd2da7 100644 --- a/src/Globals.pbi +++ b/src/Globals.pbi @@ -13,6 +13,12 @@ #TILESET_TYPE_SOLID = 3 #TILESET_TYPE_GRASS = 4 +; Player directions +#PLAYER_DIR_UP = 0 +#PLAYER_DIR_RIGHT = 0 +#PLAYER_DIR_DOWN = 0 +#PLAYER_DIR_LEFT = 0 + ; Global variables Global Fullscreen = 0 Global Title.s = "ESCape - Build " + Str(#PB_Editor_BuildCount) @@ -20,9 +26,10 @@ Global Screen.ScreenDimension\width = 800 Screen.ScreenDimension\height = 600 ; Player -Global Player.Tile\X = 0 -Player.Tile\Y = 0 -Player.Tile\TileNumber = 0 +Global Player.Player\X = 0 +Player.Player\Y = 0 +Player.Player\TileNumber = 0 +Player.Player\Direction = #PLAYER_DIR_RIGHT ; Camera Global Cam.Camera\X = 0 @@ -61,4 +68,4 @@ Global Dim ShadowMap.Shadow(#MAP_WIDTH, #MAP_HEIGHT) ; FirstLine = 11 ; EnableXP ; EnableCompileCount = 0 -; EnableBuildCount = 0 \ No newline at end of file +; EnableBuildCount = 0 diff --git a/src/Main.pb b/src/Main.pb index f3d5f07..ced4f5d 100644 --- a/src/Main.pb +++ b/src/Main.pb @@ -71,11 +71,11 @@ menus("RLY_QUIT")\Entries() = Item *ActiveMenu.GameMenu = @Menus(CurrentState) - ; 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. 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) + SetFrameRate(40) ; For Linux compatibility CompilerSelect #PB_Compiler_OS @@ -115,6 +115,8 @@ 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 + + SetFrameRate(40) InitGraphics() InitTileset() EndIf @@ -142,4 +144,4 @@ End ; FirstLine = 72 ; EnableXP ; EnableCompileCount = 0 -; EnableBuildCount = 0 \ No newline at end of file +; EnableBuildCount = 0 diff --git a/src/Structs.pbi b/src/Structs.pbi index d8031c0..e2f8a2c 100644 --- a/src/Structs.pbi +++ b/src/Structs.pbi @@ -43,6 +43,13 @@ Structure Tile Health.i EndStructure +Structure Player + X.i + Y.i + TileNumber.i + Direction.i +EndStructure + Structure Shadow X.i Y.i