- some simple replacements.

This commit is contained in:
Christoph Oelckers 2022-02-07 08:47:18 +01:00
parent 1ab1852af8
commit b327f7f03a
20 changed files with 40 additions and 40 deletions

View file

@ -7087,7 +7087,7 @@ void actPostProcess(void)
void MakeSplash(DBloodActor* actor)
{
actor->spr.flags &= ~2;
actor->add_int_z(-(4 << 8));
actor->spr.pos.Z -= 4;
int nSurface = tileGetSurfType(actor->hit.florhit);
switch (actor->spr.type)
{

View file

@ -221,7 +221,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
if (!pNSprite)
break;
pNSprite->set_int_z(pTSprite->int_pos().Z);
pNSprite->pos.Z = pTSprite->pos.Z;
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
pNSprite->shade = -128;
pNSprite->xrepeat = pTSprite->xrepeat;
@ -314,7 +314,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
break;
pNSprite->shade = -128;
pNSprite->set_int_z(pTSprite->int_pos().Z);
pNSprite->pos.Z = pTSprite->pos.Z;
pNSprite->picnum = 908;
pNSprite->statnum = kStatDecoration;
pNSprite->xrepeat = pNSprite->yrepeat = (tileWidth(pTSprite->picnum) * pTSprite->xrepeat) / 64;
@ -431,7 +431,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
pNSprite->shade = -128;
pNSprite->pal = 2;
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
pNSprite->set_int_z(pTSprite->int_pos().Z);
pNSprite->pos.Z = pTSprite->pos.Z;
pNSprite->xrepeat = pTSprite->xrepeat;
pNSprite->yrepeat = pTSprite->yrepeat;
pNSprite->picnum = 2427;
@ -479,7 +479,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
if (!pNSprite)
break;
pNSprite->set_int_z(pTSprite->int_pos().Z);
pNSprite->pos.Z = pTSprite->pos.Z;
if (gDetail > 1)
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_TRANS_FLIP;
pNSprite->shade = ClipLow(pTSprite->shade - 32, -128);

View file

@ -709,7 +709,7 @@ void movefallers_d(void)
if (act->temp_data[0] == 0)
{
act->add_int_z(-(16 << 8));
act->spr.pos.Z -= 16;
act->temp_data[1] = act->spr.ang;
x = act->spr.extra;
j = fi.ifhitbyweapon(act);
@ -923,7 +923,7 @@ static void movetripbomb(DDukeActor *actor)
actor->temp_data[0]++;
actor->set_int_xy(actor->temp_data[3], actor->temp_data[4]);
actor->add_int_z(3 << 8);
actor->spr.pos.Z += 3;
ChangeActorSect(actor, oldSect);
actor->temp_data[3] = 0;
if (hit && lTripBombControl & TRIPBOMB_TRIPWIRE)
@ -946,7 +946,7 @@ static void movetripbomb(DDukeActor *actor)
x = hitasprite(actor, nullptr);
actor->set_int_xy(actor->temp_data[3], actor->temp_data[4]);
actor->add_int_z(3 << 8);
actor->spr.pos.Z += 3;
SetActor(actor, actor->spr.pos);
if (actor->ovel.X != x && lTripBombControl & TRIPBOMB_TRIPWIRE)

View file

@ -630,7 +630,7 @@ void movefallers_r(void)
if (act->temp_data[0] == 0)
{
act->add_int_z(-(16 << 8));
act->spr.pos.Z -= 16;
act->temp_data[1] = act->spr.ang;
int x = act->spr.extra;
int j = fi.ifhitbyweapon(act);
@ -661,7 +661,7 @@ void movefallers_r(void)
}
}
act->spr.ang = act->temp_data[1];
act->add_int_z(16 << 8);
act->spr.pos.Z += 16;
}
else if (act->temp_data[0] == 1)
{
@ -2139,7 +2139,7 @@ void rr_specialstats()
{
if (act->spr.hitag == 100)
{
act->add_int_z(4 << 8);
act->spr.pos.Z += 4;
if (act->int_pos().Z >= act->sector()->int_floorz() + 15168)
act->set_int_z(act->sector()->int_floorz() + 15168);
}

View file

@ -227,7 +227,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
case ATOMICHEALTH:
t->add_int_z(-(4 << 8));
t->pos.Z -= 4;
break;
case CRYSTALAMMO:
t->shade = bsin(PlayClock << 4, -10);

View file

@ -223,7 +223,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
case ATOMICHEALTH:
t->add_int_z(-(4 << 8));
t->pos.Z -= 4;
break;
case CRYSTALAMMO:
t->shade = bsin(PlayClock << 4, -10);

View file

@ -261,7 +261,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
if (p >= 0)
{
auto k = spawn(knee, SMALLSMOKE);
if (k) k->add_int_z(-(8 << 8));
if (k) k->spr.pos.Z -= 8;
S_PlayActorSound(KICK_HIT, knee);
}
@ -439,7 +439,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
auto jib = spawn(spark, JIBS6);
if (jib)
{
jib->add_int_z(4 << 8);
jib->spr.pos.Z += 4;
jib->spr.xvel = 16;
jib->spr.xrepeat = jib->spr.yrepeat = 24;
jib->spr.ang += 64 - (krand() & 127);
@ -2212,7 +2212,7 @@ static void operateweapon(int snum, ESyncBits actions)
if (k == 15)
{
spawned->spr.yvel = 3;
spawned->add_int_z(8 << 8);
spawned->spr.pos.Z += 8;
}
k = hits(pact);
@ -2377,7 +2377,7 @@ static void operateweapon(int snum, ESyncBits actions)
j->spr.ang += 1024;
j->spr.ang &= 2047;
j->spr.xvel += 32;
j->add_int_z(3 << 8);
j->spr.pos.Z += 3;
ssp(j, CLIPMASK0);
}
}

View file

@ -153,7 +153,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
if (p >= 0)
{
auto k = spawn(wpn, SMALLSMOKE);
if (k) k->add_int_z(-(8 << 8));
if (k) k->spr.pos.Z -= 8;
if (atwith == KNEE) S_PlayActorSound(KICK_HIT, wpn);
else if (isRRRA() && atwith == SLINGBLADE) S_PlayActorSound(260, wpn);
}
@ -334,7 +334,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
spark->spr.xrepeat = spark->spr.yrepeat = 0;
if (l)
{
l->add_int_z(4 << 8);
l->spr.pos.Z += 4;
l->spr.xvel = 16;
l->spr.xrepeat = l->spr.yrepeat = 24;
l->spr.ang += 64 - (krand() & 127);
@ -2755,7 +2755,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
if (k == 15)
{
spawned->spr.yvel = 3;
spawned->add_int_z(8 << 8);
spawned->spr.pos.Z += 8;
}
k = hits(p->GetActor());
@ -2980,7 +2980,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
j->spr.ang += 1024;
j->spr.ang &= 2047;
j->spr.xvel += 32;
j->add_int_z(3 << 8);
j->spr.pos.Z += 3;
ssp(j, CLIPMASK0);
}
}

View file

@ -361,7 +361,7 @@ void operateweapon_ww(int snum, ESyncBits actions)
if (k == 15)
{
j->spr.yvel = 3;
j->add_int_z(8 << 8);
j->spr.pos.Z += 8;
}
k = hits(p->GetActor());

View file

@ -1221,7 +1221,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
if (targ->spr.cstat & CSTAT_SPRITE_BLOCK)
{
S_PlayActorSound(GLASS_BREAKING, targ);
targ->add_int_z(16 << 8);
targ->spr.pos.Z += 16;
targ->spr.cstat = 0;
lotsofglass(targ, nullptr, 5);
}
@ -1374,7 +1374,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
{
if (proj->spr.pal == 6)
spawned->spr.pal = 6;
spawned->add_int_z(4 << 8);
spawned->spr.pos.Z += 4;
spawned->spr.xvel = 16;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->spr.ang += 32 - (krand() & 63);

View file

@ -2330,7 +2330,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
{
if (proj->spr.pal == 6)
spawned->spr.pal = 6;
spawned->add_int_z(4 << 8);
spawned->spr.pos.Z += 4;
spawned->spr.xvel = 16;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->spr.ang += 32 - (krand() & 63);

View file

@ -536,7 +536,7 @@ void initwaterdrip(DDukeActor* actj, DDukeActor* actor)
}
else if (!actj)
{
actor->add_int_z(4 << 8);
actor->spr.pos.Z += 4;
actor->temp_data[0] = actor->int_pos().Z;
if (!isRR()) actor->temp_data[1] = krand() & 127;
}

View file

@ -314,7 +314,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_WALL;
act->spr.xrepeat = 7 + (krand() & 7);
act->spr.yrepeat = 7 + (krand() & 7);
act->add_int_z(-(16 << 8));
act->spr.pos.Z -= 16;
if (actj && actj->spr.pal == 6)
act->spr.pal = 6;
insertspriteq(act);
@ -679,7 +679,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
}
case WATERBUBBLE:
if (actj && actj->spr.picnum == APLAYER)
act->add_int_z(-(16 << 8));
act->spr.pos.Z -= 16;
if (act->spr.picnum == WATERBUBBLE)
{
if (actj)

View file

@ -353,7 +353,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_WALL;
act->spr.xrepeat = 7 + (krand() & 7);
act->spr.yrepeat = 7 + (krand() & 7);
act->add_int_z(-(16 << 8));
act->spr.pos.Z -= 16;
if (actj && actj->spr.pal == 6)
act->spr.pal = 6;
insertspriteq(act);
@ -684,7 +684,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
}
case WATERBUBBLE:
if (actj && actj->spr.picnum == APLAYER)
act->add_int_z(-(16 << 8));
act->spr.pos.Z -= 16;
if (act->spr.picnum == WATERBUBBLE)
{
if (actj)

View file

@ -1112,7 +1112,7 @@ void BunnyHatch(DSWActor* actor)
for (int i = 0; i < MAX_BUNNYS; i++)
{
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
actorNew->set_int_pos(actor->int_pos());
actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = 30; // Baby size
actorNew->spr.yrepeat = 24;
actorNew->spr.ang = rip_ang[i];
@ -1168,7 +1168,7 @@ DSWActor* BunnyHatch2(DSWActor* actor)
{
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
actorNew->set_int_pos(actor->int_pos());
actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = 30; // Baby size
actorNew->spr.yrepeat = 24;
actorNew->spr.ang = RANDOM_P2(2048);

View file

@ -1174,7 +1174,7 @@ void RipperHatch(DSWActor* actor)
{
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
ClearOwner(actorNew);
actorNew->set_int_pos(actor->int_pos());
actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 64;
actorNew->spr.ang = rip_ang[i];
actorNew->spr.pal = 0;

View file

@ -1199,7 +1199,7 @@ void Ripper2Hatch(DSWActor* actor)
{
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
ClearOwner(actorNew);
actorNew->set_int_pos(actor->int_pos());
actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 64;
actorNew->spr.ang = rip_ang[i];

View file

@ -2490,7 +2490,7 @@ void SpriteSetup(void)
actorNew->spr.cstat = 0;
actorNew->spr.extra = 0;
actorNew->set_int_pos(actor->int_pos());
actorNew->spr.pos = actor->spr.pos;
actorNew->spr.ang = NORM_ANGLE(actor->spr.ang + 1024);
actorNew->spr.picnum = actor->spr.picnum;

View file

@ -303,7 +303,7 @@ DSWActor* TrackClonePoint(DSWActor* actor)
actorNew->spr.cstat = 0;
actorNew->spr.extra = 0;
actorNew->set_int_pos(actor->int_pos());
actorNew->spr.pos = actor->spr.pos;
actorNew->spr.ang = actor->spr.ang;
actorNew->spr.lotag = actor->spr.lotag;
actorNew->spr.hitag = actor->spr.hitag;

View file

@ -17398,7 +17398,7 @@ int QueueStar(DSWActor* actor)
{
// move old star to new stars place
auto osp = StarQueue[StarQueueHead];
osp->set_int_pos(actor->int_pos());
osp->spr.pos = actor->spr.pos;
ChangeActorSect(osp, actor->sector());
KillActor(actor);
actor = osp;
@ -17511,7 +17511,7 @@ int QueueFloorBlood(DSWActor* actor)
spawnedActor->spr.extra = 0;
spawnedActor->spr.clipdist = 0;
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->set_int_pos(actor->int_pos());
spawnedActor->spr.pos = actor->spr.pos;
spawnedActor->add_int_z(Z(1));
spawnedActor->spr.ang = RANDOM_P2(2048); // Just make it any old angle
spawnedActor->spr.shade -= 5; // Brighten it up just a bit
@ -17612,7 +17612,7 @@ int QueueFootPrint(DSWActor* actor)
spawnedActor->spr.extra = 0;
spawnedActor->spr.clipdist = 0;
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->set_int_pos(actor->int_pos());
spawnedActor->spr.pos = actor->spr.pos;
spawnedActor->spr.ang = actor->spr.ang;
spawnedActor->user.Flags &= ~(SPR_SHADOW);
switch (FootMode)
@ -17885,7 +17885,7 @@ void QueueGeneric(DSWActor* actor, short pic)
{
// move old sprite to new sprite's place
auto osp = GenericQueue[GenericQueueHead];
osp->set_int_pos(actor->int_pos());
osp->spr.pos = actor->spr.pos;
ChangeActorSect(osp, actor->sector());
KillActor(actor);
actor = GenericQueue[GenericQueueHead];