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/src/Functions.pbi b/src/Functions.pbi index 03e1f36..fdf70d9 100644 --- a/src/Functions.pbi +++ b/src/Functions.pbi @@ -159,6 +159,8 @@ EndProcedure Procedure DrawHUD() EndProcedure +; and .. + ; ***************************************************************************** ; * Menu diff --git a/src/Globals.pbi b/src/Globals.pbi index 5c2d433..1414a08 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 diff --git a/src/Main.pb b/src/Main.pb index 049dd15..0e7e28d 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) InitGraphics() InitTileset() @@ -108,6 +108,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 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