From 8bcbd2729388edc63c82d77d314b583af1447c49 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sun, 14 Sep 2025 19:16:44 +0500 Subject: Cleanup math with qfengine ports again --- game/client/game.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'game/client/game.cc') diff --git a/game/client/game.cc b/game/client/game.cc index d61ce84..e772ff8 100644 --- a/game/client/game.cc +++ b/game/client/game.cc @@ -12,7 +12,7 @@ #include "core/resource/resource.hh" -#include "core/utils/physfs.hh" +#include "core/io/physfs.hh" #include "shared/entity/collision.hh" #include "shared/entity/gravity.hh" @@ -101,7 +101,7 @@ static ImFont* load_font(std::string_view path, float size, ImFontConfig& font_c bool font_load_success; std::vector font; - if(!utils::read_file(path, font)) { + if(!io::read_file(path, font)) { spdlog::error("{}: utils::read_file failed", path); std::terminate(); } @@ -549,10 +549,10 @@ void client_game::update(void) auto twice_scale_x = static_cast(globals::width) / half_base_width; auto twice_scale_y = static_cast(globals::height) / half_base_height; - auto scale_x = math::max(1.0f, 0.5f * glm::floor(twice_scale_x)); - auto scale_y = math::max(1.0f, 0.5f * glm::floor(twice_scale_y)); - auto scale_min = math::ceil(math::min(scale_x, scale_y)); - auto scale_int = math::max(1U, (scale_min / 2U) * 2U); + auto scale_x = glm::max(1.0f, 0.5f * glm::floor(twice_scale_x)); + auto scale_y = glm::max(1.0f, 0.5f * glm::floor(twice_scale_y)); + auto scale_min = static_cast(glm::ceil(glm::min(scale_x, scale_y))); + auto scale_int = glm::max(1U, (scale_min / 2U) * 2U); auto& io = ImGui::GetIO(); io.FontGlobalScale = scale_int; -- cgit