- did a bit of actor class consolidation by using explicit sprite assignments through 'spawnclasses'.

This commit is contained in:
Christoph Oelckers 2022-12-03 15:22:19 +01:00
parent 23640988db
commit 74368381a9
7 changed files with 74 additions and 244 deletions

View file

@ -29,10 +29,10 @@ spawnclasses
939 = DukeCactusBroke 939 = DukeCactusBroke
2566 = DukeTripbombPlaced 2566 = DukeTripbombPlaced
2567 = DukeLaserline 2567 = DukeLaserline
546 = DukeCrack1 546 = DukeCrack
547 = DukeCrack2 547 = DukeCrack, "CRACK2"
548 = DukeCrack3 548 = DukeCrack, "CRACK3"
549 = DukeCrack4 549 = DukeCrack, "CRACK4"
916 = DukeFireext 916 = DukeFireext
1079 = DukeOozFilter 1079 = DukeOozFilter
1247 = DukeSeenine 1247 = DukeSeenine
@ -81,12 +81,12 @@ spawnclasses
940 = DukeBounceMine 940 = DukeBounceMine
1650 = DukeMortar 1650 = DukeMortar
2999 = DukeFrameEffect 2999 = DukeFrameEffect
925 = DukeNeon1 925 = DukeNeon
926 = DukeNeon2 926 = DukeNeon, "NEON2"
1007 = DukeNeon3 1007 = DukeNeon, "NEON3"
1008 = DukeNeon4 1008 = DukeNeon, "NEON4"
1009 = DukeNeon5 1009 = DukeNeon, "NEON5"
1046 = DukeNeon6 1046 = DukeNeon, "NEON6"
142 = DukeNukeButton 142 = DukeNukeButton
1233 = DukeMoney 1233 = DukeMoney
4460 = DukePaper 4460 = DukePaper
@ -123,26 +123,26 @@ spawnclasses
569 = DukeToilet 569 = DukeToilet
571 = DukeStall 571 = DukeStall
1069 = DukePlug 1069 = DukePlug
568 = DukeFemMag1 568 = DukeFemMag
577 = DukeFemMag2 577 = DukeFemMag, "FEMMAG2"
4900 = DukeTag 4900 = DukeTag
4909 = DukeSign1 4909 = DukeTag, "SIGN1"
4912 = DukeSign2 4912 = DukeTag, "SIGN2"
285 = DukeMaskWall1 285 = DukeMaskWall
913 = DukeMaskWall2 913 = DukeMaskWall, "MASKWALL2"
914 = DukeMaskWall3 914 = DukeMaskWall, "MASKWALL3"
915 = DukeMaskWall4 915 = DukeMaskWall, "MASKWALL4"
514 = DukeMaskWall5 514 = DukeMaskWall, "MASKWALL5"
1059 = DukeMaskWall6 1059 = DukeMaskWall, "MASKWALL6"
1174 = DukeMaskWall7 1174 = DukeMaskWall, "MASKWALL7"
1124 = DukeMaskWall8 1124 = DukeMaskWall, "MASKWALL8"
255 = DukeMaskWall9 255 = DukeMaskWall, "MASKWALL9"
387 = DukeMaskWall10 387 = DukeMaskWall, "MASKWALL10"
391 = DukeMaskWall11 391 = DukeMaskWall, "MASKWALL11"
609 = DukeMaskWall12 609 = DukeMaskWall, "MASKWALL12"
830 = DukeMaskWall13 830 = DukeMaskWall, "MASKWALL13"
988 = DukeMaskWall14 988 = DukeMaskWall, "MASKWALL14"
1024 = DukeMaskWall15 1024 = DukeMaskWall, "MASKWALL15"
550 = DukeFootprints 550 = DukeFootprints
672 = DukeFootprints 672 = DukeFootprints
673 = DukeFootprints 673 = DukeFootprints
@ -163,9 +163,9 @@ spawnclasses
660 = DukeWaterdrip 660 = DukeWaterdrip
160 = DukeDoorshock 160 = DukeDoorshock
1232 = DukeCanWithSomething 1232 = DukeCanWithSomething
2807 = DukeCanWithSomething2 2807 = DukeCanWithSomething, "CANWITHSOMETHING2"
2808 = DukeCanWithSomething3 2808 = DukeCanWithSomething, "CANWITHSOMETHING3"
2809 = DukeCanWithSomething4 2809 = DukeCanWithSomething, "CANWITHSOMETHING4"
1647 = DukeTongue 1647 = DukeTongue
1860 = DukeInnerJaw 1860 = DukeInnerJaw
1861 = DukeInnerJaw1 1861 = DukeInnerJaw1

View file

@ -31,10 +31,10 @@ spawnclasses
1230 = DukeTire 1230 = DukeTire
1194 = DukeCactus 1194 = DukeCactus
1203 = DukeCactusBroke 1203 = DukeCactusBroke
1075 = DukeCrack1 1075 = DukeCrack
1076 = DukeCrack2 1076 = DukeCrack, "CRACK2"
1077 = DukeCrack3 1077 = DukeCrack, "CRACK3"
1078 = DukeCrack4 1078 = DukeCrack, "CRACK4"
1273 = DukeOozFilter 1273 = DukeOozFilter
1324 = DukeSeenine 1324 = DukeSeenine
1346 = DukeTrash 1346 = DukeTrash
@ -74,12 +74,12 @@ spawnclasses
1280 = DukeBottle10 1280 = DukeBottle10
1172 = DukeVase 1172 = DukeVase
4095 = DukeFrameEffect 4095 = DukeFrameEffect
1200 = DukeNeon1 1200 = DukeNeon
1201 = DukeNeon2 1201 = DukeNeon, "NEON2"
1241 = DukeNeon3 1241 = DukeNeon, "NEON3"
1242 = DukeNeon4 1242 = DukeNeon, "NEON4"
1243 = DukeNeon5 1243 = DukeNeon, "NEON5"
1264 = DukeNeon6 1264 = DukeNeon, "NEON6"
1310 = RedneckFeather 1310 = RedneckFeather
1383 = DukeWaterSplash 1383 = DukeWaterSplash
1420 = RedneckMudSplash 1420 = RedneckMudSplash
@ -106,9 +106,9 @@ spawnclasses
1100 = DukeStall 1100 = DukeStall
2121 = RedneckToiletSeat 2121 = RedneckToiletSeat
2122 = RedneckToilet2 2122 = RedneckToilet2
1097 = DukeFemMag1 1097 = DukeFemMag
1106 = DukeFemMag2 1106 = DukeFemMag, "FEMMAG2"
2264 = DukeMaskWall7 2264 = DukeMaskWall, "MASKWALL7"
1079 = DukeFootprints 1079 = DukeFootprints
1144 = DukeFootprints 1144 = DukeFootprints
1145 = DukeFootprints 1145 = DukeFootprints

View file

@ -92,7 +92,6 @@ version "4.10"
#include "zscript/games/duke/actors/helicopt.zs" #include "zscript/games/duke/actors/helicopt.zs"
#include "zscript/games/duke/actors/greenslime.zs" #include "zscript/games/duke/actors/greenslime.zs"
#include "zscript/games/duke/actors/heavyhbomb.zs" #include "zscript/games/duke/actors/heavyhbomb.zs"
#include "zscript/games/duke/actors/neon.zs"
#include "zscript/games/duke/actors/nukebutton.zs" #include "zscript/games/duke/actors/nukebutton.zs"
#include "zscript/games/duke/actors/paper.zs" #include "zscript/games/duke/actors/paper.zs"
#include "zscript/games/duke/actors/watersplash.zs" #include "zscript/games/duke/actors/watersplash.zs"

View file

@ -33,28 +33,3 @@ class DukeCanWithSomething : DukeActor
} }
} }
} }
class DukeCanWithSomething2 : DukeCanWithSomething
{
Default
{
pic "CANWITHSOMETHING2";
}
}
class DukeCanWithSomething3 : DukeCanWithSomething
{
Default
{
pic "CANWITHSOMETHING3";
}
}
class DukeCanWithSomething4 : DukeCanWithSomething
{
Default
{
pic "CANWITHSOMETHING4";
}
}

View file

@ -1,5 +1,5 @@
class DukeCrack1 : DukeActor class DukeCrack : DukeActor
{ {
default default
{ {
@ -57,27 +57,3 @@ class DukeCrack1 : DukeActor
return true; return true;
} }
} }
class DukeCrack2 : DukeCrack1
{
default
{
pic "CRACK2";
}
}
class DukeCrack3 : DukeCrack1
{
default
{
pic "CRACK3";
}
}
class DukeCrack4 : DukeCrack1
{
default
{
pic "CRACK4";
}
}

View file

@ -17,7 +17,7 @@ class DukePlug : DukeActor
} }
} }
class DukeFemMag1 : DukeActor class DukeFemMag : DukeActor
{ {
default default
{ {
@ -31,11 +31,6 @@ class DukeFemMag1 : DukeActor
} }
} }
class DukeFemMag2 : DukeFemMag1
{
default { pic "FEMMAG1"; }
}
class DukeTag : DukeActor class DukeTag : DukeActor
{ {
default default
@ -54,17 +49,7 @@ class DukeTag : DukeActor
} }
} }
class DukeSign1 : DukeTag class DukeMaskWall : DukeActor
{
default { pic "SIGN1"; }
}
class DukeSign2 : DukeTag
{
default { pic "SIGN2"; }
}
class DukeMaskWall1 : DukeActor
{ {
default default
{ {
@ -79,71 +64,6 @@ class DukeMaskWall1 : DukeActor
} }
} }
class DukeMaskWall2 : DukeMaskWall1
{
default { pic "MASKWALL2"; }
}
class DukeMaskWall3 : DukeMaskWall1
{
default { pic "MASKWALL3"; }
}
class DukeMaskWall4 : DukeMaskWall1
{
default { pic "MASKWALL4"; }
}
class DukeMaskWall5 : DukeMaskWall1
{
default { pic "MASKWALL5"; }
}
class DukeMaskWall6 : DukeMaskWall1
{
default { pic "MASKWALL6"; }
}
class DukeMaskWall7 : DukeMaskWall1
{
default { pic "MASKWALL7"; }
}
class DukeMaskWall8 : DukeMaskWall1
{
default { pic "MASKWALL9"; }
}
class DukeMaskWall10 : DukeMaskWall1
{
default { pic "MASKWALL10"; }
}
class DukeMaskWall11 : DukeMaskWall1
{
default { pic "MASKWALL11"; }
}
class DukeMaskWall12 : DukeMaskWall1
{
default { pic "MASKWALL12"; }
}
class DukeMaskWall13 : DukeMaskWall1
{
default { pic "MASKWALL13"; }
}
class DukeMaskWall14 : DukeMaskWall1
{
default { pic "MASKWALL14"; }
}
class DukeMaskWall15 : DukeMaskWall1
{
default { pic "MASKWALL15"; }
}
class DukeFootprints : DukeActor class DukeFootprints : DukeActor
{ {
default default
@ -237,6 +157,32 @@ class DukeCameraPole : DukeGenericPole
} }
} }
class DukeNeon : DukeActor
{
default
{
statnum STAT_MISC;
pic "NEON1";
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
override void Tick()
{
if ((Duke.global_random() / (self.lotag + 1) & 31) > 4) self.shade = -127;
else self.shade = 127;
}
override bool Animate(tspritetype t)
{
t.shade = self.shade;
return true;
}
}
class DeveloperCommentary : DukeActor class DeveloperCommentary : DukeActor
{ {
default default

View file

@ -1,66 +0,0 @@
class DukeNeon1 : DukeActor
{
default
{
statnum STAT_MISC;
pic "NEON1";
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
override void Tick()
{
if ((Duke.global_random() / (self.lotag + 1) & 31) > 4) self.shade = -127;
else self.shade = 127;
}
override bool Animate(tspritetype t)
{
t.shade = self.shade;
return true;
}
}
class DukeNeon2 : DukeNeon1
{
default
{
pic "NEON2";
}
}
class DukeNeon3 : DukeNeon1
{
default
{
pic "NEON3";
}
}
class DukeNeon4 : DukeNeon1
{
default
{
pic "NEON4";
}
}
class DukeNeon5 : DukeNeon1
{
default
{
pic "NEON5";
}
}
class DukeNeon6 : DukeNeon1
{
default
{
pic "NEON6";
}
}