mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
Remove the need for RenderPlayerSprites::SetupSpriteScale
This commit is contained in:
parent
ba6094be2e
commit
ca8f71b561
3 changed files with 4 additions and 16 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue