Kill SF_HIRES, use skin_t highresscale instead

This commit is contained in:
AJ Martinez 2022-11-03 16:19:17 -07:00
parent c4f0390ad6
commit 80252717c9
8 changed files with 9 additions and 12 deletions

View file

@ -35,9 +35,8 @@
// Extra abilities/settings for skins (combinable stuff)
typedef enum
{
SF_HIRES = 1, // Draw the sprite at different size?
SF_MACHINE = 1<<1, // Beep boop. Are you a robot?
SF_IRONMAN = 1<<2, // Pick a new skin during POSITION. I main Random!
SF_MACHINE = 1, // Beep boop. Are you a robot?
SF_IRONMAN = 1<<1, // Pick a new skin during POSITION. I main Random!
// free up to and including 1<<31
} skinflags_t;

View file

@ -6321,7 +6321,6 @@ struct int_const_s const INT_CONST[] = {
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
// Character flags (skinflags_t)
{"SF_HIRES",SF_HIRES},
{"SF_MACHINE",SF_MACHINE},
{"SF_IRONMAN",SF_IRONMAN},

View file

@ -5298,7 +5298,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
flip ^= (1<<rot);
}
if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES)
if (thing->skin && ((skin_t *)thing->skin)->highresscale != FRACUNIT)
this_scale *= FIXED_TO_FLOAT(((skin_t *)thing->skin)->highresscale);
spr_width = spritecachedinfo[lumpoff].width;

View file

@ -1178,7 +1178,7 @@ static boolean M_DrawCharacterSprite(INT16 x, INT16 y, INT16 skin, INT32 addflag
if (sprframe->flip & 1) // Only for first sprite
flags |= V_FLIP; // This sprite is left/right flipped!
if (skins[skin].flags & SF_HIRES)
if (skins[skin].highresscale != FRACUNIT)
{
V_DrawFixedPatch(x<<FRACBITS,
y<<FRACBITS,

View file

@ -4169,7 +4169,7 @@ void P_PlayerThink(player_t *player)
{
player->stairjank--;
}
// Random skin / "ironman"
if ((!P_MobjWasRemoved(player->mo)) && (skins[player->skin].flags & SF_IRONMAN)) // we are Heavy Magician with a mobj
{

View file

@ -563,7 +563,6 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value)
// parameters for individual character flags
// these are uppercase so they can be concatenated with SF_
// 1, true, yes are all valid values
GETFLAG(HIRES)
GETFLAG(MACHINE)
GETFLAG(IRONMAN)
#undef GETFLAG

View file

@ -181,7 +181,7 @@ void R_DrawFloorSplat(vissprite_t *spr)
splat.height = spr->patch->height;
splat.scale = mobj->scale;
if (mobj->skin && ((skin_t *)mobj->skin)->flags & SF_HIRES)
if (mobj->skin && ((skin_t *)mobj->skin)->highresscale != FRACUNIT)
splat.scale = FixedMul(splat.scale, ((skin_t *)mobj->skin)->highresscale);
if (spr->rotateflags & SRF_3D || renderflags & RF_NOSPLATBILLBOARD)

View file

@ -945,7 +945,7 @@ static void R_DrawVisSprite(vissprite_t *vis)
frac = vis->startfrac;
windowtop = windowbottom = sprbotscreen = INT32_MAX;
if (!(vis->cut & SC_PRECIP) && vis->mobj->skin && ((skin_t *)vis->mobj->skin)->flags & SF_HIRES)
if (!(vis->cut & SC_PRECIP) && vis->mobj->skin && ((skin_t *)vis->mobj->skin)->highresscale != FRACUNIT)
this_scale = FixedMul(this_scale, ((skin_t *)vis->mobj->skin)->highresscale);
if (this_scale <= 0)
@ -1410,7 +1410,7 @@ static void R_ProjectDropShadow(
shadow->gzt = groundz + patch->height * shadowyscale / 2;
shadow->gz = shadow->gzt - patch->height * shadowyscale;
shadow->texturemid = FixedMul(interp.scale, FixedDiv(shadow->gzt - viewz, shadowyscale));
if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES)
if (thing->skin && ((skin_t *)thing->skin)->highresscale != FRACUNIT)
shadow->texturemid = FixedMul(shadow->texturemid, ((skin_t *)thing->skin)->highresscale);
shadow->scalestep = 0;
shadow->shear.tan = shadowskew; // repurposed variable
@ -1797,7 +1797,7 @@ static void R_ProjectSprite(mobj_t *thing)
I_Assert(lump < max_spritelumps);
if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES)
if (thing->skin && ((skin_t *)thing->skin)->highresscale != FRACUNIT)
this_scale = FixedMul(this_scale, ((skin_t *)thing->skin)->highresscale);
spr_width = spritecachedinfo[lump].width;