From 61e5bcef2629e2d68b805a956a96fff264d4f74d Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 28 Jun 2025 01:59:49 +0500 Subject: Restructure dependencies and update to C++20 - Nuked static_assert from almost everywhere in the project - Nuked binary dependency support. Might add one later though - Separated dependency headers into a separate include subdirectory - Grafted a thirdpartylegalnotices.txt generator from RITEG - Pushed development snapshot version to 2126 (26th week of 2025) --- game/client/game.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'game/client/game.cc') diff --git a/game/client/game.cc b/game/client/game.cc index 6f68cf9..8dc39f6 100644 --- a/game/client/game.cc +++ b/game/client/game.cc @@ -5,7 +5,6 @@ #include "core/angles.hh" #include "core/binfile.hh" #include "core/config.hh" -#include "core/feature.hh" #include "core/resource.hh" #include "shared/collision.hh" @@ -88,9 +87,9 @@ static void on_glfw_framebuffer_size(const GlfwFramebufferSizeEvent& event) { auto width_float = static_cast(event.size.x); auto height_float = static_cast(event.size.y); - auto wscale = cxpr::max(1U, cxpr::floor(width_float / static_cast(BASE_WIDTH))); - auto hscale = cxpr::max(1U, cxpr::floor(height_float / static_cast(BASE_HEIGHT))); - auto scale = cxpr::min(wscale, hscale); + auto wscale = vx::max(1U, vx::floor(width_float / static_cast(BASE_WIDTH))); + auto hscale = vx::max(1U, vx::floor(height_float / static_cast(BASE_HEIGHT))); + auto scale = vx::min(wscale, hscale); if(globals::gui_scale != scale) { auto& io = ImGui::GetIO(); @@ -113,8 +112,10 @@ static void on_glfw_framebuffer_size(const GlfwFramebufferSizeEvent& event) ImVector ranges = {}; builder.BuildRanges(&ranges); - globals::font_default = io.Fonts->AddFontFromMemoryTTF(bin_unscii16->buffer, bin_unscii16->size, 16.0f * scale, &font_config, ranges.Data); - globals::font_chat = io.Fonts->AddFontFromMemoryTTF(bin_unscii16->buffer, bin_unscii16->size, 8.0f * scale, &font_config, ranges.Data); + globals::font_default = io.Fonts->AddFontFromMemoryTTF( + bin_unscii16->buffer, bin_unscii16->size, 16.0f * scale, &font_config, ranges.Data); + globals::font_chat = io.Fonts->AddFontFromMemoryTTF( + bin_unscii16->buffer, bin_unscii16->size, 8.0f * scale, &font_config, ranges.Data); globals::font_debug = io.Fonts->AddFontFromMemoryTTF(bin_unscii8->buffer, bin_unscii8->size, 4.0f * scale, &font_config); // Re-assign the default font @@ -578,8 +579,8 @@ void client_game::update_late(void) void client_game::render(void) { - auto scaled_width = globals::width / cxpr::max(1, client_game::pixel_size.get_value()); - auto scaled_height = globals::height / cxpr::max(1, client_game::pixel_size.get_value()); + auto scaled_width = globals::width / vx::max(1, client_game::pixel_size.get_value()); + auto scaled_height = globals::height / vx::max(1, client_game::pixel_size.get_value()); glViewport(0, 0, scaled_width, scaled_height); glBindFramebuffer(GL_FRAMEBUFFER, globals::world_fbo); @@ -595,7 +596,8 @@ void client_game::render(void) player_target::render(); if(globals::dimension) { - auto group = globals::dimension->entities.group(entt::get); + auto group = globals::dimension->entities.group( + entt::get); outline::prepare(); -- cgit