- wrapped all literal assignments to clipdist - part 3

This commit is contained in:
Christoph Oelckers 2022-09-09 18:17:20 +02:00
parent a14c37f596
commit 3c498e715d

View file

@ -57,7 +57,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = 0;
act->spr.yrepeat = 0;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
act->spr.extra = 0;
ChangeActorStat(act, STAT_BOWLING);
break;
@ -77,7 +77,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (!isRRRA()) goto default_case;
act->spr.xrepeat = 16;
act->spr.yrepeat = 16;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
act->spr.extra = 0;
act->spr.cstat = 0;
ChangeActorStat(act, 121);
@ -114,18 +114,18 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE8448:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
break;
case RRTILE8099:
if (!isRRRA()) goto default_case;
act->spr.lotag = 5;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
ChangeActorStat(act, 123);
break;
case RRTILE8704:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
break;
case RRTILE8192:
if (!isRRRA()) goto default_case;
@ -142,7 +142,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE8165:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
act->SetOwner(act);
act->spr.extra = 0;
ChangeActorStat(act, 115);
@ -150,7 +150,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE8593:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
act->SetOwner(act);
act->spr.extra = 0;
ChangeActorStat(act, 122);
@ -168,7 +168,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = 0;
act->spr.yrepeat = 0;
act->spr.clipdist = 0;
act->set_native_clipdist(0);
act->spr.lotag = 0;
ChangeActorStat(act, 106);
break;
@ -411,7 +411,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case PIPE4:
case PIPE5:
case PIPE6:
act->spr.clipdist = 32;
act->set_native_clipdist(32);
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
ChangeActorStat(act, 0);
break;
@ -446,25 +446,25 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.picnum == QUEBALL || act->spr.picnum == STRIPEBALL)
{
act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN;
act->spr.clipdist = 8;
act->set_native_clipdist(8);
}
else
{
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 32;
act->set_native_clipdist(32);
}
ChangeActorStat(act, 2);
break;
case BOWLINGBALL:
act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN;
act->spr.clipdist = 64;
act->set_native_clipdist(64);
act->spr.xrepeat = 11;
act->spr.yrepeat = 9;
ChangeActorStat(act, 2);
break;
case HENSTAND:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 48;
act->set_native_clipdist(48);
act->spr.xrepeat = 21;
act->spr.yrepeat = 15;
ChangeActorStat(act, 2);
@ -477,14 +477,14 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE297:
act->spr.xrepeat = 64;
act->spr.yrepeat = 64;
act->spr.clipdist = 64;
act->set_native_clipdist(64);
ChangeActorStat(act, 108);
break;
case RRTILE3190:
case RRTILE3191:
case RRTILE3192:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 8;
act->set_native_clipdist(8);
act->spr.xrepeat = 32;
act->spr.yrepeat = 26;
act->vel.X = 2;
@ -492,7 +492,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3120:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 8;
act->set_native_clipdist(8);
act->spr.xrepeat = 12;
act->spr.yrepeat = 10;
act->vel.X = 2;
@ -500,7 +500,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3122:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 2;
act->set_native_clipdist(2);
act->spr.xrepeat = 8;
act->spr.yrepeat = 6;
act->vel.X = 1;
@ -508,7 +508,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3123:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 8;
act->set_native_clipdist(8);
act->spr.xrepeat = 13;
act->spr.yrepeat = 13;
act->vel.X = 1;
@ -516,7 +516,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3124:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 8;
act->set_native_clipdist(8);
act->spr.xrepeat = 17;
act->spr.yrepeat = 12;
act->vel.X = 2;
@ -524,7 +524,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3132:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 8;
act->set_native_clipdist(8);
act->spr.xrepeat = 13;
act->spr.yrepeat = 10;
act->vel.X = 0;
@ -532,7 +532,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case BOWLINGPIN:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 48;
act->set_native_clipdist(48);
act->spr.xrepeat = 23;
act->spr.yrepeat = 23;
ChangeActorStat(act, 2);
@ -559,7 +559,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else
{
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 128;
act->set_native_clipdist(128);
}
[[fallthrough]];
case MIKE:
@ -847,7 +847,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case DRONE:
act->spr.xrepeat = 14;
act->spr.yrepeat = 7;
act->spr.clipdist = 128;
act->set_native_clipdist(128);
break;
case SBSWIPE:
case BILLYPLAY:
@ -878,7 +878,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 21;
act->spr.yrepeat = 15;
act->spr.clipdist = 64;
act->set_native_clipdist(64);
}
break;
case MINION:
@ -912,36 +912,36 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 26;
act->spr.yrepeat = 26;
act->spr.clipdist = 75;
act->set_native_clipdist(75);
}
else if (act->spr.pal == 31)
{
act->spr.xrepeat = 36;
act->spr.yrepeat = 36;
act->spr.clipdist = 100;
act->set_native_clipdist(100);
}
else if (act->spr.pal == 32)
{
act->spr.xrepeat = 50;
act->spr.yrepeat = 50;
act->spr.clipdist = 100;
act->set_native_clipdist(100);
}
else
{
act->spr.xrepeat = 50;
act->spr.yrepeat = 50;
act->spr.clipdist = 100;
act->set_native_clipdist(100);
}
break;
case BIKERB:
act->spr.xrepeat = 28;
act->spr.yrepeat = 22;
act->spr.clipdist = 72;
act->set_native_clipdist(72);
break;
case BIKERBV2:
act->spr.xrepeat = 28;
act->spr.yrepeat = 22;
act->spr.clipdist = 72;
act->set_native_clipdist(72);
break;
case BIKER:
act->spr.xrepeat = 28;
@ -951,7 +951,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case CHEERB:
act->spr.xrepeat = 28;
act->spr.yrepeat = 22;
act->spr.clipdist = 72;
act->set_native_clipdist(72);
break;
case CHEER:
case CHEERSTAYPUT:
@ -1443,7 +1443,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE2122:
act->spr.lotag = 1;
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->spr.clipdist = 8;
act->set_native_clipdist(8);
act->SetOwner(act);
break;
case CANWITHSOMETHING:
@ -1461,7 +1461,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (actj)
act->spr.xrepeat = act->spr.yrepeat = 32;
act->spr.clipdist = 72;
act->set_native_clipdist(72);
makeitfall(act);
if (actj) act->SetOwner(actj);
else act->SetOwner(act);
@ -1476,7 +1476,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else
{
if (act->spr.picnum == EGG)
act->spr.clipdist = 24;
act->set_native_clipdist(24);
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();
ChangeActorStat(act, STAT_ZOMBIEACTOR);
}
@ -1489,7 +1489,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = 1;
act->spr.yrepeat = 1;
act->spr.clipdist = 1;
act->set_native_clipdist(1);
ChangeActorStat(act, 100);
break;
}