- added Entryway's AM_Rotate optimization.

SVN r2739 (trunk)
This commit is contained in:
Christoph Oelckers 2010-09-10 13:49:08 +00:00
parent 610ff3956e
commit ec0b07b5e2
2 changed files with 14 additions and 6 deletions

View File

@ -1940,12 +1940,20 @@ void AM_drawWalls (bool allmap)
void AM_rotate(fixed_t *xp, fixed_t *yp, angle_t a)
{
static angle_t angle_saved = 0;
static double sinrot = 0;
static double cosrot = 1;
if (angle_saved != a)
{
angle_saved = a;
double rot = (double)a / (double)(1u << 31) * (double)M_PI;
sinrot = sin(rot);
cosrot = cos(rot);
}
double x = FIXED2FLOAT(*xp);
double y = FIXED2FLOAT(*yp);
double rot = (double)a / (double)(1u << 31) * (double)M_PI;
double sinrot = sin(rot);
double cosrot = cos(rot);
double tmpx = (x * cosrot) - (y * sinrot);
y = (x * sinrot) + (y * cosrot);
x = tmpx;

View File

@ -3311,8 +3311,8 @@ void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
quad->NumTris = npoints - 2;
yoffs = GatheringWipeScreen ? 0 : LBOffset;
uscale = float(1.f / (texture->GetWidth() * scalex));
vscale = float(1.f / (texture->GetHeight() * scaley));
uscale = float(1.f / (texture->GetScaledWidth() * scalex));
vscale = float(1.f / (texture->GetScaledHeight() * scaley));
ox = float(originx);
oy = float(originy);