mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- lots of repeat literals in SW
This commit is contained in:
parent
8ede08ce69
commit
8cb40291f2
10 changed files with 33 additions and 62 deletions
|
@ -728,8 +728,7 @@ int SetupGirlNinja(DSWActor* actor)
|
||||||
|
|
||||||
actor->user.StateEnd = s_GirlNinjaDie;
|
actor->user.StateEnd = s_GirlNinjaDie;
|
||||||
actor->user.Rot = sg_GirlNinjaRun;
|
actor->user.Rot = sg_GirlNinjaRun;
|
||||||
actor->spr.xrepeat = 51;
|
actor->spr.SetScale(0.796875, 0.0671875);
|
||||||
actor->spr.yrepeat = 43;
|
|
||||||
|
|
||||||
actor->user.Attrib = &GirlNinjaAttrib;
|
actor->user.Attrib = &GirlNinjaAttrib;
|
||||||
actor->spr.pal = actor->user.spal = 26;
|
actor->spr.pal = actor->user.spal = 26;
|
||||||
|
|
|
@ -320,8 +320,7 @@ int SetupHornet(DSWActor* actor)
|
||||||
|
|
||||||
actor->user.pos.Z = actor->spr.pos.Z;
|
actor->user.pos.Z = actor->spr.pos.Z;
|
||||||
|
|
||||||
actor->spr.xrepeat = 37;
|
actor->spr.SetScale(0.578125, 0.5);
|
||||||
actor->spr.yrepeat = 32;
|
|
||||||
|
|
||||||
// Special looping buzz sound attached to each hornet spawned
|
// Special looping buzz sound attached to each hornet spawned
|
||||||
PlaySound(DIGI_HORNETBUZZ, actor, v3df_follow|v3df_init);
|
PlaySound(DIGI_HORNETBUZZ, actor, v3df_follow|v3df_init);
|
||||||
|
|
|
@ -664,12 +664,10 @@ void DoAutoSize(tspritetype* tspr)
|
||||||
case ICON_STAR: // 1793
|
case ICON_STAR: // 1793
|
||||||
break;
|
break;
|
||||||
case ICON_UZI: // 1797
|
case ICON_UZI: // 1797
|
||||||
tspr->xrepeat = 43;
|
tspr->SetScale(0.671875, 0.625);
|
||||||
tspr->yrepeat = 40;
|
|
||||||
break;
|
break;
|
||||||
case ICON_UZIFLOOR: // 1807
|
case ICON_UZIFLOOR: // 1807
|
||||||
tspr->xrepeat = 43;
|
tspr->SetScale(0.671875, 0.625);
|
||||||
tspr->yrepeat = 40;
|
|
||||||
break;
|
break;
|
||||||
case ICON_LG_UZI_AMMO: // 1799
|
case ICON_LG_UZI_AMMO: // 1799
|
||||||
break;
|
break;
|
||||||
|
@ -684,8 +682,7 @@ void DoAutoSize(tspritetype* tspr)
|
||||||
case ICON_ROCKET: // 1843
|
case ICON_ROCKET: // 1843
|
||||||
break;
|
break;
|
||||||
case ICON_SHOTGUN: // 1794
|
case ICON_SHOTGUN: // 1794
|
||||||
tspr->xrepeat = 57;
|
tspr->SetScale(0.890625, 0.90625);
|
||||||
tspr->yrepeat = 58;
|
|
||||||
break;
|
break;
|
||||||
case ICON_LG_ROCKET: // 1796
|
case ICON_LG_ROCKET: // 1796
|
||||||
break;
|
break;
|
||||||
|
@ -696,16 +693,14 @@ void DoAutoSize(tspritetype* tspr)
|
||||||
case ICON_MICRO_BATTERY: // 1800
|
case ICON_MICRO_BATTERY: // 1800
|
||||||
break;
|
break;
|
||||||
case ICON_GRENADE_LAUNCHER: // 1817
|
case ICON_GRENADE_LAUNCHER: // 1817
|
||||||
tspr->xrepeat = 54;
|
tspr->SetScale(0.84375, 0.8125);
|
||||||
tspr->yrepeat = 52;
|
|
||||||
break;
|
break;
|
||||||
case ICON_LG_GRENADE: // 1831
|
case ICON_LG_GRENADE: // 1831
|
||||||
break;
|
break;
|
||||||
case ICON_LG_MINE: // 1842
|
case ICON_LG_MINE: // 1842
|
||||||
break;
|
break;
|
||||||
case ICON_RAIL_GUN: // 1811
|
case ICON_RAIL_GUN: // 1811
|
||||||
tspr->xrepeat = 50;
|
tspr->SetScale(0.78125, 0.84375);
|
||||||
tspr->yrepeat = 54;
|
|
||||||
break;
|
break;
|
||||||
case ICON_RAIL_AMMO: // 1812
|
case ICON_RAIL_AMMO: // 1812
|
||||||
break;
|
break;
|
||||||
|
@ -714,26 +709,21 @@ void DoAutoSize(tspritetype* tspr)
|
||||||
case ICON_MEDKIT: // 1803
|
case ICON_MEDKIT: // 1803
|
||||||
break;
|
break;
|
||||||
case ICON_CHEMBOMB:
|
case ICON_CHEMBOMB:
|
||||||
tspr->xrepeat = 64;
|
tspr->SetScale(1, 0.734375);
|
||||||
tspr->yrepeat = 47;
|
|
||||||
break;
|
break;
|
||||||
case ICON_FLASHBOMB:
|
case ICON_FLASHBOMB:
|
||||||
tspr->xrepeat = 32;
|
tspr->SetScale(0.5, 0.53125);
|
||||||
tspr->yrepeat = 34;
|
|
||||||
break;
|
break;
|
||||||
case ICON_NUKE:
|
case ICON_NUKE:
|
||||||
break;
|
break;
|
||||||
case ICON_CALTROPS:
|
case ICON_CALTROPS:
|
||||||
tspr->xrepeat = 37;
|
tspr->SetScale(0.578125, 0.46875);
|
||||||
tspr->yrepeat = 30;
|
|
||||||
break;
|
break;
|
||||||
case ICON_BOOSTER: // 1810
|
case ICON_BOOSTER: // 1810
|
||||||
tspr->xrepeat = 30;
|
tspr->SetScale(0.46875, 0.59375);
|
||||||
tspr->yrepeat = 38;
|
|
||||||
break;
|
break;
|
||||||
case ICON_HEAT_CARD: // 1819
|
case ICON_HEAT_CARD: // 1819
|
||||||
tspr->xrepeat = 46;
|
tspr->SetScale(0.71875, 0.734375);
|
||||||
tspr->yrepeat = 47;
|
|
||||||
break;
|
break;
|
||||||
case ICON_REPAIR_KIT: // 1813
|
case ICON_REPAIR_KIT: // 1813
|
||||||
break;
|
break;
|
||||||
|
@ -746,8 +736,7 @@ void DoAutoSize(tspritetype* tspr)
|
||||||
case ICON_CLOAK: // 1826
|
case ICON_CLOAK: // 1826
|
||||||
break;
|
break;
|
||||||
case ICON_NIGHT_VISION: // 3031
|
case ICON_NIGHT_VISION: // 3031
|
||||||
tspr->xrepeat = 59;
|
tspr->SetScale(0.921875, 1.109375);
|
||||||
tspr->yrepeat = 71;
|
|
||||||
break;
|
break;
|
||||||
case ICON_NAPALM: // 3046
|
case ICON_NAPALM: // 3046
|
||||||
break;
|
break;
|
||||||
|
@ -760,8 +749,7 @@ void DoAutoSize(tspritetype* tspr)
|
||||||
case ICON_GRENADE: // 3059
|
case ICON_GRENADE: // 3059
|
||||||
break;
|
break;
|
||||||
case ICON_ARMOR: // 3030
|
case ICON_ARMOR: // 3030
|
||||||
tspr->xrepeat = 82;
|
tspr->SetScale(1.28125, 1.3125);
|
||||||
tspr->yrepeat = 84;
|
|
||||||
break;
|
break;
|
||||||
case BLUE_KEY: // 1766
|
case BLUE_KEY: // 1766
|
||||||
break;
|
break;
|
||||||
|
@ -775,20 +763,17 @@ void DoAutoSize(tspritetype* tspr)
|
||||||
case RED_CARD:
|
case RED_CARD:
|
||||||
case GREEN_CARD:
|
case GREEN_CARD:
|
||||||
case YELLOW_CARD:
|
case YELLOW_CARD:
|
||||||
tspr->xrepeat = 36;
|
tspr->SetScale(0.5625, 0.5155625);
|
||||||
tspr->yrepeat = 33;
|
|
||||||
break;
|
break;
|
||||||
case GOLD_SKELKEY:
|
case GOLD_SKELKEY:
|
||||||
case SILVER_SKELKEY:
|
case SILVER_SKELKEY:
|
||||||
case BRONZE_SKELKEY:
|
case BRONZE_SKELKEY:
|
||||||
case RED_SKELKEY:
|
case RED_SKELKEY:
|
||||||
tspr->xrepeat = 39;
|
tspr->SetScale(0.609375, 0.703125);
|
||||||
tspr->yrepeat = 45;
|
|
||||||
break;
|
break;
|
||||||
case SKEL_LOCKED:
|
case SKEL_LOCKED:
|
||||||
case SKEL_UNLOCKED:
|
case SKEL_UNLOCKED:
|
||||||
tspr->xrepeat = 47;
|
tspr->SetScale(0.734375, 0.625);
|
||||||
tspr->yrepeat = 40;
|
|
||||||
break;
|
break;
|
||||||
case RAMCARD_LOCKED:
|
case RAMCARD_LOCKED:
|
||||||
case RAMCARD_UNLOCKED:
|
case RAMCARD_UNLOCKED:
|
||||||
|
|
|
@ -2227,7 +2227,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
||||||
|
|
||||||
// Set the shell number
|
// Set the shell number
|
||||||
actorNew->user.ShellNum = ShellCount;
|
actorNew->user.ShellNum = ShellCount;
|
||||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 13;
|
actorNew->spr.SetScale(0.203125, 0.203125);
|
||||||
break;
|
break;
|
||||||
case SHOT_SHELL:
|
case SHOT_SHELL:
|
||||||
actorNew->spr.pos.Z -= 13;
|
actorNew->spr.pos.Z -= 13;
|
||||||
|
@ -2241,7 +2241,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
||||||
|
|
||||||
// Set the shell number
|
// Set the shell number
|
||||||
actorNew->user.ShellNum = ShellCount;
|
actorNew->user.ShellNum = ShellCount;
|
||||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 18;
|
actorNew->spr.SetScale(0.28125, 0.28125);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -474,7 +474,7 @@ int SetupLava(DSWActor* actor)
|
||||||
actor->user.Rot = sg_LavaRun;
|
actor->user.Rot = sg_LavaRun;
|
||||||
|
|
||||||
EnemyDefaults(actor, &LavaActionSet, &LavaPersonality);
|
EnemyDefaults(actor, &LavaActionSet, &LavaPersonality);
|
||||||
actor->spr.xrepeat = actor->spr.yrepeat = 110;
|
actor->spr.SetScale(1.71875, 1.71875);
|
||||||
actor->clipdist = 32;
|
actor->clipdist = 32;
|
||||||
actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT);
|
actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT);
|
||||||
|
|
||||||
|
|
|
@ -390,8 +390,7 @@ int SetupWashGirl(DSWActor* actor)
|
||||||
actor->user.Rot = 0;
|
actor->user.Rot = 0;
|
||||||
actor->user.RotNum = 0;
|
actor->user.RotNum = 0;
|
||||||
|
|
||||||
actor->spr.xrepeat = 28;
|
actor->spr.SetScale(0.4374, 0.375);
|
||||||
actor->spr.yrepeat = 24;
|
|
||||||
actor->vel.X = 0;
|
actor->vel.X = 0;
|
||||||
actor->vel.Z = 0;
|
actor->vel.Z = 0;
|
||||||
actor->spr.lotag = WASHGIRL_R0;
|
actor->spr.lotag = WASHGIRL_R0;
|
||||||
|
@ -621,8 +620,7 @@ int SetupTrashCan(DSWActor* actor)
|
||||||
actor->user.RotNum = 0;
|
actor->user.RotNum = 0;
|
||||||
|
|
||||||
|
|
||||||
actor->spr.xrepeat = 46;
|
actor->spr.SetScale(0.71875, 0.65625);
|
||||||
actor->spr.yrepeat = 42;
|
|
||||||
actor->vel.X = 0;
|
actor->vel.X = 0;
|
||||||
actor->vel.Z = 0;
|
actor->vel.Z = 0;
|
||||||
actor->user.ID = TRASHCAN;
|
actor->user.ID = TRASHCAN;
|
||||||
|
@ -1297,8 +1295,7 @@ int SetupCarGirl(DSWActor* actor)
|
||||||
actor->user.Rot = 0;
|
actor->user.Rot = 0;
|
||||||
actor->user.RotNum = 0;
|
actor->user.RotNum = 0;
|
||||||
|
|
||||||
actor->spr.xrepeat = 29;
|
actor->spr.SetScale(0.453125, 0.390625);
|
||||||
actor->spr.yrepeat = 25;
|
|
||||||
actor->vel.X = 0;
|
actor->vel.X = 0;
|
||||||
actor->vel.Z = 0;
|
actor->vel.Z = 0;
|
||||||
actor->spr.lotag = CARGIRL_R0;
|
actor->spr.lotag = CARGIRL_R0;
|
||||||
|
@ -1533,8 +1530,7 @@ int SetupMechanicGirl(DSWActor* actor)
|
||||||
actor->user.Rot = 0;
|
actor->user.Rot = 0;
|
||||||
actor->user.RotNum = 0;
|
actor->user.RotNum = 0;
|
||||||
|
|
||||||
actor->spr.xrepeat = 27;
|
actor->spr.SetScale(0.421875, 0.40625);
|
||||||
actor->spr.yrepeat = 26;
|
|
||||||
actor->vel.X = 0;
|
actor->vel.X = 0;
|
||||||
actor->vel.Z = 0;
|
actor->vel.Z = 0;
|
||||||
actor->spr.lotag = MECHANICGIRL_R0;
|
actor->spr.lotag = MECHANICGIRL_R0;
|
||||||
|
@ -1768,8 +1764,7 @@ int SetupSailorGirl(DSWActor* actor)
|
||||||
actor->user.Rot = 0;
|
actor->user.Rot = 0;
|
||||||
actor->user.RotNum = 0;
|
actor->user.RotNum = 0;
|
||||||
|
|
||||||
actor->spr.xrepeat = 28;
|
actor->spr.SetScale(0.4375, 0.40625);
|
||||||
actor->spr.yrepeat = 26;
|
|
||||||
actor->vel.X = 0;
|
actor->vel.X = 0;
|
||||||
actor->vel.Z = 0;
|
actor->vel.Z = 0;
|
||||||
actor->spr.lotag = SAILORGIRL_R0;
|
actor->spr.lotag = SAILORGIRL_R0;
|
||||||
|
@ -1998,8 +1993,7 @@ int SetupPruneGirl(DSWActor* actor)
|
||||||
actor->user.Rot = 0;
|
actor->user.Rot = 0;
|
||||||
actor->user.RotNum = 0;
|
actor->user.RotNum = 0;
|
||||||
|
|
||||||
actor->spr.xrepeat = 33;
|
actor->spr.SetScale(0.515625, 0.4375);
|
||||||
actor->spr.yrepeat = 28;
|
|
||||||
actor->vel.X = 0;
|
actor->vel.X = 0;
|
||||||
actor->vel.Z = 0;
|
actor->vel.Z = 0;
|
||||||
actor->spr.lotag = PRUNEGIRL_R0;
|
actor->spr.lotag = PRUNEGIRL_R0;
|
||||||
|
|
|
@ -1838,8 +1838,7 @@ int SetupNinja(DSWActor* actor)
|
||||||
|
|
||||||
actor->user.StateEnd = s_NinjaDie;
|
actor->user.StateEnd = s_NinjaDie;
|
||||||
actor->user.Rot = sg_NinjaRun;
|
actor->user.Rot = sg_NinjaRun;
|
||||||
actor->spr.xrepeat = 46;
|
actor->spr.SetScale(0.71875, 0.71875);
|
||||||
actor->spr.yrepeat = 46;
|
|
||||||
|
|
||||||
if (actor->spr.pal == PALETTE_PLAYER5)
|
if (actor->spr.pal == PALETTE_PLAYER5)
|
||||||
{
|
{
|
||||||
|
@ -2419,8 +2418,7 @@ void InitPlayerSprite(PLAYER* pp)
|
||||||
actor->spr.shade = -60; // was 15
|
actor->spr.shade = -60; // was 15
|
||||||
actor->clipdist = 16;
|
actor->clipdist = 16;
|
||||||
|
|
||||||
actor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
|
actor->spr.SetScale(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_YREPEAT);
|
||||||
actor->spr.yrepeat = PLAYER_NINJA_YREPEAT;
|
|
||||||
actor->spr.pal = PALETTE_PLAYER0 + pp->pnum;
|
actor->spr.pal = PALETTE_PLAYER0 + pp->pnum;
|
||||||
actor->user.spal = actor->spr.pal;
|
actor->user.spal = actor->spr.pal;
|
||||||
|
|
||||||
|
|
|
@ -6130,7 +6130,7 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
|
||||||
NewStateGroup(plActor, plActor->user.ActorActionSet->Stand);
|
NewStateGroup(plActor, plActor->user.ActorActionSet->Stand);
|
||||||
plActor->spr.picnum = plActor->user.State->Pic;
|
plActor->spr.picnum = plActor->user.State->Pic;
|
||||||
plActor->spr.picnum = plActor->user.State->Pic;
|
plActor->spr.picnum = plActor->user.State->Pic;
|
||||||
plActor->spr.xrepeat = plActor->spr.yrepeat = PLAYER_NINJA_XREPEAT;
|
plActor->spr.SetScale(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_XREPEAT);
|
||||||
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
||||||
plActor->spr.pos = pp->pos.plusZ(PLAYER_HEIGHTF);
|
plActor->spr.pos = pp->pos.plusZ(PLAYER_HEIGHTF);
|
||||||
plActor->spr.angle = pp->angle.ang;
|
plActor->spr.angle = pp->angle.ang;
|
||||||
|
@ -6150,8 +6150,7 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
|
||||||
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
||||||
plActor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
plActor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
pp->input.actions |= SB_CENTERVIEW;
|
pp->input.actions |= SB_CENTERVIEW;
|
||||||
plActor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
|
plActor->spr.SetScale(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_YREPEAT);
|
||||||
plActor->spr.yrepeat = PLAYER_NINJA_YREPEAT;
|
|
||||||
|
|
||||||
pp->horizon.horiz = nullAngle;
|
pp->horizon.horiz = nullAngle;
|
||||||
DoPlayerResetMovement(pp);
|
DoPlayerResetMovement(pp);
|
||||||
|
|
|
@ -114,10 +114,8 @@ constexpr double PLAYER_FALL_HEIGHTF = 28;
|
||||||
constexpr double PLAYER_DEATH_HEIGHTF = 16;
|
constexpr double PLAYER_DEATH_HEIGHTF = 16;
|
||||||
constexpr double PLAYER_DEAD_HEAD_FLOORZ_OFFSET = 7;
|
constexpr double PLAYER_DEAD_HEAD_FLOORZ_OFFSET = 7;
|
||||||
|
|
||||||
//#define PLAYER_NINJA_XREPEAT (56)
|
constexpr double PLAYER_NINJA_XREPEAT = 0.734375;
|
||||||
//#define PLAYER_NINJA_YREPEAT (56)
|
constexpr double PLAYER_NINJA_YREPEAT = 0.515625;
|
||||||
#define PLAYER_NINJA_XREPEAT (47)
|
|
||||||
#define PLAYER_NINJA_YREPEAT (33)
|
|
||||||
|
|
||||||
BEGIN_SW_NS
|
BEGIN_SW_NS
|
||||||
|
|
||||||
|
|
|
@ -760,8 +760,7 @@ int SetupZombie(DSWActor* actor)
|
||||||
actor->user.Health = 100;
|
actor->user.Health = 100;
|
||||||
actor->user.StateEnd = &s_ZombiePain[0][0];
|
actor->user.StateEnd = &s_ZombiePain[0][0];
|
||||||
actor->user.Rot = sg_ZombieRun;
|
actor->user.Rot = sg_ZombieRun;
|
||||||
actor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
|
actor->spr.SetScale(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_YREPEAT);
|
||||||
actor->spr.yrepeat = PLAYER_NINJA_YREPEAT;
|
|
||||||
|
|
||||||
actor->user.Attrib = &ZombieAttrib;
|
actor->user.Attrib = &ZombieAttrib;
|
||||||
EnemyDefaults(actor, &ZombieActionSet, &ZombiePersonality);
|
EnemyDefaults(actor, &ZombieActionSet, &ZombiePersonality);
|
||||||
|
|
Loading…
Reference in a new issue