- yet more SetScale uses.

This commit is contained in:
Christoph Oelckers 2022-10-05 20:00:09 +02:00
parent e6a97157d7
commit 8d1626de02
18 changed files with 42 additions and 75 deletions

View file

@ -63,8 +63,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.pal != 0)
{
act->clipdist = 20;
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
act->spr.SetScale(0.625, 0.625);
}
else
{
@ -75,8 +74,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
}
else
{
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
act->spr.SetScale(0.625, 0.625);
act->clipdist = 20;
}
@ -123,7 +121,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, STAT_MISC);
act->spr.pos.X += krandf(16) - 8;
act->spr.pos.Y += krandf(16) - 8;
act->spr.xrepeat = 20;
act->spr.SetScale(0.3125, 0.3125);
act->spr.yrepeat = 20;
return act;
case SERIOUSSAM:
@ -830,8 +828,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.pal && (!isWorldTour() || !(currentLevel->flags & LEVEL_WT_BOSSSPAWN) || act->spr.pal != 22))
{
act->clipdist = 20;
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
act->spr.SetScale(0.625, 0.625);
}
else
{
@ -844,8 +841,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
if (act->spr.picnum != SHARK)
{
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
act->spr.SetScale(0.625, 0.625);
act->clipdist = 20;
}
else

View file

@ -801,8 +801,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case SHARK:
case VIXEN:
rrra_badguy2:
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
act->spr.SetScale(0.625, 0.625);
// Note: All inappropriate tiles have already been weeded out by the outer switch block so this does not need game type checks anymore.
switch (act->spr.picnum)
{
@ -814,8 +813,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
}
else
{
act->spr.xrepeat = 22;
act->spr.yrepeat = 20;
act->spr.SetScale(0.34375, 0.3125);
}
act->setClipDistFromTile();
break;
@ -911,14 +909,12 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
}
else if (act->spr.pal == 32)
{
act->spr.xrepeat = 50;
act->spr.yrepeat = 50;
act->spr.SetScale(0.78125, 0.78125);
act->clipdist = 25;
}
else
{
act->spr.xrepeat = 50;
act->spr.yrepeat = 50;
act->spr.SetScale(0.78125, 0.78125);
act->clipdist = 25;
}
break;
@ -944,8 +940,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case CHEER:
case CHEERSTAYPUT:
act->spr.xrepeat = 20;
act->spr.yrepeat = 20;
act->spr.SetScale(0.34375, 0.3125);
act->setClipDistFromTile();
break;
case MAKEOUT:
@ -1266,8 +1261,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RPG2SPRITE:
if (!isRRRA()) goto default_case;
act->spr.xrepeat = 20;
act->spr.yrepeat = 20;
act->spr.SetScale(0.34375, 0.3125);
break;
case SHRINKERSPRITE:
act->spr.xrepeat = 22;

View file

@ -72,8 +72,7 @@ void BuildAnubis(DExhumedActor* ap, const DVector3& pos, sectortype* pSector, DA
ap->spr.pal = ap->sector()->ceilingpal;
ap->clipdist = 15;
ap->spr.angle = nAngle;
ap->spr.xrepeat = 40;
ap->spr.yrepeat = 40;
ap->spr.SetScale(0.625, 0.625);
ap->vel.X = 0;
ap->vel.Y = 0;
ap->vel.Z = 0;
@ -413,8 +412,7 @@ void AIAnubis::Damage(RunListEvent* ev)
auto pDrumActor = insertActor(ap->sector(), kStatAnubisDrum);
pDrumActor->spr.pos = { ap->spr.pos.X, ap->spr.pos.Y, pDrumActor->sector()->floorz };
pDrumActor->spr.xrepeat = 40;
pDrumActor->spr.yrepeat = 40;
pDrumActor->spr.SetScale(0.625, 0.625);
pDrumActor->spr.shade = -64;
BuildObject(pDrumActor, 2, 0);

View file

@ -59,8 +59,7 @@ DExhumedActor* BuildBubble(const DVector3& pos, sectortype* pSector)
pActor->spr.shade = -32;
pActor->spr.pal = 0;
pActor->clipdist = 1.25;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.SetScale(0.625, 0.625);
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->spr.picnum = 1;

View file

@ -360,8 +360,7 @@ int MoveBullet(int nBullet)
{
pBullet->nSeq = 45;
pBullet->nFrame = 0;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.SetScale(0.625, 0.625);
pActor->spr.shade = 0;
pActor->spr.pos.Z += 2;
}

View file

@ -175,8 +175,7 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->spr.shade = -12;
pActor->clipdist = 20;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.SetScale(0.625, 0.625);
pActor->spr.pal = pActor->sector()->ceilingpal;
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;

View file

@ -127,8 +127,7 @@ void BuildGrenade(int nPlayer)
pActor->spr.pos = pPlayerActor->spr.pos.plusZ(-15);
pActor->spr.shade = -64;
pActor->spr.xrepeat = 20;
pActor->spr.yrepeat = 20;
pActor->spr.SetScale(0.34375, 0.3125);
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pActor->spr.picnum = 1;
pActor->spr.pal = 0;

View file

@ -58,8 +58,7 @@ void BuildLion(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->clipdist = 15;
pActor->spr.shade = -12;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.SetScale(0.625, 0.625);
pActor->spr.picnum = 1;
pActor->spr.pal = pActor->sector()->ceilingpal;
pActor->spr.xoffset = 0;

View file

@ -1401,8 +1401,7 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal)
pSpark->spr.pal = 1;
pSpark->spr.xoffset = 0;
pSpark->spr.yoffset = 0;
pSpark->spr.xrepeat = 50;
pSpark->spr.yrepeat = 50;
pSpark->spr.SetScale(0.78125, 0.78125);
if (nVal >= 2)
{

View file

@ -322,8 +322,7 @@ void RestartPlayer(int nPlayer)
pActor->spr.shade = -12;
pActor->clipdist = 14.5;
pActor->spr.pal = 0;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.SetScale(0.625, 0.625);
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->spr.picnum = seq_GetSeqPicnum(kSeqJoe, 18, 0);

View file

@ -112,8 +112,7 @@ void BuildRat(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D
pActor->spr.pal = pActor->sector()->ceilingpal;
pActor->clipdist = 7.5;
pActor->spr.angle = nAngle;
pActor->spr.xrepeat = 50;
pActor->spr.yrepeat = 50;
pActor->spr.SetScale(0.78125, 0.78125);
pActor->vel.X = 0;
pActor->vel.Y = 0;
pActor->vel.Z = 0;

View file

@ -62,8 +62,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, const DVector3& pos, sectortyp
pActor->spr.pal = pActor->sector()->ceilingpal;
pActor->clipdist = 15;
pActor->spr.angle = angle;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.SetScale(0.625, 0.625);
pActor->vel.X = 0;
pActor->vel.Y = 0;
pActor->vel.Z = 0;

View file

@ -63,8 +63,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, const DVector3& pos, sectortype*
spp->vel.X = 0;
spp->vel.Y = 0;
spp->vel.Z = 0;
spp->spr.xrepeat = 40;
spp->spr.yrepeat = 40;
spp->spr.SetScale(0.625, 0.625);
spp->spr.pal = spp->sector()->ceilingpal;
spp->spr.xoffset = 0;
spp->spr.yoffset = 0;

View file

@ -61,13 +61,11 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, const DVector3& pos, sectortype*
if (bEggWasp)
{
pActor->spr.xrepeat = 20;
pActor->spr.yrepeat = 20;
pActor->spr.SetScale(0.34375, 0.3125);
}
else
{
pActor->spr.xrepeat = 50;
pActor->spr.yrepeat = 50;
pActor->spr.SetScale(0.78125, 0.78125);
}
pActor->spr.xoffset = 0;

View file

@ -952,8 +952,7 @@ int DoChemBomb(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->spr.SetScale(0.625, 0.625);
actorNew->opos = actor->opos;
// !Frank - dont do translucent
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);

View file

@ -8600,8 +8600,7 @@ int DoGrenade(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->spr.SetScale(0.625, 0.625);
actorNew->opos = actor->opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
@ -9603,8 +9602,7 @@ int DoRocket(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->spr.SetScale(0.625, 0.625);
actorNew->opos = actor->opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
@ -9704,8 +9702,7 @@ int DoMicro(DSWActor* actor)
SetOwner(GetOwner(actor), actorNew);
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 20;
actorNew->spr.yrepeat = 20;
actorNew->spr.SetScale(0.34375, 0.3125);
actorNew->opos = actor->opos;
actorNew->vel.Z = -actor->vel.Z;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -11426,8 +11423,7 @@ int DoMirv(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->spr.SetScale(0.625, 0.625);
actorNew->clipdist = 2;
actorNew->vel.Z = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -15906,8 +15902,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp)
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], actor->sector(), actor->spr.pos, actor->spr.angle, ROCKET_VELOCITY);
SetOwner(pp->actor, actorNew);
actorNew->spr.yrepeat = 40;
actorNew->spr.xrepeat = 40;
actorNew->spr.SetScale(0.625, 0.625);
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->clipdist = 2;
@ -15946,8 +15941,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL, s_Fireball, actor->sector(), actor->spr.pos, actor->spr.angle, FIREBALL_VELOCITY);
SetOwner(pp->actor, actorNew);
actorNew->spr.yrepeat = 40;
actorNew->spr.xrepeat = 40;
actorNew->spr.SetScale(0.625, 0.625);
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->clipdist = 2;
@ -16320,7 +16314,7 @@ int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit_sect, hitpos, hit_ang, 0);
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 20;
actorNew->spr.SetScale(0.34375, 0.3125);
SetOwner(pp->actor, actorNew);
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
actorNew->spr.hitag = LUMINOUS; //Always full brightness
@ -16335,7 +16329,7 @@ int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit_sect, hitpos, hit_ang, 0);
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 20;
actorNew->spr.SetScale(0.34375, 0.3125);
SetOwner(pp->actor, actorNew);
actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -17030,8 +17024,7 @@ int InitFireball(PLAYER* pp)
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Fireball, pp->cursector, pos, pp->angle.ang, FIREBALL_VELOCITY);
actorNew->spr.hitag = LUMINOUS; //Always full brightness
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->spr.SetScale(0.625, 0.625);
actorNew->spr.shade = -40;
actorNew->clipdist = 2;
SetOwner(pp->actor, actorNew);
@ -17108,8 +17101,7 @@ int InitEnemyFireball(DSWActor* actor)
DVector3(actor->spr.pos, nz), actor->spr.angle, GORO_FIREBALL_VELOCITY);
actorNew->spr.hitag = LUMINOUS; //Always full brightness
actorNew->spr.xrepeat = 20;
actorNew->spr.yrepeat = 20;
actorNew->spr.SetScale(0.34375, 0.3125);
actorNew->spr.shade = -40;
SetOwner(actor, actorNew);

View file

@ -20,8 +20,8 @@ class CoreActor native
native uint8 pal;
native uint8 intclipdist;
native uint8 blend;
native uint8 xrepeat;
native uint8 yrepeat;
//native uint8 xrepeat;
//native uint8 yrepeat;
native int8 xoffset;
native int8 yoffset;
native int16 owner;

View file

@ -239,8 +239,8 @@ struct walltype native
native int8 shade;
native uint8 pal;
native uint8 xrepeat;
native uint8 yrepeat;
//native uint8 xrepeat;
//native uint8 yrepeat;
native void setxpan(double add);
@ -291,8 +291,8 @@ struct tspritetype native
native uint8 pal;
native uint8 clipdist;
native uint8 blend;
native uint8 xrepeat;
native uint8 yrepeat;
//native uint8 xrepeat;
//native uint8 yrepeat;
native int8 xoffset;
native int8 yoffset;
native CoreActor ownerActor;