mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Kill SF_HIRES, use skin_t highresscale instead
This commit is contained in:
parent
c4f0390ad6
commit
80252717c9
8 changed files with 9 additions and 12 deletions
|
|
@ -35,9 +35,8 @@
|
||||||
// Extra abilities/settings for skins (combinable stuff)
|
// Extra abilities/settings for skins (combinable stuff)
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SF_HIRES = 1, // Draw the sprite at different size?
|
SF_MACHINE = 1, // Beep boop. Are you a robot?
|
||||||
SF_MACHINE = 1<<1, // Beep boop. Are you a robot?
|
SF_IRONMAN = 1<<1, // Pick a new skin during POSITION. I main Random!
|
||||||
SF_IRONMAN = 1<<2, // Pick a new skin during POSITION. I main Random!
|
|
||||||
// free up to and including 1<<31
|
// free up to and including 1<<31
|
||||||
} skinflags_t;
|
} skinflags_t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6321,7 +6321,6 @@ struct int_const_s const INT_CONST[] = {
|
||||||
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
|
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
|
||||||
|
|
||||||
// Character flags (skinflags_t)
|
// Character flags (skinflags_t)
|
||||||
{"SF_HIRES",SF_HIRES},
|
|
||||||
{"SF_MACHINE",SF_MACHINE},
|
{"SF_MACHINE",SF_MACHINE},
|
||||||
{"SF_IRONMAN",SF_IRONMAN},
|
{"SF_IRONMAN",SF_IRONMAN},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5298,7 +5298,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
flip ^= (1<<rot);
|
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);
|
this_scale *= FIXED_TO_FLOAT(((skin_t *)thing->skin)->highresscale);
|
||||||
|
|
||||||
spr_width = spritecachedinfo[lumpoff].width;
|
spr_width = spritecachedinfo[lumpoff].width;
|
||||||
|
|
|
||||||
|
|
@ -1178,7 +1178,7 @@ static boolean M_DrawCharacterSprite(INT16 x, INT16 y, INT16 skin, INT32 addflag
|
||||||
if (sprframe->flip & 1) // Only for first sprite
|
if (sprframe->flip & 1) // Only for first sprite
|
||||||
flags |= V_FLIP; // This sprite is left/right flipped!
|
flags |= V_FLIP; // This sprite is left/right flipped!
|
||||||
|
|
||||||
if (skins[skin].flags & SF_HIRES)
|
if (skins[skin].highresscale != FRACUNIT)
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch(x<<FRACBITS,
|
V_DrawFixedPatch(x<<FRACBITS,
|
||||||
y<<FRACBITS,
|
y<<FRACBITS,
|
||||||
|
|
|
||||||
|
|
@ -563,7 +563,6 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value)
|
||||||
// parameters for individual character flags
|
// parameters for individual character flags
|
||||||
// these are uppercase so they can be concatenated with SF_
|
// these are uppercase so they can be concatenated with SF_
|
||||||
// 1, true, yes are all valid values
|
// 1, true, yes are all valid values
|
||||||
GETFLAG(HIRES)
|
|
||||||
GETFLAG(MACHINE)
|
GETFLAG(MACHINE)
|
||||||
GETFLAG(IRONMAN)
|
GETFLAG(IRONMAN)
|
||||||
#undef GETFLAG
|
#undef GETFLAG
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ void R_DrawFloorSplat(vissprite_t *spr)
|
||||||
splat.height = spr->patch->height;
|
splat.height = spr->patch->height;
|
||||||
splat.scale = mobj->scale;
|
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);
|
splat.scale = FixedMul(splat.scale, ((skin_t *)mobj->skin)->highresscale);
|
||||||
|
|
||||||
if (spr->rotateflags & SRF_3D || renderflags & RF_NOSPLATBILLBOARD)
|
if (spr->rotateflags & SRF_3D || renderflags & RF_NOSPLATBILLBOARD)
|
||||||
|
|
|
||||||
|
|
@ -945,7 +945,7 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
||||||
frac = vis->startfrac;
|
frac = vis->startfrac;
|
||||||
windowtop = windowbottom = sprbotscreen = INT32_MAX;
|
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);
|
this_scale = FixedMul(this_scale, ((skin_t *)vis->mobj->skin)->highresscale);
|
||||||
|
|
||||||
if (this_scale <= 0)
|
if (this_scale <= 0)
|
||||||
|
|
@ -1410,7 +1410,7 @@ static void R_ProjectDropShadow(
|
||||||
shadow->gzt = groundz + patch->height * shadowyscale / 2;
|
shadow->gzt = groundz + patch->height * shadowyscale / 2;
|
||||||
shadow->gz = shadow->gzt - patch->height * shadowyscale;
|
shadow->gz = shadow->gzt - patch->height * shadowyscale;
|
||||||
shadow->texturemid = FixedMul(interp.scale, FixedDiv(shadow->gzt - viewz, 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->texturemid = FixedMul(shadow->texturemid, ((skin_t *)thing->skin)->highresscale);
|
||||||
shadow->scalestep = 0;
|
shadow->scalestep = 0;
|
||||||
shadow->shear.tan = shadowskew; // repurposed variable
|
shadow->shear.tan = shadowskew; // repurposed variable
|
||||||
|
|
@ -1797,7 +1797,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
|
|
||||||
I_Assert(lump < max_spritelumps);
|
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);
|
this_scale = FixedMul(this_scale, ((skin_t *)thing->skin)->highresscale);
|
||||||
|
|
||||||
spr_width = spritecachedinfo[lump].width;
|
spr_width = spritecachedinfo[lump].width;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue