From e1141a00625d8d3fb76667765ee9bd4b7a52f5e0 Mon Sep 17 00:00:00 2001 From: iProgramInCpp Date: Tue, 30 Apr 2024 11:16:02 +0300 Subject: [PATCH] * More work mate --- source/client/renderer/GameRenderer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/client/renderer/GameRenderer.cpp b/source/client/renderer/GameRenderer.cpp index aae820b7..a7bb77fa 100644 --- a/source/client/renderer/GameRenderer.cpp +++ b/source/client/renderer/GameRenderer.cpp @@ -586,7 +586,11 @@ void GameRenderer::renderLevel(float f) } #define C_ISOM_SIZE (10) -#define C_ISOM_SIZE2 (50) +#define C_ISOM_SIZE2 (37.75f) // 854x480 +//#define C_ISOM_SIZE2 (40.36f) // 1920x1009 + +// rationale is something like "game can render 2*C_ISOM_SIZE2 blocks on the X axis" + #define C_MAX_ISOM_STAGE (C_ISOM_SIZE * C_ISOM_SIZE) void GameRenderer::startIsometricRender() { @@ -605,8 +609,8 @@ void GameRenderer::beginIsom(bool &oldDontRenderGui) m_bIsometric = false; } else if (m_bIsometric) { - int xInImg = (m_isomStage % C_ISOM_SIZE - C_ISOM_SIZE / 2) * C_ISOM_SIZE2; - int zInImg = (m_isomStage / C_ISOM_SIZE - C_ISOM_SIZE / 2) * C_ISOM_SIZE2; + float xInImg = float(m_isomStage % C_ISOM_SIZE - C_ISOM_SIZE / 2) * C_ISOM_SIZE2; + float zInImg = float(m_isomStage / C_ISOM_SIZE - C_ISOM_SIZE / 2) * C_ISOM_SIZE2; m_isometricX = 0.0f; m_isometricY = 70.0f;