mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
apply weaponscale relative to baseline
This commit is contained in:
parent
0b93aef776
commit
441b70022d
2 changed files with 5 additions and 2 deletions
|
@ -411,6 +411,7 @@ bool HUDSprite::GetWeaponRect(HWDrawInfo *di, DPSprite *psp, float sx, float sy,
|
|||
float tx;
|
||||
float scale;
|
||||
float scalex;
|
||||
float ftextureadj;
|
||||
float ftexturemid;
|
||||
|
||||
// decide which patch to use
|
||||
|
@ -445,7 +446,8 @@ bool HUDSprite::GetWeaponRect(HWDrawInfo *di, DPSprite *psp, float sx, float sy,
|
|||
x2 += viewwindowx;
|
||||
|
||||
// killough 12/98: fix psprite positioning problem
|
||||
ftexturemid = 100.f - sy - r.top - psp->GetYAdjust(screenblocks >= 11);
|
||||
ftextureadj = (120.0f / psp->baseScale.Y) - 100.0f; // [XA] scale relative to weapon baseline
|
||||
ftexturemid = 100.f - sy - r.top - psp->GetYAdjust(screenblocks >= 11) - ftextureadj;
|
||||
|
||||
// [XA] note: Doom's native 1.2x aspect ratio was originally
|
||||
// handled here by multiplying SCREENWIDTH by 200 instead of
|
||||
|
|
|
@ -293,7 +293,8 @@ namespace swrenderer
|
|||
vis.renderflags = owner->renderflags;
|
||||
|
||||
FSoftwareTexture* stex = GetSoftwareTexture(tex);
|
||||
vis.texturemid = (BASEYCENTER - sy) * stex->GetScale().Y + stex->GetTopOffset(0);
|
||||
double textureadj = (120.0f / pspr->baseScale.Y) - BASEYCENTER; // [XA] scale relative to weapon baseline
|
||||
vis.texturemid = (BASEYCENTER - sy - textureadj) * stex->GetScale().Y + stex->GetTopOffset(0);
|
||||
|
||||
// Force it to use software rendering when drawing to a canvas texture.
|
||||
bool renderToCanvas = viewport->RenderingToCanvas;
|
||||
|
|
Loading…
Reference in a new issue