Remove the need for RenderPlayerSprites::SetupSpriteScale

This commit is contained in:
Magnus Norddahl 2017-01-24 04:19:43 +01:00
parent ba6094be2e
commit ca8f71b561
3 changed files with 4 additions and 16 deletions

View file

@ -113,9 +113,6 @@ namespace swrenderer
WallTMapScale2 = IYaspectMul / CenterX; WallTMapScale2 = IYaspectMul / CenterX;
// psprite scales
RenderPlayerSprites::Instance()->SetupSpriteScale();
// thing clipping // thing clipping
fillshort(screenheightarray, viewwidth, (short)viewheight); fillshort(screenheightarray, viewwidth, (short)viewheight);

View file

@ -71,13 +71,6 @@ namespace swrenderer
return &instance; return &instance;
} }
void RenderPlayerSprites::SetupSpriteScale()
{
pspritexscale = centerxwide / 160.0;
pspriteyscale = pspritexscale * YaspectMul;
pspritexiscale = 1 / pspritexscale;
}
void RenderPlayerSprites::Render() void RenderPlayerSprites::Render()
{ {
int i; int i;
@ -248,6 +241,10 @@ namespace swrenderer
sy += wy; sy += wy;
} }
double pspritexscale = centerxwide / 160.0;
double pspriteyscale = pspritexscale * YaspectMul;
double pspritexiscale = 1 / pspritexscale;
// calculate edges of the shape // calculate edges of the shape
tx = sx - BASEXCENTER; tx = sx - BASEXCENTER;

View file

@ -76,8 +76,6 @@ namespace swrenderer
public: public:
static RenderPlayerSprites *Instance(); static RenderPlayerSprites *Instance();
void SetupSpriteScale();
void Render(); void Render();
void RenderRemaining(); void RenderRemaining();
@ -88,9 +86,5 @@ namespace swrenderer
enum { BASEYCENTER = 100 }; enum { BASEYCENTER = 100 };
TArray<HWAccelPlayerSprite> AcceleratedSprites; TArray<HWAccelPlayerSprite> AcceleratedSprites;
double pspritexscale = 0.0;
double pspritexiscale = 0.0;
double pspriteyscale = 0.0;
}; };
} }