From 584c334c080a231a0169f158dc366adc65b944ff Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 21 Sep 2015 21:12:46 +0000 Subject: [PATCH] gfx3d - optimize texCoordinateTransform==1 a little bit, while I was looking at it anyway --- desmume/src/gfx3d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index 5bc8062f9..7ad66f65e 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -1344,8 +1344,8 @@ static void gfx3d_glTexCoord(s32 val) if (texCoordinateTransform == 1) { //dragon quest 4 overworld will test this - last_s = (s32)(((s64)(_s<<12) * mtxCurrent[3][0] + (s64)(_t<<12) * mtxCurrent[3][4] + ((s64)mtxCurrent[3][8]<<12) + ((s64)mtxCurrent[3][12]<<12))>>24); - last_t = (s32)(((s64)(_s<<12) * mtxCurrent[3][1] + (s64)(_t<<12) * mtxCurrent[3][5] + ((s64)mtxCurrent[3][9]<<12) + ((s64)mtxCurrent[3][13]<<12))>>24); + last_s = (s32) (( (s64)_s * mtxCurrent[3][0] + (s64)_t * mtxCurrent[3][4] + (s64)mtxCurrent[3][8] + (s64)mtxCurrent[3][12])>>12); + last_t = (s32) (( (s64)_s * mtxCurrent[3][1] + (s64)_t * mtxCurrent[3][5] + (s64)mtxCurrent[3][9] + (s64)mtxCurrent[3][13])>>12); } else if(texCoordinateTransform == 0) {