diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 4c262ca99..bea6ca904 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -549,18 +549,17 @@ void hud_drawsprite(double sx, double sy, int z, double a, int picnum, int dasha { double dz = z / 65536.; alpha *= (dastat & RS_TRANS1)? glblend[0].def[!!(dastat & RS_TRANS2)].alpha : 1.; - TexturePick pick; int palid = TRANSLATION(Translation_Remap + curbasepal, dapalnum); if (picanm[picnum].sf & PICANM_ANIMTYPE_MASK) picnum += animateoffs(picnum, 0); - if (!PickTexture(picnum, nullptr, palid, pick)) return; + auto tex = tileGetTexture(picnum); - DrawTexture(&twodpsp, pick.texture, sx, sy, - DTA_ScaleX, dz * tileWidth(picnum) / pick.texture->GetDisplayWidth() , DTA_ScaleY, dz * tileHeight(picnum) / pick.texture->GetDisplayHeight(), + DrawTexture(&twodpsp, tex, sx, sy, + DTA_ScaleX, dz, DTA_ScaleY, dz, DTA_Color, shadeToLight(dashade), - DTA_TranslationIndex, pick.translation & 0x7fffffff, + DTA_TranslationIndex, palid, DTA_ViewportX, windowxy1.x, DTA_ViewportY, windowxy1.y, DTA_ViewportWidth, windowxy2.x - windowxy1.x + 1, DTA_ViewportHeight, windowxy2.y - windowxy1.y + 1, DTA_FullscreenScale, (dastat & RS_STRETCH)? FSMode_ScaleToScreen: FSMode_ScaleToHeight, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, @@ -573,8 +572,6 @@ void hud_drawsprite(double sx, double sy, int z, double a, int picnum, int dasha DTA_Rotate, a * (-360./2048), DTA_FlipOffsets, !(dastat & (/*RS_TOPLEFT |*/ RS_CENTER)), DTA_Alpha, alpha, - DTA_Indexed, false,// !!(pick.translation & 0x80000000), - // todo: pass pick.tintFlags and pick.tintColor TAG_DONE); }