From 0cd3780d93b81b772eb891645927bccc5eb21399 Mon Sep 17 00:00:00 2001 From: ineveraskedforthis Date: Tue, 19 May 2026 11:33:30 +0300 Subject: [PATCH 1/2] provide mipmaps to terrain texture --- src/gamestate/game_scene.cpp | 9 ++ src/map/map.cpp | 175 ++++++++++++++++++++++++++++++++++- 2 files changed, 182 insertions(+), 2 deletions(-) diff --git a/src/gamestate/game_scene.cpp b/src/gamestate/game_scene.cpp index 02e7fa77a..427a249ee 100644 --- a/src/gamestate/game_scene.cpp +++ b/src/gamestate/game_scene.cpp @@ -867,7 +867,16 @@ void console_log_other(sys::state& state, std::string_view message) { auto dt = state.current_date.to_ymd(state.start_date); auto dtstr = std::to_string(dt.year) + "." + std::to_string(dt.month) + "." + std::to_string(dt.day); msg = "" + std::string(state.network_state.nickname.to_string_view()) + "|" + dtstr + "| " + msg; +#ifndef NDEBUG +#ifdef _WIN32 + OutputDebugStringA(msg.c_str()); + OutputDebugStringA("\n"); +#else + std::clog << msg + "\n"; +#endif +#else state.push_log_message(std::move(msg)); +#endif } diff --git a/src/map/map.cpp b/src/map/map.cpp index c54548af0..b50c0ab08 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -3441,6 +3441,23 @@ void display_data::set_province_text_lines(sys::state& state, std::vector Date: Tue, 19 May 2026 12:01:36 +0300 Subject: [PATCH 2/2] fix windows build? --- src/map/map.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/map/map.cpp b/src/map/map.cpp index b50c0ab08..b40a6f245 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -3849,7 +3849,7 @@ void display_data::load_map(sys::state& state) { glUseProgram(shader_program); glUniform1f(blur_uniform, 0); - glUniform2f(screen_uniform, dds_size_x, dds_size_y); + glUniform2f(screen_uniform, (float)dds_size_x, (float)dds_size_y); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, dds_texture); @@ -3919,15 +3919,15 @@ void display_data::load_map(sys::state& state) { glBlitFramebuffer( // SOURCE - x * p_dx, - y * p_dy, - (x + 1) * p_dx, - (y + 1) * p_dy, + x * (GLint)p_dx, + y * (GLint)p_dy, + (x + 1) * (GLint)p_dx, + (y + 1) * (GLint)p_dy, // TARGET - 0, - 0, - p_dx, - p_dy, + (GLint)0, + (GLint)0, + (GLint)p_dx, + (GLint)p_dy, // WHAT TO COPY GL_COLOR_BUFFER_BIT, // HOW TO COPY