summaryrefslogtreecommitdiffstats
path: root/src/game/client/globals.cc
blob: 4e161071056216425270e639083f0668fffbd223 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-License-Identifier: BSD-2-Clause
// Copyright (c) 2025 Kirill Dmitrievich
// File: globals.cc
// Description: Global variables

#include "client/pch.hh"

#include "client/globals.hh"

#include "core/io/config_map.hh"

#include "client/gui/gui_screen.hh"

ConfigMap 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_unscii16;
ImFont* globals::font_unscii8;

config::KeyBind* globals::gui_keybind_ptr = nullptr;
config::GamepadAxis* globals::gui_gamepad_axis_ptr = nullptr;
config::GamepadButton* 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;