From f31f31a17e84558b9d85b200da87a8d94c96ed37 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 2 Mar 2019 23:21:32 +0000 Subject: [PATCH] Rework previous commit to use a little less floating point math git-svn-id: https://svn.eduke32.com/eduke32@7369 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/voxmodel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/build/src/voxmodel.cpp b/source/build/src/voxmodel.cpp index 8d2a5d7b0..bb886d381 100644 --- a/source/build/src/voxmodel.cpp +++ b/source/build/src/voxmodel.cpp @@ -933,8 +933,9 @@ int32_t polymost_voxdraw(voxmodel_t *m, const uspritetype *tspr) m0.z *= f; a0.z *= f; k0 = (float) tspr->z; - k0 -= (tspr->yoffset*tspr->yrepeat)*4.f*m->bscale; - if (!(tspr->cstat&128)) k0 -= (m->piv.z*tspr->yrepeat)*4.f*m->bscale; + k0 -= ((tspr->yoffset * tspr->yrepeat) << 2) * m->bscale; + if (!(tspr->cstat & 128)) + k0 -= (tspr->yrepeat << 2) * m->piv.z * m->bscale; f = (65536.f*512.f) / ((float)xdimen*viewingrange); g = 32.f / ((float)xdimen*gxyaspect);