From 3bf42c6ff3805a0d42bbc661794a95ff31bedc26 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 15 Mar 2025 16:22:09 +0500 Subject: Add whatever I was working on for the last month --- game/client/globals.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 game/client/globals.cc (limited to 'game/client/globals.cc') diff --git a/game/client/globals.cc b/game/client/globals.cc new file mode 100644 index 0000000..071cf0a --- /dev/null +++ b/game/client/globals.cc @@ -0,0 +1,47 @@ +#include "client/pch.hh" +#include "client/globals.hh" + +#include "core/config.hh" + +#include "client/gui_screen.hh" + +Config globals::client_config; + +GLFWwindow *globals::window; + +float globals::window_frametime; +float globals::window_frametime_avg; +std::uint64_t globals::window_frametime_us; +std::uint64_t globals::window_framecount; + +std::uint64_t globals::fixed_accumulator; + +int globals::width; +int globals::height; +float globals::aspect; + +GLuint globals::world_fbo; +GLuint globals::world_fbo_color; +GLuint globals::world_fbo_depth; + +std::size_t globals::num_drawcalls; +std::size_t globals::num_triangles; + +ENetHost *globals::client_host; + +Dimension *globals::dimension = nullptr; +entt::entity globals::player; + +ImFont *globals::font_debug; +ImFont *globals::font_default; +ImFont *globals::font_chat; + +ConfigKeyBind *globals::gui_keybind_ptr = nullptr; +ConfigGamepadAxis *globals::gui_gamepad_axis_ptr = nullptr; +ConfigGamepadButton *globals::gui_gamepad_button_ptr = nullptr; + +unsigned int globals::gui_scale = 0U; +unsigned int globals::gui_screen = GUI_SCREEN_NONE; + +ALCdevice *globals::sound_dev; +ALCcontext *globals::sound_ctx; -- cgit