From 09c3060728079c6ec12128f3f0821379888ebd23 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 22 Mar 2017 05:51:12 -0400 Subject: [PATCH] - fixed: skybug on ARM was caused by undefined conversion from float to unsigned int. adding intermediary signed int cast fixes this problem. --- src/swrenderer/plane/r_skyplane.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swrenderer/plane/r_skyplane.cpp b/src/swrenderer/plane/r_skyplane.cpp index c75411e7f..e76016a3e 100644 --- a/src/swrenderer/plane/r_skyplane.cpp +++ b/src/swrenderer/plane/r_skyplane.cpp @@ -180,8 +180,8 @@ namespace swrenderer double v = (texturemid + uv_stepd * (y1 - viewport->CenterY + 0.5)) / height; double v_step = uv_stepd / height; - uint32_t uv_pos = (uint32_t)(v * 0x01000000); - uint32_t uv_step = (uint32_t)(v_step * 0x01000000); + uint32_t uv_pos = (uint32_t)(int32_t)(v * 0x01000000); + uint32_t uv_step = (uint32_t)(int32_t)(v_step * 0x01000000); int x = start_x; if (renderportal->MirrorFlags & RF_XFLIP)