- made some adjustment for the DrawTexture changes.

This commit is contained in:
Christoph Oelckers 2016-04-09 20:49:27 +02:00
parent fde1f28d71
commit 2e16f3d77e

View file

@ -359,11 +359,12 @@ void FGLRenderer::DrawTexture(FTexture *img, DrawParms &parms)
if (parms.windowleft > 0 || parms.windowright < parms.texwidth)
{
double wi = MIN(parms.windowright, parms.texwidth);
x += parms.windowleft * xscale;
w -= (parms.texwidth - parms.windowright + parms.windowleft) * xscale;
w -= (parms.texwidth - wi + parms.windowleft) * xscale;
u1 = float(u1 + parms.windowleft / parms.texwidth);
u2 = float(u2 - (parms.texwidth - parms.windowright) / parms.texwidth);
u2 = float(u2 - (parms.texwidth - wi) / parms.texwidth);
}
PalEntry color;