mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Added (SPF_)STRETCHPIXELS.
This counteracts the squaring implied by rolling sprites.
This commit is contained in:
parent
2f30f720a4
commit
cca1946201
4 changed files with 6 additions and 3 deletions
|
@ -507,6 +507,7 @@ enum ActorRenderFlag2
|
|||
RF2_NOMIPMAP = 0x0080, // [Nash] forces no mipmapping on sprites. Useful for tiny sprites that need to remain visually crisp
|
||||
RF2_ISOMETRICSPRITES = 0x0100,
|
||||
RF2_SQUAREPIXELS = 0x0200, // apply +ROLLSPRITE scaling math so that non rolling sprites get the same scaling
|
||||
RF2_STRETCHPIXELS = 0x0400, // don't apply SQUAREPIXELS for ROLLSPRITES
|
||||
};
|
||||
|
||||
// This translucency value produces the closest match to Heretic's TINTTAB.
|
||||
|
|
|
@ -70,6 +70,7 @@ enum EParticleFlags
|
|||
SPF_NOFACECAMERA = 1 << 12,
|
||||
SPF_ROLLCENTER = 1 << 13,
|
||||
SPF_NOMIPMAP = 1 << 14,
|
||||
SPF_STRETCHPIXELS = 1 << 15,
|
||||
};
|
||||
|
||||
class DVisualThinker;
|
||||
|
|
|
@ -1038,7 +1038,7 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
|
|||
|
||||
r.Scale(sprscale.X, isSpriteShadow ? sprscale.Y * 0.15 * thing->isoscaleY : sprscale.Y * thing->isoscaleY);
|
||||
|
||||
if ((thing->renderflags & RF_ROLLSPRITE) || (thing->renderflags2 & RF2_SQUAREPIXELS))
|
||||
if (((thing->renderflags & RF_ROLLSPRITE) || (thing->renderflags2 & RF2_SQUAREPIXELS)) && !(thing->renderflags2 & RF2_STRETCHPIXELS))
|
||||
{
|
||||
double ps = di->Level->pixelstretch;
|
||||
double mult = 1.0 / sqrt(ps); // shrink slightly
|
||||
|
@ -1621,7 +1621,7 @@ void HWSprite::AdjustVisualThinker(HWDrawInfo* di, DVisualThinker* spr, sector_t
|
|||
auto r = spi.GetSpriteRect();
|
||||
r.Scale(spr->Scale.X, spr->Scale.Y);
|
||||
|
||||
if (spr->PT.flags & SPF_ROLL)
|
||||
if ((spr->PT.flags & SPF_ROLL) && !(spr->PT.flags & SPF_STRETCHPIXELS))
|
||||
{
|
||||
double ps = di->Level->pixelstretch;
|
||||
double mult = 1.0 / sqrt(ps); // shrink slightly
|
||||
|
|
|
@ -723,6 +723,7 @@ enum EParticleFlags
|
|||
SPF_NOFACECAMERA = 1 << 12,
|
||||
SPF_ROLLCENTER = 1 << 13,
|
||||
SPF_NOMIPMAP = 1 << 14,
|
||||
SPF_STRETCHPIXELS = 1 << 15,
|
||||
|
||||
SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue