From 2cf19f436ab8f2cc56d54ddc2771a847b5e81e35 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 26 Jul 2010 17:10:43 +0000 Subject: [PATCH] - added Gez's dumpactors patch. SVN r2463 (trunk) --- src/dobject.cpp | 27 +++++++++++++++++++++++++++ src/thingdef/thingdef.h | 1 + src/thingdef/thingdef_parse.cpp | 2 ++ 3 files changed, 30 insertions(+) diff --git a/src/dobject.cpp b/src/dobject.cpp index 0ccdd130b..073be864f 100644 --- a/src/dobject.cpp +++ b/src/dobject.cpp @@ -188,6 +188,33 @@ const char *FMetaTable::GetMetaString (DWORD id) const return meta != NULL ? meta->Value.String : NULL; } +CCMD (dumpactors) +{ + char * 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("%i object class types total\nActor\tEd Num\tSpawnID\tFilter\tSource\n", PClass::m_Types.Size()); + for (unsigned int i = 0; i < PClass::m_Types.Size(); i++) + { + PClass *cls = PClass::m_Types[i]; + if (cls != NULL && cls->ActorInfo != NULL) + Printf("%s\t%i\t%i\t%s\t%s\n", + cls->TypeName.GetChars(), cls->ActorInfo->DoomEdNum, + cls->ActorInfo->SpawnID, filters[cls->ActorInfo->GameFilter & 31], + cls->Meta.GetMetaString (ACMETA_Lump)); + else if (cls != NULL) + Printf("%s\tn/a\tn/a\tn/a\tEngine (not an actor type)\n", cls->TypeName.GetChars()); + else + Printf("Type %i is not an object class\n", i); + } +} + CCMD (dumpclasses) { // This is by no means speed-optimized. But it's an informational console diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index df4bc78ab..6b2124149 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -230,6 +230,7 @@ enum ACMETA_MeleeDamage, ACMETA_MissileName, ACMETA_MissileHeight, + ACMETA_Lump, }; diff --git a/src/thingdef/thingdef_parse.cpp b/src/thingdef/thingdef_parse.cpp index 07f4ca4e2..ae236a58c 100644 --- a/src/thingdef/thingdef_parse.cpp +++ b/src/thingdef/thingdef_parse.cpp @@ -1106,6 +1106,8 @@ static FActorInfo *ParseActorHeader(FScanner &sc, Baggage *bag) { FActorInfo *info = CreateNewActor(sc, typeName, parentName, native); info->DoomEdNum = DoomEdNum > 0? DoomEdNum : -1; + info->Class->Meta.SetMetaString (ACMETA_Lump, Wads.GetLumpFullPath(sc.LumpNum)); + SetReplacement(info, replaceName); ResetBaggage (bag, info->Class->ParentClass);