diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 3a68d285b..f5517148b 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -5661,8 +5661,7 @@ static void actCheckThings() seqSpawn(24, actor, -1); if (hit.type == kHitSprite) { - actor->spr.xrepeat = 32; - actor->spr.yrepeat = 32; + actor->spr.SetScale(0.5, 0.5); actDamageSprite(actor->GetOwner(), hit.actor(), kDamageFall, actor->xspr.data1); } break; diff --git a/source/games/blood/src/animatesprite.cpp b/source/games/blood/src/animatesprite.cpp index 54b40bb64..e156ba71a 100644 --- a/source/games/blood/src/animatesprite.cpp +++ b/source/games/blood/src/animatesprite.cpp @@ -474,8 +474,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF pNSprite->pos = pTSprite->pos.plusZ(-32 - weaponIcon.zOffset); pNSprite->picnum = nTile; pNSprite->shade = pTSprite->shade; - pNSprite->xrepeat = 32; - pNSprite->yrepeat = 32; + pNSprite->SetScale(0.5, 0.5); auto& nVoxel = voxelIndex[nTile]; if (cl_showweapon == 2 && r_voxels && nVoxel != -1) { diff --git a/source/games/blood/src/callback.cpp b/source/games/blood/src/callback.cpp index ea2b62c7a..4278c5e51 100644 --- a/source/games/blood/src/callback.cpp +++ b/source/games/blood/src/callback.cpp @@ -93,7 +93,7 @@ void FlareBurst(DBloodActor* actor, sectortype*) // 2 auto spawnedactor = actSpawnSprite(actor, 5); spawnedactor->spr.picnum = 2424; spawnedactor->spr.shade = -128; - spawnedactor->spr.xrepeat = spawnedactor->spr.yrepeat = 32; + spawnedactor->spr.SetScale(0.5, 0.5); spawnedactor->spr.type = kMissileFlareAlt; spawnedactor->clipdist = 0.5; spawnedactor->SetOwner(actor); diff --git a/source/games/blood/src/db.cpp b/source/games/blood/src/db.cpp index 2722b987d..a30241723 100644 --- a/source/games/blood/src/db.cpp +++ b/source/games/blood/src/db.cpp @@ -51,7 +51,7 @@ DBloodActor* InsertSprite(sectortype* pSector, int nStat) auto act = static_cast(::InsertActor(RUNTIME_CLASS(DBloodActor), pSector, nStat)); act->spr.cstat = CSTAT_SPRITE_YCENTER; act->clipdist = 8; - act->spr.xrepeat = act->spr.yrepeat = 64; + act->spr.SetScale(1, 1); return act; } diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 950760a72..d5e51d0ba 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -1357,8 +1357,7 @@ static bool weaponhitsprite(DDukeActor* proj, DDukeActor *targ, bool fireball) if (spawned) { spawned->spr.pal = 1; - spawned->spr.xrepeat = 32; - spawned->spr.yrepeat = 32; + spawned->spr.SetScale(0.5, 0.5); } deletesprite(proj); @@ -1700,8 +1699,7 @@ void moveweapons_d(void) if (spawned) { spawned->spr.pal = 1; - spawned->spr.xrepeat = 32; - spawned->spr.yrepeat = 32; + spawned->spr.SetScale(0.5, 0.5); } deletesprite(act); continue; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 1e2e036db..79c8de67d 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -980,8 +980,7 @@ static bool weaponhitsprite(DDukeActor *proj, DDukeActor *targ, const DVector3 & if (star) { star->spr.pal = 1; - star->spr.xrepeat = 32; - star->spr.yrepeat = 32; + star->spr.SetScale(0.5, 0.5); } deletesprite(proj); @@ -1340,8 +1339,7 @@ void moveweapons_r(void) if (star) { star->spr.pal = 1; - star->spr.xrepeat = 32; - star->spr.yrepeat = 32; + star->spr.SetScale(0.5, 0.5); } deletesprite(proj); continue; diff --git a/source/games/duke/src/animatesprites_r.cpp b/source/games/duke/src/animatesprites_r.cpp index b45d5ffb0..edc4c15de 100644 --- a/source/games/duke/src/animatesprites_r.cpp +++ b/source/games/duke/src/animatesprites_r.cpp @@ -496,8 +496,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi else if (ps[p].OnBoat && p == screenpeek) { t->picnum = RRTILE7190; - t->xrepeat = 32; - t->yrepeat = 32; + t->SetScale(0.5, 0.5); t4 = 0; t3 = 0; t1 = 0; diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index a8aae2c69..9b45a6680 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -366,7 +366,7 @@ void initfootprint(DDukeActor* actj, DDukeActor* act) act->spr.pos.Z = sect->floorz; if (sect->lotag != 1 && sect->lotag != 2) - act->spr.xrepeat = act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); insertspriteq(act); ChangeActorStat(act, STAT_MISC); diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index 761376dc9..6ac887e23 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -263,7 +263,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* break; case BLOOD: - act->spr.xrepeat = act->spr.yrepeat = 16; + act->spr.SetScale(0.25, 0.25); act->spr.pos.Z -= 26; if (actj && actj->spr.pal == 6) act->spr.pal = 6; @@ -617,8 +617,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* } else if (act->spr.picnum == SHRINKEREXPLOSION) { - act->spr.xrepeat = 32; - act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); } else if (act->spr.picnum == SMALLSMOKE || act->spr.picnum == ONFIRE) { @@ -684,7 +683,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* act->spr.angle = actj->spr.angle; act->spr.xrepeat = act->spr.yrepeat = 4; } - else act->spr.xrepeat = act->spr.yrepeat = 32; + else act->spr.SetScale(0.5, 0.5); ChangeActorStat(act, STAT_MISC); break; @@ -1033,8 +1032,8 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* else { if (act->spr.picnum == AMMO) - act->spr.xrepeat = act->spr.yrepeat = 16; - else act->spr.xrepeat = act->spr.yrepeat = 32; + act->spr.SetScale(0.25, 0.25); + else act->spr.SetScale(0.5, 0.5); } act->spr.shade = -17; @@ -1189,7 +1188,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* case WOODENHORSE: if (actj) - act->spr.xrepeat = act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->clipdist = 18; makeitfall(act); if (actj) act->SetOwner(actj); diff --git a/source/games/duke/src/spawn_r.cpp b/source/games/duke/src/spawn_r.cpp index 479723562..bd9db6d9c 100644 --- a/source/games/duke/src/spawn_r.cpp +++ b/source/games/duke/src/spawn_r.cpp @@ -85,8 +85,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case RRTILE8487: case RRTILE8489: if (!isRRRA()) goto default_case; - act->spr.xrepeat = 32; - act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->spr.extra = 0; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; act->spr.hitag = 0; @@ -690,7 +689,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* act->spr.xrepeat = act->spr.yrepeat = 1 + (krand() & 7); } else - act->spr.xrepeat = act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); ChangeActorStat(act, STAT_MISC); break; case CRANE: @@ -830,8 +829,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case HULKJUMP: case HULK: case HULKSTAYPUT: - act->spr.xrepeat = 32; - act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->setClipDistFromTile(); break; case COOTPLAY: @@ -859,8 +857,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* act->setClipDistFromTile(); break; case COW: - act->spr.xrepeat = 32; - act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->setClipDistFromTile(); break; case HEN: @@ -975,8 +972,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* act->setClipDistFromTile(); break; case CHEERBOAT: - act->spr.xrepeat = 32; - act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->setClipDistFromTile(); break; @@ -1005,8 +1001,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case UFO3: case UFO4: case UFO5: - act->spr.xrepeat = 32; - act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->setClipDistFromTile(); act->spr.extra = 50; break; @@ -1195,8 +1190,8 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* else { if (act->spr.picnum == AMMO) - act->spr.xrepeat = act->spr.yrepeat = 16; - else act->spr.xrepeat = act->spr.yrepeat = 32; + act->spr.SetScale(0.25, 0.25); + else act->spr.SetScale(0.5, 0.5); } act->spr.shade = -17; @@ -1428,8 +1423,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* break; } act->spr.pal = 0; - act->spr.xrepeat = 32; - act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->setClipDistFromTile(); act->saved_ammo = 20; act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; @@ -1460,7 +1454,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case WOODENHORSE: if (actj) - act->spr.xrepeat = act->spr.yrepeat = 32; + act->spr.SetScale(0.5, 0.5); act->clipdist = 18; makeitfall(act); if (actj) act->SetOwner(actj); diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index 9f3ce66e1..e7e2902e6 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -214,8 +214,7 @@ void BuildSnake(int nPlayer, double zVal) if (i == 0) { pActor->spr.pos = pPlayerActor->spr.pos.plusZ(zVal); - pActor->spr.xrepeat = 32; - pActor->spr.yrepeat = 32; + pActor->spr.SetScale(0.5, 0.5); pViewSect = pActor->sector(); sprt = pActor; } diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index d64228d26..c98c936f1 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -1188,8 +1188,7 @@ int SpawnRadiationCloud(DSWActor* actor) SetOwner(GetOwner(actor), actorNew); actorNew->user.WaitTics = 1 * 120; actorNew->spr.shade = -40; - actorNew->spr.xrepeat = 32; - actorNew->spr.yrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->copy_clipdist(actor); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -1274,8 +1273,7 @@ int PlayerInitChemBomb(PLAYER* pp) actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(pp->actor, actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; actorNew->user.WeaponNum = plActor->user.WeaponNum; actorNew->user.Radius = 200; @@ -1339,8 +1337,7 @@ int InitSpriteChemBomb(DSWActor* actor) actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(actor, actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; actorNew->user.WeaponNum = actor->user.WeaponNum; actorNew->user.Radius = 200; @@ -1377,8 +1374,7 @@ int InitChemBomb(DSWActor* actor) actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(GetOwner(actor), actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; actorNew->user.Radius = 200; actorNew->user.ceiling_dist = 3; diff --git a/source/games/sw/src/miscactr.cpp b/source/games/sw/src/miscactr.cpp index 1424502bb..7b3de3712 100644 --- a/source/games/sw/src/miscactr.cpp +++ b/source/games/sw/src/miscactr.cpp @@ -135,8 +135,7 @@ int SetupToiletGirl(DSWActor* actor) actor->user.Rot = 0; actor->user.RotNum = 0; - actor->spr.xrepeat = 38; - actor->spr.yrepeat = 32; + actor->spr.SetScale(0.5, 0.5); actor->vel.X = 0; actor->vel.Z = 0; actor->spr.lotag = TOILETGIRL_R0; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 7404f58fa..e7c44f317 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -10161,8 +10161,7 @@ void SpawnBreakStaticFlames(DSWActor* actor) actorNew->spr.hitag = LUMINOUS; //Always full brightness - actorNew->spr.xrepeat = 32; - actorNew->spr.yrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -40; actorNew->spr.pal = actorNew->user.spal = actor->user.spal; @@ -10513,8 +10512,7 @@ void SpawnMicroExp(DSWActor* actor) expActor->spr.hitag = LUMINOUS; //Always full brightness SetOwner(GetOwner(actor), expActor); expActor->spr.shade = -40; - expActor->spr.xrepeat = 32; - expActor->spr.yrepeat = 32; + expActor->spr.SetScale(0.5, 0.5); expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); if (RANDOM_P2(1024) > 512) @@ -10644,8 +10642,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, DAngle ang) expActor->spr.hitag = LUMINOUS; //Always full brightness SetOwner(GetOwner(actor), expActor); expActor->spr.shade = -40; - expActor->spr.xrepeat = 32; - expActor->spr.yrepeat = 32; + expActor->spr.SetScale(0.5, 0.5); expActor->copy_clipdist(actor); expActor->user.ceiling_dist = (16); expActor->user.floor_dist = (16); @@ -11673,8 +11670,7 @@ void InitSpellRing(PLAYER* pp) actorNew->vel.X = 31.25; SetOwner(pp->actor, actorNew); actorNew->spr.shade = -40; - actorNew->spr.xrepeat = 32; - actorNew->spr.yrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->vel.Z = 0; actorNew->user.pos.Z = 20; @@ -12057,8 +12053,7 @@ void InitSpellNapalm(PLAYER* pp) SetOwner(pp->actor, actor); actor->spr.shade = -40; - actor->spr.xrepeat = 32; - actor->spr.yrepeat = 32; + actor->spr.SetScale(0.5, 0.5); actor->clipdist = 0; actor->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF; actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); @@ -12134,8 +12129,7 @@ int InitEnemyNapalm(DSWActor* actor) SetOwner(actor, actorNew); actorNew->spr.shade = -40; - actorNew->spr.xrepeat = 32; - actorNew->spr.yrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->clipdist = 0; actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -12648,8 +12642,7 @@ int InitSumoNapalm(DSWActor* actor) SetOwner(actor, actorNew); actorNew->spr.shade = -40; - actorNew->spr.xrepeat = 32; - actorNew->spr.yrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->clipdist = 0; actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -14599,8 +14592,7 @@ int SpawnDemonFist(DSWActor* actor) expActor->spr.hitag = LUMINOUS; //Always full brightness expActor->spr.shade = -40; - expActor->spr.xrepeat = 32; - expActor->spr.yrepeat = 32; + expActor->spr.SetScale(0.5, 0.5); expActor->user.spal = expActor->spr.pal = 25; expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); @@ -15243,8 +15235,7 @@ void InitBoltTrap(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], actor->sector(), actor->spr.pos.plusZ(-ActorSizeZ(actor)), actor->spr.angle, BOLT_TRAP_VELOCITY); SetOwner(actor, actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; actorNew->vel.Z = 0; actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); @@ -16795,8 +16786,7 @@ int InitGrenade(PLAYER* pp) actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(pp->actor, actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; //actorNew->clipdist = 5; actorNew->clipdist = 2; @@ -16870,8 +16860,7 @@ int InitSpriteGrenade(DSWActor* actor) SetOwner(GetOwner(actor), actorNew); else SetOwner(actor, actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; //actorNew->clipdist = 5; actorNew->clipdist = 2; @@ -16925,8 +16914,7 @@ int InitMine(PLAYER* pp) auto actorNew = SpawnActor(STAT_MISSILE, MINE, s_Mine, pp->cursector, pos, pp->angle.ang, MINE_VELOCITY); SetOwner(pp->actor, actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; actorNew->clipdist = 8; actorNew->vel.Z = pp->horizon.horiz.Tan() * HORIZ_MULTF; @@ -16974,8 +16962,8 @@ int InitEnemyMine(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, MINE, s_Mine, actor->sector(), actor->spr.pos.plusZ(-40), actor->spr.angle, MINE_VELOCITY); SetOwner(actor, actorNew); - actorNew->spr.yrepeat = 32; - actorNew->spr.xrepeat = 32; + actorNew->spr.SetScale(0.5, 0.5); + actorNew->spr.SetScale(0.5, 0.5); actorNew->spr.shade = -15; actorNew->clipdist = 8;