- wrapped all literal assignments to clipdist - part 1

This commit is contained in:
Christoph Oelckers 2022-09-09 18:17:20 +02:00
parent 16f0d15cdc
commit 28a3a8e314
6 changed files with 9 additions and 9 deletions

View file

@ -374,7 +374,7 @@ static void ThrowThing(DBloodActor* actor, bool impact)
spawned->xspr.data3 = 512 / (gGameOptions.nDifficulty + 1);
spawned->spr.cstat &= ~CSTAT_SPRITE_BLOCK;
spawned->spr.pal = 6;
spawned->spr.clipdist = 0;
spawned->set_native_clipdist(0);
spawned->SetTarget(actor->GetTarget());
spawned->xspr.Proximity = true;
spawned->xspr.stateTimer = 1;

View file

@ -96,7 +96,7 @@ void FlareBurst(DBloodActor* actor, sectortype*) // 2
spawnedactor->spr.shade = -128;
spawnedactor->spr.xrepeat = spawnedactor->spr.yrepeat = 32;
spawnedactor->spr.type = kMissileFlareAlt;
spawnedactor->spr.clipdist = 2;
spawnedactor->set_native_clipdist(2);
spawnedactor->SetOwner(actor);
int nAngle2 = (i << 11) / 8;
int dx = 0;

View file

@ -50,7 +50,7 @@ DBloodActor* InsertSprite(sectortype* pSector, int nStat)
{
auto act = static_cast<DBloodActor*>(::InsertActor(RUNTIME_CLASS(DBloodActor), pSector, nStat));
act->spr.cstat = CSTAT_SPRITE_YCENTER;
act->spr.clipdist = 32;
act->set_native_clipdist(32);
act->spr.xrepeat = act->spr.yrepeat = 64;
return act;
}

View file

@ -1553,7 +1553,7 @@ void forcesphere(DDukeActor* actor, int forcesphere)
if (k)
{
k->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_YCENTER;
k->spr.clipdist = 64;
k->set_native_clipdist(64);
k->set_int_ang(j);
k->set_int_zvel(bsin(l, -5));
k->set_int_xvel(bcos(l, -9));

View file

@ -578,25 +578,25 @@ void respawn_rrra(DDukeActor* oldact, DDukeActor* newact)
{
newact->spr.xrepeat = 26;
newact->spr.yrepeat = 26;
newact->spr.clipdist = 75;
newact->set_native_clipdist(75);
}
else if (newact->spr.pal == 31)
{
newact->spr.xrepeat = 36;
newact->spr.yrepeat = 36;
newact->spr.clipdist = 100;
newact->set_native_clipdist(100);
}
else if (newact->spr.pal == 32)
{
newact->spr.xrepeat = 50;
newact->spr.yrepeat = 50;
newact->spr.clipdist = 100;
newact->set_native_clipdist(100);
}
else
{
newact->spr.xrepeat = 50;
newact->spr.yrepeat = 50;
newact->spr.clipdist = 100;
newact->set_native_clipdist(100);
}
}

View file

@ -2228,7 +2228,7 @@ int ParseState::parse(void)
g_ac->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
g_ac->spr.shade = -12;
g_ac->spr.clipdist = 64;
g_ac->set_native_clipdist(64);
g_ac->spr.xrepeat = 42;
g_ac->spr.yrepeat = 36;
g_ac->SetOwner(g_ac);