From 507aff0ec0da56dee8dd9b64e63e6ac2ceecf69e Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 23 Jan 2017 11:20:20 +0000 Subject: [PATCH] G_DrawTileScaled: Shift the draw offsets left by 16 before applying weapon scaling git-svn-id: https://svn.eduke32.com/eduke32@6028 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/player.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 66d731e3d..d486b5bea 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -1702,18 +1702,18 @@ static void G_DrawTileScaled(int drawX, int drawY, int tileNum, int drawShade, i int32_t wy[2] = { windowxy1.y, windowxy2.y }; int drawYOffset = 0; - int drawXOffset = 192; + int drawXOffset = 192<<16; switch (hudweap.cur) { case DEVISTATOR_WEAPON: case TRIPBOMB_WEAPON: - drawXOffset = 160; + drawXOffset = 160<<16; break; default: if (drawBits & DRAWEAP_CENTER) { - drawXOffset = 160; + drawXOffset = 160<<16; drawBits &= ~DRAWEAP_CENTER; } break; @@ -1746,10 +1746,10 @@ static void G_DrawTileScaled(int drawX, int drawY, int tileNum, int drawShade, i #ifdef USE_OPENGL if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(tileNum,drawPal) >= 0) - drawY += (224-weapsc(224)); + drawYOffset += (224<<16)-weapsc(224<<16); #endif - rotatesprite(weapsc(drawX<<16) + ((drawXOffset-weapsc(drawXOffset))<<16), - weapsc((drawY<<16) + g_dts_yadd) + ((200-weapsc(200))<<16) + drawYOffset, + rotatesprite(weapsc(drawX<<16) + (drawXOffset-weapsc(drawXOffset)), + weapsc((drawY<<16) + g_dts_yadd) + ((200<<16)-weapsc(200<<16)) + drawYOffset, weapsc(65536L),drawAng,tileNum,drawShade,drawPal,(2|drawBits), wx[0],wy[0], wx[1],wy[1]); }