diff --git a/src/common/objects/dobject.cpp b/src/common/objects/dobject.cpp index b7d44a697..3676e7eaf 100644 --- a/src/common/objects/dobject.cpp +++ b/src/common/objects/dobject.cpp @@ -34,17 +34,14 @@ #include +#include "dobject.h" #include "cmdlib.h" -#include "actor.h" -#include "doomstat.h" // Ideally, DObjects can be used independant of Doom. -#include "d_player.h" // See p_user.cpp to find out why this doesn't work. #include "c_dispatch.h" -#include "dsectoreffect.h" #include "serializer.h" #include "vm.h" -#include "g_levellocals.h" #include "types.h" #include "i_time.h" +#include "printf.h" //========================================================================== // @@ -68,46 +65,6 @@ _DECLARE_TI(DObject) // This bit is needed in the playsim - but give it a less crappy name. DEFINE_FIELD_BIT(DObject,ObjectFlags, bDestroyed, OF_EuthanizeMe) -//========================================================================== -// -// -// -//========================================================================== - -CCMD (dumpactors) -{ - const char *const filters[32] = - { - "0:All", "1:Doom", "2:Heretic", "3:DoomHeretic", "4:Hexen", "5:DoomHexen", "6:Raven", "7:IdRaven", - "8:Strife", "9:DoomStrife", "10:HereticStrife", "11:DoomHereticStrife", "12:HexenStrife", - "13:DoomHexenStrife", "14:RavenStrife", "15:NotChex", "16:Chex", "17:DoomChex", "18:HereticChex", - "19:DoomHereticChex", "20:HexenChex", "21:DoomHexenChex", "22:RavenChex", "23:NotStrife", "24:StrifeChex", - "25:DoomStrifeChex", "26:HereticStrifeChex", "27:NotHexen", "28:HexenStrifeChex", "29:NotHeretic", - "30:NotDoom", "31:All", - }; - Printf("%u object class types total\nActor\tEd Num\tSpawnID\tFilter\tSource\n", PClass::AllClasses.Size()); - for (unsigned int i = 0; i < PClass::AllClasses.Size(); i++) - { - PClass *cls = PClass::AllClasses[i]; - PClassActor *acls = ValidateActor(cls); - if (acls != NULL) - { - auto ainfo = acls->ActorInfo(); - Printf("%s\t%i\t%i\t%s\t%s\n", - acls->TypeName.GetChars(), ainfo->DoomEdNum, - ainfo->SpawnID, filters[ainfo->GameFilter & 31], - acls->SourceLumpName.GetChars()); - } - else if (cls != NULL) - { - Printf("%s\tn/a\tn/a\tn/a\tEngine (not an actor type)\tSource: %s\n", cls->TypeName.GetChars(), cls->SourceLumpName.GetChars()); - } - else - { - Printf("Type %i is not an object class\n", i); - } - } -} //========================================================================== // diff --git a/src/console/c_cmds.cpp b/src/console/c_cmds.cpp index ef7115709..f10529931 100644 --- a/src/console/c_cmds.cpp +++ b/src/console/c_cmds.cpp @@ -1141,3 +1141,44 @@ CCMD(idmus) } } + +//========================================================================== +// +// +// +//========================================================================== + +CCMD(dumpactors) +{ + const char* const filters[32] = + { + "0:All", "1:Doom", "2:Heretic", "3:DoomHeretic", "4:Hexen", "5:DoomHexen", "6:Raven", "7:IdRaven", + "8:Strife", "9:DoomStrife", "10:HereticStrife", "11:DoomHereticStrife", "12:HexenStrife", + "13:DoomHexenStrife", "14:RavenStrife", "15:NotChex", "16:Chex", "17:DoomChex", "18:HereticChex", + "19:DoomHereticChex", "20:HexenChex", "21:DoomHexenChex", "22:RavenChex", "23:NotStrife", "24:StrifeChex", + "25:DoomStrifeChex", "26:HereticStrifeChex", "27:NotHexen", "28:HexenStrifeChex", "29:NotHeretic", + "30:NotDoom", "31:All", + }; + Printf("%u object class types total\nActor\tEd Num\tSpawnID\tFilter\tSource\n", PClass::AllClasses.Size()); + for (unsigned int i = 0; i < PClass::AllClasses.Size(); i++) + { + PClass* cls = PClass::AllClasses[i]; + PClassActor* acls = ValidateActor(cls); + if (acls != NULL) + { + auto ainfo = acls->ActorInfo(); + Printf("%s\t%i\t%i\t%s\t%s\n", + acls->TypeName.GetChars(), ainfo->DoomEdNum, + ainfo->SpawnID, filters[ainfo->GameFilter & 31], + acls->SourceLumpName.GetChars()); + } + else if (cls != NULL) + { + Printf("%s\tn/a\tn/a\tn/a\tEngine (not an actor type)\tSource: %s\n", cls->TypeName.GetChars(), cls->SourceLumpName.GetChars()); + } + else + { + Printf("Type %i is not an object class\n", i); + } + } +}