- several manual replacements with SetScale.

This commit is contained in:
Christoph Oelckers 2022-10-05 19:50:53 +02:00
parent d8fac32459
commit e6a97157d7
8 changed files with 32 additions and 52 deletions

View file

@ -573,26 +573,22 @@ void respawn_rrra(DDukeActor* oldact, DDukeActor* newact)
{
if (newact->spr.pal == 30)
{
newact->spr.xrepeat = 26;
newact->spr.yrepeat = 26;
newact->spr.SetScale(0.40625, 0.40625);
newact->clipdist = 18.75;
}
else if (newact->spr.pal == 31)
{
newact->spr.xrepeat = 36;
newact->spr.yrepeat = 36;
newact->spr.SetScale(0.5625, 0.5625);
newact->clipdist = 25;
}
else if (newact->spr.pal == 32)
{
newact->spr.xrepeat = 50;
newact->spr.yrepeat = 50;
newact->spr.SetScale(0.78125, 0.78125);
newact->clipdist = 25;
}
else
{
newact->spr.xrepeat = 50;
newact->spr.yrepeat = 50;
newact->spr.SetScale(0.78125, 0.78125);
newact->clipdist = 25;
}
}
@ -1084,8 +1080,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const DVector3& oldpo
auto j = spawn(proj, CIRCLESTUCK);
if (j)
{
j->spr.xrepeat = 8;
j->spr.yrepeat = 8;
j->spr.SetScale(0.125, 0.125);
j->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL;
j->spr.angle += DAngle90;
j->clipdist = MulScale(proj->spr.xrepeat, tileWidth(proj->spr.picnum), 7) * 0.25;
@ -3137,6 +3132,8 @@ void handle_se06_r(DDukeActor *actor)
{
ns->spr.cstat = CSTAT_SPRITE_TRANS_FLIP | CSTAT_SPRITE_TRANSLUCENT;
ns->spr.pal = 7;
ns->spr.SetScale(1.25, 3.984375);
ns->spr.xrepeat = 80;
ns->spr.yrepeat = 255;
}

View file

@ -351,8 +351,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
else newtspr->pos.Z = h->spr.pos.Z - 51;
if (ps[p].curr_weapon == HANDBOMB_WEAPON)
{
newtspr->xrepeat = 10;
newtspr->yrepeat = 10;
newtspr->SetScale(0.15625, 0.15625);
}
else
{

View file

@ -149,8 +149,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (h->spr.statnum != STAT_ACTOR && h->spr.picnum == APLAYER && pp->newOwner == nullptr && h->GetOwner())
{
t->pos = interpolatedvalue(pp->opos, pp->pos, interpfrac).plusZ(gs.playerheight);
h->spr.xrepeat = 24;
h->spr.yrepeat = 17;
h->spr.SetScale(0.375, 0.265625);
}
else if (!actorflag(h, SFLAG_NOINTERPOLATE))
{
@ -178,8 +177,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
t->SetScale(0, 0);
break;
case DUKELYINGDEAD:
h->spr.xrepeat = 24;
h->spr.yrepeat = 17;
h->spr.SetScale(0.375, 0.265625);
if (h->spr.extra > 0)
t->pos.Z += 6;
break;
@ -391,8 +389,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
else newtspr->pos.Z = h->spr.pos.Z - 51;
if (ps[p].curr_weapon == HANDBOMB_WEAPON)
{
newtspr->xrepeat = 10;
newtspr->yrepeat = 10;
newtspr->SetScale(0.15625, 0.15625);
}
else if (ps[p].OnMotorcycle || ps[p].OnBoat)
{
@ -468,8 +465,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (ps[p].OnMotorcycle && p == screenpeek)
{
t->picnum = RRTILE7219;
t->xrepeat = 18;
t->yrepeat = 18;
t->SetScale(0.28125, 0.28125);
t4 = 0;
t3 = 0;
t1 = 0;
@ -485,8 +481,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
else t->cstat &= ~CSTAT_SPRITE_XFLIP;
t->picnum = RRTILE7213 + k;
t->xrepeat = 18;
t->yrepeat = 18;
t->SetScale(0.28125, 0.28125);
t4 = 0;
t3 = 0;
t1 = 0;
@ -511,8 +506,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
else t->cstat &= ~CSTAT_SPRITE_XFLIP;
t->picnum = RRTILE7184 + k;
t->xrepeat = 32;
t->yrepeat = 32;
t->SetScale(0.5, 0.5);
t4 = 0;
t3 = 0;
t1 = 0;
@ -738,7 +732,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (hw_models && modelManager.CheckModel(t->picnum, t->pal))
{
shadowspr->yrepeat = 0;
shadowspr->SetScale(0, 0);
// 512:trans reverse
//1024:tell MD2SPRITE.C to use Z-buffer hacks to hide overdraw issues
shadowspr->clipdist |= TSPR_FLAGS_MDHACK;

View file

@ -132,8 +132,7 @@ static void shootfireball(DDukeActor *actor, int p, DVector3 pos, DAngle ang)
spawned->spr.extra += (krand() & 7);
if (actor->spr.picnum == BOSS5 || p >= 0)
{
spawned->spr.xrepeat = 40;
spawned->spr.yrepeat = 40;
spawned->spr.SetScale(0.625, 0.625);
}
spawned->spr.yint = p;
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
@ -430,8 +429,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
{
if (hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY)
{
spark->spr.xrepeat = 0;
spark->spr.yrepeat = 0;
spark->spr.SetScale(0, 0);
return;
}
else

View file

@ -703,13 +703,12 @@ static void shootrpg(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int atw
{
if (actor->spr.picnum == HULK)
{
spawned->spr.xrepeat = 8;
spawned->spr.SetScale(0.125, 0.125);
spawned->spr.yrepeat = 8;
}
else if (atwith != FREEZEBLAST)
{
spawned->spr.xrepeat = 30;
spawned->spr.yrepeat = 30;
spawned->spr.SetScale(0.46875, 0.46875);
spawned->spr.extra >>= 2;
}
}
@ -2504,8 +2503,7 @@ void onMotorcycleHit(int snum, DDukeActor* victim)
{
if (victim->spr.lotag == act2->spr.lotag)
{
act2->spr.xrepeat = 0;
act2->spr.yrepeat = 0;
act2->spr.SetScale(0, 0);
}
}
}
@ -2516,8 +2514,7 @@ void onMotorcycleHit(int snum, DDukeActor* victim)
else
fi.guts(victim, RRTILE2465, 3, myconnectindex);
fi.guts(victim, RRTILE2465, 3, myconnectindex);
victim->spr.xrepeat = 0;
victim->spr.yrepeat = 0;
victim->spr.SetScale(0, 0);
}
}

View file

@ -1380,7 +1380,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
spawned->spr.pal = 6;
spawned->spr.pos.Z += 4;
spawned->vel.X = 1;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->spr.SetScale(0.375, 0.375);
spawned->spr.angle = DAngle22_5 / 4 - randomAngle(22.5 / 2);
}
}

View file

@ -1975,10 +1975,8 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
{
fi.guts(targ, RRTILE2460, 12, myconnectindex);
fi.guts(targ, RRTILE2465, 3, myconnectindex);
act->spr.xrepeat = 0;
act->spr.yrepeat = 0;
targ->spr.xrepeat = 0;
targ->spr.yrepeat = 0;
act->spr.SetScale(0, 0);
targ->spr.SetScale(0, 0);
}
}
}
@ -1987,8 +1985,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
{
fi.guts(targ, RRTILE2460, 12, myconnectindex);
fi.guts(targ, RRTILE2465, 3, myconnectindex);
targ->spr.xrepeat = 0;
targ->spr.yrepeat = 0;
targ->spr.SetScale(0, 0);
}
}
break;
@ -2342,7 +2339,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
spawned->spr.pal = 6;
spawned->spr.pos.Z += 4;
spawned->vel.X = 1;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->spr.SetScale(0.375, 0.375);
spawned->spr.angle = DAngle22_5/4 - randomAngle(22.5/2);
}
}

View file

@ -233,7 +233,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
// Init the size
if (act->spr.xrepeat == 0 || act->spr.yrepeat == 0)
act->spr.xrepeat = act->spr.yrepeat = 1;
act->spr.SetScale(REPEAT_SCALE, REPEAT_SCALE);
if (actorflag(act, SFLAG_BADGUY))
{
@ -294,8 +294,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam)
{
if (actj->spr.statnum == 4)
{
act->spr.xrepeat = 8;
act->spr.yrepeat = 8;
act->spr.SetScale(0.125, 0.125);
}
else
{
@ -415,7 +414,8 @@ void initshell(DDukeActor* actj, DDukeActor* act, bool isshell)
act->vel.X = 1.25;
}
act->spr.xrepeat = act->spr.yrepeat = isRR() && isshell? 2 : 4;
double scale = isRR() && isshell ? 0.03125 : 0.0625;
act->spr.SetScale(scale, scale);
ChangeActorStat(act, STAT_MISC);
}
@ -449,8 +449,7 @@ void initcrane(DDukeActor* actj, DDukeActor* act, int CRANEPOLE)
act->temp_sect = actk->sector();
actk->spr.xrepeat = 48;
actk->spr.yrepeat = 128;
actk->spr.SetScale(0.75, 2);
apt.pole = actk->spr.pos.XY();
@ -494,8 +493,7 @@ void initwaterdrip(DDukeActor* actj, DDukeActor* actor)
actor->temp_pos.Z = actor->spr.pos.Z;
if (!isRR()) actor->temp_data[1] = krand() & 127;
}
actor->spr.xrepeat = 24;
actor->spr.yrepeat = 24;
actor->spr.SetScale(0.375, 0.375);
ChangeActorStat(actor, STAT_STANDABLE);
}