diff --git a/source/core/maptypes.h b/source/core/maptypes.h index 5164adb3a..f285a9669 100644 --- a/source/core/maptypes.h +++ b/source/core/maptypes.h @@ -486,16 +486,6 @@ struct spritetypebase { scale = p; } - - void SetScaleX(double x) - { - scale.X = x; - } - - void SetScaleY(double y) - { - scale.Y = y; - } }; diff --git a/source/core/thingdef_properties.cpp b/source/core/thingdef_properties.cpp index bbfdd68ee..06ade9625 100644 --- a/source/core/thingdef_properties.cpp +++ b/source/core/thingdef_properties.cpp @@ -447,7 +447,7 @@ DEFINE_PROPERTY(clipdist, I, CoreActor) DEFINE_PROPERTY(scalex, I, CoreActor) { PROP_INT_PARM(i, 0); - bag.Info->ActorInfo()->defsprite.SetScaleX(i); + bag.Info->ActorInfo()->defsprite.scale.X = (i); bag.Info->ActorInfo()->DefaultFlags |= DEFF_XREPEAT; } @@ -457,7 +457,7 @@ DEFINE_PROPERTY(scalex, I, CoreActor) DEFINE_PROPERTY(scaley, I, CoreActor) { PROP_INT_PARM(i, 0); - bag.Info->ActorInfo()->defsprite.SetScaleY(i); + bag.Info->ActorInfo()->defsprite.scale.Y = (i); bag.Info->ActorInfo()->DefaultFlags |= DEFF_YREPEAT; } diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 34ff52172..b7bde42a2 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -6249,8 +6249,8 @@ DBloodActor* actSpawnThing(sectortype* pSector, const DVector3& pos, int nThingT actor->spr.picnum = pThingInfo->picnum; actor->spr.shade = pThingInfo->shade; actor->spr.pal = pThingInfo->pal; - if (pThingInfo->_xrepeat) actor->spr.SetScaleX(pThingInfo->_xrepeat * REPEAT_SCALE); - if (pThingInfo->_yrepeat) actor->spr.SetScaleY(pThingInfo->_yrepeat * REPEAT_SCALE); + if (pThingInfo->_xrepeat) actor->spr.scale.X = (pThingInfo->_xrepeat * REPEAT_SCALE); + if (pThingInfo->_yrepeat) actor->spr.scale.Y = (pThingInfo->_yrepeat * REPEAT_SCALE); actor->spr.cstat2 |= CSTAT2_SPRITE_MAPPED; switch (nThingType) { diff --git a/source/games/blood/src/animatesprite.cpp b/source/games/blood/src/animatesprite.cpp index 7112ff135..c46db03ab 100644 --- a/source/games/blood/src/animatesprite.cpp +++ b/source/games/blood/src/animatesprite.cpp @@ -795,7 +795,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA, case kStatProjectile: { switch (pTSprite->type) { case kMissileTeslaAlt: - pTSprite->SetScaleY(2); + pTSprite->scale.Y = (2); pTSprite->cstat |= CSTAT_SPRITE_ALIGNMENT_FLOOR; break; case kMissileTeslaRegular: diff --git a/source/games/blood/src/fx.cpp b/source/games/blood/src/fx.cpp index ed06efa08..c3f1bf6b8 100644 --- a/source/games/blood/src/fx.cpp +++ b/source/games/blood/src/fx.cpp @@ -172,9 +172,9 @@ DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, const DVector3& p actor->spr.pal = pFX->pal; actor->spr.detail = pFX->detail; if (pFX->_xrepeat > 0) - actor->spr.SetScaleX(pFX->_xrepeat * REPEAT_SCALE); + actor->spr.scale.X = (pFX->_xrepeat * REPEAT_SCALE); if (pFX->_yrepeat > 0) - actor->spr.SetScaleY(pFX->_yrepeat * REPEAT_SCALE); + actor->spr.scale.Y = (pFX->_yrepeat * REPEAT_SCALE); if ((pFX->flags & 1) && Chance(0x8000)) actor->spr.cstat |= CSTAT_SPRITE_XFLIP; if ((pFX->flags & 2) && Chance(0x8000)) diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 6f6cfed52..54018afdf 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -2450,13 +2450,13 @@ void useObjResizer(DBloodActor* sourceactor, int targType, sectortype* targSect, { if (valueIsBetween(sourceactor->xspr.data1, -1, 32767)) { - targetactor->spr.SetScaleX(ClipRange(sourceactor->xspr.data1, 0, 255) * REPEAT_SCALE); + targetactor->spr.scale.X = (ClipRange(sourceactor->xspr.data1, 0, 255) * REPEAT_SCALE); fit = true; } if (valueIsBetween(sourceactor->xspr.data2, -1, 32767)) { - targetactor->spr.SetScaleY(ClipRange(sourceactor->xspr.data2, 0, 255) * REPEAT_SCALE); + targetactor->spr.scale.Y = (ClipRange(sourceactor->xspr.data2, 0, 255) * REPEAT_SCALE); fit = true; } } @@ -6526,10 +6526,10 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor) if (canInherit != 0) { if (canInherit & 0x2) - missileactor->spr.SetScaleX((from == kModernTypeFlag1) ? sourceactor->spr.scale.X : actor->spr.scale.X); + missileactor->spr.scale.X = ((from == kModernTypeFlag1) ? sourceactor->spr.scale.X : actor->spr.scale.X); if (canInherit & 0x1) - missileactor->spr.SetScaleY((from == kModernTypeFlag1) ? sourceactor->spr.scale.Y : actor->spr.scale.Y); + missileactor->spr.scale.Y = ((from == kModernTypeFlag1) ? sourceactor->spr.scale.Y : actor->spr.scale.Y); if (canInherit & 0x4) missileactor->spr.pal = (from == kModernTypeFlag1) ? sourceactor->spr.pal : actor->spr.pal; diff --git a/source/games/blood/src/seq.cpp b/source/games/blood/src/seq.cpp index dbb67a431..67efe5c9b 100644 --- a/source/games/blood/src/seq.cpp +++ b/source/games/blood/src/seq.cpp @@ -259,14 +259,14 @@ void UpdateSprite(DBloodActor* actor, SEQFRAME* pFrame) int s; if (scale) s = ClipRange(MulScale(pFrame->scalex, scale, 8), 0, 255); else s = pFrame->scalex; - actor->spr.SetScaleX(s * REPEAT_SCALE); + actor->spr.scale.X = (s * REPEAT_SCALE); } if (pFrame->scaley) { int s; if (scale) s = ClipRange(MulScale(pFrame->scaley, scale, 8), 0, 255); else s = pFrame->scaley; - actor->spr.SetScaleY(s * REPEAT_SCALE); + actor->spr.scale.Y = (s * REPEAT_SCALE); } if (pFrame->transparent) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index f26abd5fe..a3d834383 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -483,13 +483,13 @@ void moveplayers(void) act->spr.scale.X += (0.0625); act->spr.cstat |= CSTAT_SPRITE_TRANSLUCENT; } - else act->spr.SetScaleX(0.65625); + else act->spr.scale.X = (0.65625); if (act->spr.scale.Y < 0.5625) act->spr.scale.Y += (4); else { - act->spr.SetScaleY(0.5625); + act->spr.scale.Y = (0.5625); if (act->sector()->lotag != ST_2_UNDERWATER) makeitfall(act); if (act->vel.Z == 0 && act->sector()->lotag == ST_1_ABOVE_WATER) @@ -874,7 +874,7 @@ void moveflammable(DDukeActor* actor, int pool) return; } - actor->spr.SetScaleX(scale); + actor->spr.scale.X = (scale); scale = actor->spr.scale.Y - (krand() & 7) * REPEAT_SCALE; if (scale < 0.0625) @@ -882,7 +882,7 @@ void moveflammable(DDukeActor* actor, int pool) deletesprite(actor); return; } - actor->spr.SetScaleY(scale); + actor->spr.scale.Y = (scale); } if (actorflag(actor, SFLAG_FALLINGFLAMMABLE)) { diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 879136a6b..19e7f841a 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -902,7 +902,7 @@ static void movetripbomb(DDukeActor *actor) if (x < 64) { - spawned->spr.SetScaleX(x * (REPEAT_SCALE / 2)); + spawned->spr.scale.X = (x * (REPEAT_SCALE / 2)); break; } x -= 64; @@ -1141,7 +1141,7 @@ CLEAR_THE_BOLT: actor->spr.picnum++; int l = global_random & 7; - actor->spr.SetScaleX(0.125 + l * REPEAT_SCALE); + actor->spr.scale.X = (0.125 + l * REPEAT_SCALE); if (l & 1) actor->spr.cstat ^= CSTAT_SPRITE_TRANSLUCENT; @@ -2308,7 +2308,7 @@ static void greenslime(DDukeActor *actor) actor->temp_data[0] = -1; double dist = (actor->spr.pos.XY() - s5->spr.pos.XY()).LengthSquared(); if (dist < 48*48) { - s5->spr.SetScaleX(0); + s5->spr.scale.X = (0); } } } @@ -2378,8 +2378,8 @@ static void greenslime(DDukeActor *actor) // TJR } - actor->spr.SetScaleX(0.5625 + BobVal(512 + actor->temp_data[1]) * 0.125); - actor->spr.SetScaleY(0.25 + BobVal(actor->temp_data[1]) * 0.03125); + actor->spr.scale.X = (0.5625 + BobVal(512 + actor->temp_data[1]) * 0.125); + actor->spr.scale.Y = (0.25 + BobVal(actor->temp_data[1]) * 0.03125); if (rnd(4) && (sectp->ceilingstat & CSTAT_SECTOR_SKY) == 0 && abs(actor->floorz - actor->ceilingz) < 192) @@ -2460,7 +2460,7 @@ static void flamethrowerflame(DDukeActor *actor) if (actor->spr.scale.X < 0.1250) { actor->spr.scale.X += (ds * REPEAT_SCALE); - actor->spr.SetScaleY(actor->spr.scale.X); + actor->spr.scale.Y = (actor->spr.scale.X); } actor->clipdist += ds * 0.25; if (actor->temp_data[0] <= 2) @@ -2678,7 +2678,7 @@ DETONATEB: if (actor->spr.scale.Y) { - actor->spr.SetScaleY(0); + actor->spr.scale.Y = (0); return; } @@ -2694,7 +2694,7 @@ DETONATEB: actor->temp_data[2] = gs.respawnitemtime; spawn(actor, RESPAWNMARKERRED); actor->spr.cstat = CSTAT_SPRITE_INVISIBLE; - actor->spr.SetScaleY(0.140625); + actor->spr.scale.Y = (0.140625); return; } } diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index f150e29d0..d3df6cf09 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -778,7 +778,7 @@ CLEAR_THE_BOLT: actor->spr.picnum++; int l = global_random & 7; - actor->spr.SetScaleX(0.125 + l * REPEAT_SCALE); + actor->spr.scale.X = (0.125 + l * REPEAT_SCALE); if (l & 1) actor->spr.cstat ^= CSTAT_SPRITE_TRANSLUCENT; @@ -2445,7 +2445,7 @@ DETONATEB: if (actor->spr.scale.Y) { - actor->spr.SetScaleY(0); + actor->spr.scale.Y = (0); return; } diff --git a/source/games/duke/src/animatesprites_d.cpp b/source/games/duke/src/animatesprites_d.cpp index 2e9bca99c..382763ef5 100644 --- a/source/games/duke/src/animatesprites_d.cpp +++ b/source/games/duke/src/animatesprites_d.cpp @@ -322,7 +322,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi newtspr->statnum = 99; - newtspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625)); + newtspr->scale.Y = (max(t->scale.Y * 0.125, 0.0625)); newtspr->shade = t->shade; newtspr->cstat = 0; @@ -572,7 +572,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi shadowspr->statnum = 99; - shadowspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625)); + shadowspr->scale.Y = (max(t->scale.Y * 0.125, 0.0625)); shadowspr->shade = 127; shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT; @@ -581,7 +581,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi if (hw_models && modelManager.CheckModel(t->picnum, t->pal)) { - shadowspr->SetScaleY(0); + shadowspr->scale.Y = (0); // 512:trans reverse //1024:tell MD2SPRITE.C to use Z-buffer hacks to hide overdraw issues shadowspr->clipdist |= TSPR_FLAGS_MDHACK; @@ -612,7 +612,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi if (t->sectp->lotag == 2) t->pal = 8; t->pos.Z = OwnerAc->spr.pos.Z - 3; if (gs.lasermode == 2 && ps[screenpeek].heat_on == 0) - t->SetScaleY(0); + t->scale.Y = (0); t->shade = -127; break; case EXPLOSION2: diff --git a/source/games/duke/src/animatesprites_r.cpp b/source/games/duke/src/animatesprites_r.cpp index bc0a1cd9e..eafac8736 100644 --- a/source/games/duke/src/animatesprites_r.cpp +++ b/source/games/duke/src/animatesprites_r.cpp @@ -362,7 +362,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi newtspr->statnum = 99; - newtspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625)); + newtspr->scale.Y = (max(t->scale.Y * 0.125, 0.0625)); newtspr->shade = t->shade; newtspr->cstat = 0; @@ -721,7 +721,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi shadowspr->statnum = 99; - shadowspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625)); + shadowspr->scale.Y = (max(t->scale.Y * 0.125, 0.0625)); shadowspr->shade = 127; shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT; diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index 0434b524a..a50807e69 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -1201,11 +1201,11 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, else SetGameVarID(lVar2, act->spriteextra, sActor, sPlayer); break; case ACTOR_XREPEAT: - if (bSet) act->spr.SetScaleX(lValue * REPEAT_SCALE); + if (bSet) act->spr.scale.X = (lValue * REPEAT_SCALE); else SetGameVarID(lVar2, int(act->spr.scale.X * INV_REPEAT_SCALE), sActor, sPlayer); break; case ACTOR_YREPEAT: - if (bSet) act->spr.SetScaleY(lValue * REPEAT_SCALE); + if (bSet) act->spr.scale.Y = (lValue * REPEAT_SCALE); else SetGameVarID(lVar2, int(act->spr.scale.Y * INV_REPEAT_SCALE), sActor, sPlayer); break; case ACTOR_XOFFSET: @@ -1730,7 +1730,7 @@ int ParseState::parse(void) //if (!isPlutoPak() && *insptr == 0) *insptr = 4; double siz = ((*insptr) * REPEAT_SCALE - g_ac->spr.scale.X); - g_ac->spr.SetScaleX(clamp(g_ac->spr.scale.X + Sgn(siz) * REPEAT_SCALE, 0., 4.)); + g_ac->spr.scale.X = (clamp(g_ac->spr.scale.X + Sgn(siz) * REPEAT_SCALE, 0., 4.)); insptr++; @@ -1738,7 +1738,7 @@ int ParseState::parse(void) if ((g_ac->isPlayer() && scale < 0.5626) || *insptr * REPEAT_SCALE < scale || (scale * (tileHeight(g_ac->spr.picnum) + 8)) < g_ac->floorz - g_ac->ceilingz) { siz = ((*insptr) * REPEAT_SCALE - g_ac->spr.scale.Y); - g_ac->spr.SetScaleY(clamp(g_ac->spr.scale.Y + Sgn(siz) * REPEAT_SCALE, 0., 4.)); + g_ac->spr.scale.Y = (clamp(g_ac->spr.scale.Y + Sgn(siz) * REPEAT_SCALE, 0., 4.)); } insptr++; @@ -1748,9 +1748,9 @@ int ParseState::parse(void) } case concmd_sizeat: insptr++; - g_ac->spr.SetScaleX((uint8_t)*insptr * REPEAT_SCALE); + g_ac->spr.scale.X = ((uint8_t)*insptr * REPEAT_SCALE); insptr++; - g_ac->spr.SetScaleY((uint8_t)*insptr * REPEAT_SCALE); + g_ac->spr.scale.Y = ((uint8_t)*insptr * REPEAT_SCALE); insptr++; break; case concmd_shoot: diff --git a/source/games/duke/src/sectors_d.cpp b/source/games/duke/src/sectors_d.cpp index f60248f86..a13f1303c 100644 --- a/source/games/duke/src/sectors_d.cpp +++ b/source/games/duke/src/sectors_d.cpp @@ -1211,7 +1211,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj) break; case FORCESPHERE: - targ->spr.SetScaleX(0); + targ->spr.scale.X = (0); if (targ->GetOwner()) { targ->GetOwner()->temp_data[0] = 32; diff --git a/source/games/duke/src/sectors_r.cpp b/source/games/duke/src/sectors_r.cpp index 0a4f3e719..b1ef6c145 100644 --- a/source/games/duke/src/sectors_r.cpp +++ b/source/games/duke/src/sectors_r.cpp @@ -2228,7 +2228,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj) break; case FORCESPHERE: { - targ->spr.SetScaleX(0); + targ->spr.scale.X = (0); auto Owner = targ->GetOwner(); if (Owner) { diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index ae8daaacf..82d58b4f7 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -307,8 +307,8 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* case BLOODSPLAT3: case BLOODSPLAT4: act->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_WALL; - act->spr.SetScaleX(0.109375 + (krand() & 7) * REPEAT_SCALE); - act->spr.SetScaleY(0.109375 + (krand() & 7) * REPEAT_SCALE); + act->spr.scale.X = (0.109375 + (krand() & 7) * REPEAT_SCALE); + act->spr.scale.Y = (0.109375 + (krand() & 7) * REPEAT_SCALE); act->spr.pos.Z -= 16; if (actj && actj->spr.pal == 6) act->spr.pal = 6; diff --git a/source/games/duke/src/spawn_r.cpp b/source/games/duke/src/spawn_r.cpp index a32696e30..4d83dd578 100644 --- a/source/games/duke/src/spawn_r.cpp +++ b/source/games/duke/src/spawn_r.cpp @@ -341,8 +341,8 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case BLOODSPLAT3: case BLOODSPLAT4: act->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_WALL; - act->spr.SetScaleX(0.109375 + (krand() & 7) * REPEAT_SCALE); - act->spr.SetScaleY(0.109375 + (krand() & 7) * REPEAT_SCALE); + act->spr.scale.X = (0.109375 + (krand() & 7) * REPEAT_SCALE); + act->spr.scale.Y = (0.109375 + (krand() & 7) * REPEAT_SCALE); act->spr.pos.Z -= 16; if (actj && actj->spr.pal == 6) act->spr.pal = 6; diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index 470a0265e..b82c28c8a 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -183,7 +183,7 @@ void IgniteSprite(DExhumedActor* pActor) { pAnimActor->pTarget = pActor; ChangeActorStat(pAnimActor, kStatIgnited); - pAnimActor->spr.SetScaleY(max(1, (tileHeight(pAnimActor->spr.picnum) * 32) / nFlameHeight) * REPEAT_SCALE); + pAnimActor->spr.scale.Y = (max(1, (tileHeight(pAnimActor->spr.picnum) * 32) / nFlameHeight) * REPEAT_SCALE); } } diff --git a/source/games/exhumed/src/ramses.cpp b/source/games/exhumed/src/ramses.cpp index dd2802a31..b670c24f3 100644 --- a/source/games/exhumed/src/ramses.cpp +++ b/source/games/exhumed/src/ramses.cpp @@ -385,13 +385,13 @@ void DoSpiritHead() { pSpiritSpr->spr.scale.X += (-0.03125); if (pSpiritSpr->spr.scale.X < nSpiritScale.X) - pSpiritSpr->spr.SetScaleX(nSpiritScale.X); + pSpiritSpr->spr.scale.X = (nSpiritScale.X); } if (pSpiritSpr->spr.scale.Y > nSpiritScale.Y) { pSpiritSpr->spr.scale.Y += (-0.03125); if (pSpiritSpr->spr.scale.Y < nSpiritScale.Y) - pSpiritSpr->spr.SetScaleY(nSpiritScale.Y); + pSpiritSpr->spr.scale.Y = (nSpiritScale.Y); } int nCount = 0; diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index 3d3a946ee..f85a950ed 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -1462,8 +1462,8 @@ int DoBunnyGrowUp(DSWActor* actor) { actor->spr.scale.X += (REPEAT_SCALE); actor->spr.scale.Y += (REPEAT_SCALE); - if ((actor->spr.scale.X) > 1) actor->spr.SetScaleX(1); - if ((actor->spr.scale.Y) > 1) actor->spr.SetScaleY(1); + if ((actor->spr.scale.X) > 1) actor->spr.scale.X = (1); + if ((actor->spr.scale.Y) > 1) actor->spr.scale.Y = (1); actor->user.Counter = 60; } diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index b4fc1ecf6..ed6e434c3 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -792,7 +792,7 @@ int DoCoolgDeath(DSWActor* actor) { actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT); actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE); - actor->spr.SetScaleX(0.65625); + actor->spr.scale.X = (0.65625); actor->spr.shade = -10; if (actor->user.Flags & (SPR_FALLING)) @@ -872,7 +872,7 @@ int DoCoolgMove(DSWActor* actor) { actor->spr.scale.X -= REPEAT_SCALE; actor->spr.shade++; - if (actor->spr.scale.X < 0.0625) actor->spr.SetScaleX(0.0625); + if (actor->spr.scale.X < 0.0625) actor->spr.scale.X = (0.0625); if (actor->spr.shade > 126) { actor->spr.shade = 127; @@ -884,12 +884,12 @@ int DoCoolgMove(DSWActor* actor) actor->spr.hitag = 0; actor->spr.scale.X += (REPEAT_SCALE); actor->spr.shade--; - if (actor->spr.scale.X > 0.65625) actor->spr.SetScaleX(0.65625); + if (actor->spr.scale.X > 0.65625) actor->spr.scale.X = (0.65625); if (actor->spr.shade < -10) actor->spr.shade = -10; } else if (actor->user.FlagOwner == 0) { - actor->spr.SetScaleX(0.65625); + actor->spr.scale.X = (0.65625); actor->spr.shade = -10; actor->spr.hitag = 0; } diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 73d52d6d4..7a7978a97 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -353,7 +353,7 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, double viewz) if (tilehasmodelorvoxel(tsp->picnum,tsp->pal)) { - tSpr->SetScaleY(0); + tSpr->scale.Y = (0); // cstat: trans reverse // clipdist: tell mdsprite.cpp to use Z-buffer hacks to hide overdraw issues tSpr->clipdist |= TSPR_FLAGS_MDHACK; diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index da363b689..0ebe7b50b 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -306,8 +306,8 @@ void SpawnMidSplash(DSWActor* actor) DVector3(actor->spr.pos.XY(), ActorZOfMiddle(actor)), actor->spr.angle); actorNew->spr.shade = -12; - actorNew->spr.SetScaleX((70 - RandomRange(20)) * REPEAT_SCALE); - actorNew->spr.SetScaleY((70 - RandomRange(20)) * REPEAT_SCALE); + actorNew->spr.scale.X = ((70 - RandomRange(20)) * REPEAT_SCALE); + actorNew->spr.scale.Y = ((70 - RandomRange(20)) * REPEAT_SCALE); actorNew->opos = actor->opos; actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -332,8 +332,8 @@ void SpawnFloorSplash(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_GoreFloorSplash, actor->sector(), actor->spr.pos, actor->spr.angle); actorNew->spr.shade = -12; - actorNew->spr.SetScaleX((70 - RandomRange(20)) * REPEAT_SCALE); - actorNew->spr.SetScaleY((70 - RandomRange(20)) * REPEAT_SCALE); + actorNew->spr.scale.X = ((70 - RandomRange(20)) * REPEAT_SCALE); + actorNew->spr.scale.Y = ((70 - RandomRange(20)) * REPEAT_SCALE); actorNew->opos = actor->opos; actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -534,8 +534,8 @@ int DoBloodSpray(DSWActor* actor) SetOwner(actor, actorNew); actorNew->spr.shade = -12; - actorNew->spr.SetScaleX((40 - RandomRange(30))* REPEAT_SCALE); - actorNew->spr.SetScaleY((40 - RandomRange(30))* REPEAT_SCALE); + actorNew->spr.scale.X = ((40 - RandomRange(30))* REPEAT_SCALE); + actorNew->spr.scale.Y = ((40 - RandomRange(30))* REPEAT_SCALE); actorNew->opos = actor->opos; actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -732,8 +732,8 @@ int DoPhosphorus(DSWActor* actor) actorNew->spr.hitag = LUMINOUS; // Always full brightness SetOwner(actor, actorNew); actorNew->spr.shade = -40; - actorNew->spr.SetScaleX((12 + RandomRange(10))* REPEAT_SCALE); - actorNew->spr.SetScaleY((12 + RandomRange(10))* REPEAT_SCALE); + actorNew->spr.scale.X = ((12 + RandomRange(10))* REPEAT_SCALE); + actorNew->spr.scale.Y = ((12 + RandomRange(10))* REPEAT_SCALE); actorNew->opos = actor->opos; actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -1806,8 +1806,8 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity) actorNew->spr.shade = -12; SetOwner(actor, actorNew); - actorNew->spr.SetScaleX((64 - RandomRange(35)) * REPEAT_SCALE); - actorNew->spr.SetScaleY((64 - RandomRange(35)) * REPEAT_SCALE); + actorNew->spr.scale.X = ((64 - RandomRange(35)) * REPEAT_SCALE); + actorNew->spr.scale.Y = ((64 - RandomRange(35)) * REPEAT_SCALE); actorNew->spr.shade = -15; actorNew->copy_clipdist(actor); actorNew->user.WeaponNum = actor->user.WeaponNum; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 58d23f79d..6c310e8ae 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -8105,7 +8105,7 @@ int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor) if (wActor) SetOwner(GetOwner(wActor), actorNew); SetAttach(sActor, actorNew); - actorNew->spr.SetScaleY(0); + actorNew->spr.scale.Y = (0); actorNew->clipdist = 0.5; actorNew->user.WaitTics = 120+60; @@ -11297,7 +11297,7 @@ int DoSerpMeteor(DSWActor* actor) actor->spr.scale.X += (MISSILEMOVETICS * 2 * REPEAT_SCALE); if (actor->spr.scale.X > 1.25) - actor->spr.SetScaleX(1.25); + actor->spr.scale.X = (1.25); actor->user.coll = move_missile(actor, actor->user.change, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -11342,7 +11342,7 @@ int DoMirvMissile(DSWActor* actor) { actor->spr.scale.X += (MISSILEMOVETICS * 2 * REPEAT_SCALE); if (actor->spr.scale.X > 1.25) - actor->spr.SetScaleX(1.25); + actor->spr.scale.X = (1.25); actor->user.coll = move_missile(actor, actor->user.change, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -17636,8 +17636,8 @@ int DoBubble(DSWActor* actor) actor->user.pos.Y = 0.5; } - actor->spr.SetScaleX(actor->user.pos.X + ((RANDOM_P2(8 << 8) >> 8) - 4) * REPEAT_SCALE); - actor->spr.SetScaleY(actor->user.pos.Y + ((RANDOM_P2(8 << 8) >> 8) - 4) * REPEAT_SCALE); + actor->spr.scale.X = (actor->user.pos.X + ((RANDOM_P2(8 << 8) >> 8) - 4) * REPEAT_SCALE); + actor->spr.scale.Y = (actor->user.pos.Y + ((RANDOM_P2(8 << 8) >> 8) - 4) * REPEAT_SCALE); if (actor->spr.pos.Z < actor->sector()->ceilingz) {