diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 6e6f0ca89..c22d2d81b 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,20 @@ May 11, 2006 (Changes by Graf Zahl) +- Converted the stealth monsters to DECORATE. +- Added string replacement option to obituary strings. +- Changed lock and pickup message handling so that it is either a real + string or a LANGUAGE identifier. The only reason I did the mixed format + in the first place were Hexen's lock messages but they have been + replaced by unique strings in the mean time so the feature isn't needed + any more. +- Added a flags parameter to TranslucentLine. +- Extended the second arg of Line_SetIdentification to set not only + ML_ZONEBOUNDARY but all 8 bits of the third byte in the flag word. + This allows a relatively simple means of setting all the new flags + directly. +- Moved ML_ZONEBOUNDARY to doomdata.h so that it is in the same place as the + other line flags. +- Fixed: Strife's teleport swirl didn't loop its animation. +- Fixed: Strife's rat is not supposed to be shootable. - Fixed: Strife's MiniMissile pickup amount was still incorrect. - Moved Strife's random dialogs into the string table. Now it should also be possible to define dialogs for other actors as well. diff --git a/src/doomdata.h b/src/doomdata.h index 683daa236..097ec779f 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -157,20 +157,18 @@ static inline int GET_SPAC (int flags) // [RH] In case I feel like it, here it is... #define ML_3DMIDTEX_ETERNITY 0x0400 -// [RH] Line blocks everything -#define ML_BLOCKEVERYTHING 0x8000 - // [RH] Extra flags for Strife compatibility -// The first set are as they exist in Strife maps. -// The second set are what they get translated into. #define ML_TRANSLUCENT_STRIFE 0x1000 #define ML_RAILING_STRIFE 0x0200 #define ML_BLOCK_FLOATERS_STRIFE 0x0400 -#define ML_RAILING 0x20000 -#define ML_BLOCK_FLOATERS 0x40000 -#define ML_CLIP_MIDTEX 0x80000 // Automatic for every Strife line -#define ML_WRAP_MIDTEX 0x100000 + +#define ML_BLOCKEVERYTHING 0x00008000 // [RH] Line blocks everything +#define ML_ZONEBOUNDARY 0x00010000 +#define ML_RAILING 0x00020000 +#define ML_BLOCK_FLOATERS 0x00040000 +#define ML_CLIP_MIDTEX 0x00080000 // Automatic for every Strife line +#define ML_WRAP_MIDTEX 0x00100000 // Sector definition, from editing typedef struct diff --git a/src/g_doom/a_arachnotron.cpp b/src/g_doom/a_arachnotron.cpp index 27fb0ef1d..26cd33f6f 100644 --- a/src/g_doom/a_arachnotron.cpp +++ b/src/g_doom/a_arachnotron.cpp @@ -94,19 +94,6 @@ IMPLEMENT_ACTOR (AArachnotron, Doom, 68, 6) PROP_ActiveSound ("baby/active") END_DEFAULTS -class AStealthArachnotron : public AArachnotron -{ - DECLARE_STATELESS_ACTOR (AStealthArachnotron, AArachnotron) -public: - const char *GetObituary () { return GStrings("OB_STEALTHBABY"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthArachnotron, Doom, 9050, 117) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - class AArachnotronPlasma : public APlasmaBall { DECLARE_ACTOR (AArachnotronPlasma, APlasmaBall) diff --git a/src/g_doom/a_archvile.cpp b/src/g_doom/a_archvile.cpp index cbc8babb7..ce200b839 100644 --- a/src/g_doom/a_archvile.cpp +++ b/src/g_doom/a_archvile.cpp @@ -99,19 +99,6 @@ const char *AArchvile::GetObituary () return GStrings("OB_VILE"); } -class AStealthArchvile : public AArchvile -{ - DECLARE_STATELESS_ACTOR (AStealthArchvile, AArchvile) -public: - const char *GetObituary () { return GStrings("OB_STEALTHVILE"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthArchvile, Doom, 9051, 118) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - class AArchvileFire : public AActor { DECLARE_ACTOR (AArchvileFire, AActor) diff --git a/src/g_doom/a_bruiser.cpp b/src/g_doom/a_bruiser.cpp index a38c44ae2..a3fed5156 100644 --- a/src/g_doom/a_bruiser.cpp +++ b/src/g_doom/a_bruiser.cpp @@ -89,20 +89,6 @@ IMPLEMENT_ACTOR (ABaronOfHell, Doom, 3003, 3) PROP_ActiveSound ("baron/active") END_DEFAULTS -class AStealthBaron : public ABaronOfHell -{ - DECLARE_STATELESS_ACTOR (AStealthBaron, ABaronOfHell) -public: - const char *GetObituary () { return GStrings("OB_STEALTHBARON"); } - const char *GetHitObituary () { return GStrings("OB_STEALTHBARON"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthBaron, Doom, 9052, 100) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - class ABaronBall : public AActor { DECLARE_ACTOR (ABaronBall, AActor) @@ -219,20 +205,6 @@ IMPLEMENT_ACTOR (AHellKnight, Doom, 69, 113) PROP_ActiveSound ("knight/active") END_DEFAULTS -class AStealthHellKnight : public AHellKnight -{ - DECLARE_STATELESS_ACTOR (AStealthHellKnight, AHellKnight) -public: - const char *GetObituary () { return GStrings("OB_STEALTHKNIGHT"); } - const char *GetHitObituary () { return GStrings("OB_STEALTHKNIGHT"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthHellKnight, Doom, 9056, 101) - PROP_FlagsSet (MF_STEALTH) - PROP_Alpha (0) - PROP_RenderStyle (STYLE_Translucent) -END_DEFAULTS - void A_BruisAttack (AActor *self) { if (!self->target) diff --git a/src/g_doom/a_cacodemon.cpp b/src/g_doom/a_cacodemon.cpp index 29367b965..21d518f3a 100644 --- a/src/g_doom/a_cacodemon.cpp +++ b/src/g_doom/a_cacodemon.cpp @@ -78,20 +78,6 @@ IMPLEMENT_ACTOR (ACacodemon, Doom, 3005, 19) PROP_AttackSound ("caco/melee") END_DEFAULTS -class AStealthCacodemon : public ACacodemon -{ - DECLARE_STATELESS_ACTOR (AStealthCacodemon, ACacodemon) -public: - const char *GetObituary () { return GStrings("OB_STEALTHCACO"); } - const char *GetHitObituary () { return GStrings("OB_STEALTHCACO"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthCacodemon, Doom, 9053, 119) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - class ACacodemonBall : public AActor { DECLARE_ACTOR (ACacodemonBall, AActor) diff --git a/src/g_doom/a_demon.cpp b/src/g_doom/a_demon.cpp index b45dc0062..4e55284e8 100644 --- a/src/g_doom/a_demon.cpp +++ b/src/g_doom/a_demon.cpp @@ -84,20 +84,6 @@ IMPLEMENT_ACTOR (ADemon, Doom, 3002, 8) PROP_ActiveSound ("demon/active") END_DEFAULTS -class AStealthDemon : public ADemon -{ - DECLARE_STATELESS_ACTOR (AStealthDemon, ADemon) -public: - const char *GetObituary () { return GStrings("OB_STEALTHDEMON"); } - const char *GetHitObituary () { return GStrings("OB_STEALTHDEMON"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthDemon, Doom, 9055, 121) - PROP_FlagsSet (MF_STEALTH) - PROP_Alpha (0) - PROP_RenderStyle (STYLE_Translucent) -END_DEFAULTS - class ASpectre : public ADemon { DECLARE_STATELESS_ACTOR (ASpectre, ADemon) diff --git a/src/g_doom/a_doomimp.cpp b/src/g_doom/a_doomimp.cpp index 530bf927a..be7311a90 100644 --- a/src/g_doom/a_doomimp.cpp +++ b/src/g_doom/a_doomimp.cpp @@ -94,20 +94,6 @@ IMPLEMENT_ACTOR (ADoomImp, Doom, 3001, 5) PROP_ActiveSound ("imp/active") END_DEFAULTS -class AStealthDoomImp : public ADoomImp -{ - DECLARE_STATELESS_ACTOR (AStealthDoomImp, ADoomImp) -public: - const char *GetObituary () { return GStrings("OB_STEALTHIMP"); } - const char *GetHitObituary () { return GStrings("OB_STEALTHIMP"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthDoomImp, Doom, 9057, 122) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - class ADoomImpBall : public AActor { DECLARE_ACTOR (ADoomImpBall, AActor) diff --git a/src/g_doom/a_fatso.cpp b/src/g_doom/a_fatso.cpp index d04e73b7d..623e29bca 100644 --- a/src/g_doom/a_fatso.cpp +++ b/src/g_doom/a_fatso.cpp @@ -103,19 +103,6 @@ IMPLEMENT_ACTOR (AFatso, Doom, 67, 112) PROP_ActiveSound ("fatso/active") END_DEFAULTS -class AStealthFatso : public AFatso -{ - DECLARE_STATELESS_ACTOR (AStealthFatso, AFatso) -public: - const char *GetObituary () { return GStrings("OB_STEALTHFATSO"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthFatso, Doom, 9058, 123) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - class AFatShot : public AActor { DECLARE_ACTOR (AFatShot, AActor) diff --git a/src/g_doom/a_possessed.cpp b/src/g_doom/a_possessed.cpp index 4a9ac9f2e..08a0115f4 100644 --- a/src/g_doom/a_possessed.cpp +++ b/src/g_doom/a_possessed.cpp @@ -108,19 +108,6 @@ void AZombieMan::NoBlockingSet () P_DropItem (this, "Clip", -1, 256); } -class AStealthZombieMan : public AZombieMan -{ - DECLARE_STATELESS_ACTOR (AStealthZombieMan, AZombieMan) -public: - const char *GetObituary () { return GStrings("OB_STEALTHZOMBIE"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthZombieMan, Doom, 9061, 102) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - // // A_PosAttack // @@ -235,19 +222,6 @@ void AShotgunGuy::NoBlockingSet () P_DropItem (this, "Shotgun", -1, 256); } -class AStealthShotgunGuy : public AShotgunGuy -{ - DECLARE_STATELESS_ACTOR (AStealthShotgunGuy, AShotgunGuy) -public: - const char *GetObituary () { return GStrings("OB_STEALTHSHOTGUY"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthShotgunGuy, Doom, 9060, 103) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - static void A_SPosAttack2 (AActor *self) { int i; @@ -379,19 +353,6 @@ void AChaingunGuy::NoBlockingSet () P_DropItem (this, "Chaingun", -1, 256); } -class AStealthChaingunGuy : public AChaingunGuy -{ - DECLARE_STATELESS_ACTOR (AStealthChaingunGuy, AChaingunGuy) -public: - const char *GetObituary () { return GStrings("OB_STEALTHCHAINGUY"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthChaingunGuy, Doom, 9054, 120) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - // Wolfenstein SS ---------------------------------------------------------- class AWolfensteinSS : public AActor diff --git a/src/g_doom/a_revenant.cpp b/src/g_doom/a_revenant.cpp index 0b3c7fcb3..eff7afee6 100644 --- a/src/g_doom/a_revenant.cpp +++ b/src/g_doom/a_revenant.cpp @@ -104,20 +104,6 @@ IMPLEMENT_ACTOR (ARevenant, Doom, 66, 20) END_DEFAULTS -class AStealthRevenant : public ARevenant -{ - DECLARE_STATELESS_ACTOR (AStealthRevenant, ARevenant) -public: - const char *GetObituary () { return GStrings("OB_STEALTHUNDEAD"); } - const char *GetHitObituary () { return GStrings("OB_STEALTHUNDEAD"); } -}; - -IMPLEMENT_STATELESS_ACTOR (AStealthRevenant, Doom, 9059, 124) - PROP_FlagsSet (MF_STEALTH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (0) -END_DEFAULTS - class ARevenantTracer : public AActor { DECLARE_ACTOR (ARevenantTracer, AActor) diff --git a/src/g_shared/a_keys.cpp b/src/g_shared/a_keys.cpp index a121e2110..4c6ed5971 100644 --- a/src/g_shared/a_keys.cpp +++ b/src/g_shared/a_keys.cpp @@ -177,25 +177,9 @@ static void PrintMessage (const char *str) { if (str != NULL) { - FString temp; - - if (strchr (str, '$')) + if (str[0]=='$') { - // The message or part of it is from the LANGUAGE lump - FString name; - - size_t part1 = strcspn (str, "$"); - temp = FString(str, part1); - - size_t part2 = strcspn (str + part1 + 1, "$"); - name = FString(str + part1 + 1, part2); - - temp += GStrings(name.GetChars()); - if (str[part1 + 1 + part2] == '$') - { - temp += str + part1 + part2 + 2; - } - str = temp.GetChars(); + str=GStrings(str+1); } C_MidPrint (str); } diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index d81cd417d..53edaf1c8 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -824,25 +824,9 @@ static void PrintPickupMessage (const char *str) { if (str != NULL) { - FString temp; - - if (strchr (str, '$')) + if (str[0]=='$') { - // The message or part of it is from the LANGUAGE lump - FString name; - - size_t part1 = strcspn (str, "$"); - temp = FString(str, part1); - - size_t part2 = strcspn (str + part1 + 1, "$"); - name = FString(str + part1 + 1, part2); - - temp += GStrings(name.GetChars()); - if (str[part1 + 1 + part2] == '$') - { - temp += str + part1 + part2 + 2; - } - str = temp.GetChars(); + str=GStrings(str+1); } Printf (PRINT_LOW, "%s\n", str); } diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index e4b597fb1..a0032ae8b 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -126,6 +126,11 @@ void SexMessage (const char *from, char *to, int gender, const char *victim, con }; const char *subst = NULL; + if (from[0]=='$') + { + from=GStrings(from+1); + } + do { if (*from != '%') diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 531322dce..53e5e68e1 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1290,21 +1290,22 @@ void P_AdjustLine (line_t *ld) } // [RH] Set line id (as appropriate) here - // for Doom format maps this must be done in P_TranslateLinedef because - // the tag doesn't always go into the first arg! + // for Doom format maps this must be done in P_TranslateLineDef because + // the tag doesn't always go into the first arg. if (HasBehavior) { if (ld->special == Line_SetIdentification) { ld->id = ld->args[0]; - if (ld->args[1] == 1) - { - ld->flags |= ML_ZONEBOUNDARY; - } + ld->flags |= ld->args[1]<<16; + } + else if (ld->special == TranslucentLine) + { + ld->id = ld->args[0]; + ld->flags |= ld->args[3]<<16; } else if ( ld->special == Teleport_Line || - ld->special == TranslucentLine || ld->special == Scroll_Texture_Model) { ld->id = ld->args[0]; diff --git a/src/r_defs.h b/src/r_defs.h index 3ecb0dc51..effbc64a4 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -419,7 +419,6 @@ enum slopetype_t ST_NEGATIVE }; -#define ML_ZONEBOUNDARY 0x00010000 struct line_s { diff --git a/wadsrc/decorate/decorate.txt b/wadsrc/decorate/decorate.txt index 3b0b0ee8b..df9f3c66d 100644 --- a/wadsrc/decorate/decorate.txt +++ b/wadsrc/decorate/decorate.txt @@ -6,6 +6,7 @@ #include "actors/doom/doomartifacts.txt" #include "actors/doom/doomkeys.txt" #include "actors/doom/doomdecorations.txt" +#include "actors/doom/stealthmonsters.txt" #include "actors/raven/ravenartifacts.txt" #include "actors/raven/ravenhealth.txt" diff --git a/wadsrc/decorate/doom/stealthmonsters.txt b/wadsrc/decorate/doom/stealthmonsters.txt new file mode 100644 index 000000000..f5d7ae31b --- /dev/null +++ b/wadsrc/decorate/doom/stealthmonsters.txt @@ -0,0 +1,127 @@ + +ACTOR StealthArachnotron : Arachnotron 9050 +{ + Game Doom + SpawnID 117 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHBABY" +} + +ACTOR StealthArchvile : Archvile 9051 +{ + Game Doom + SpawnID 118 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHVILE" +} + +ACTOR StealthBaron : BaronOfHell 9052 +{ + Game Doom + SpawnID 100 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHBARON" + HitObituary "$OB_STEALTHBARON" +} + +ACTOR StealthCacodemon : Cacodemon 9053 +{ + Game Doom + SpawnID 119 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHCACO" + HitObituary "$OB_STEALTHCACO" +} + +ACTOR StealthChaingunGuy : ChaingunGuy 9054 +{ + Game Doom + SpawnID 120 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHCHAINGUY" +} + +ACTOR StealthDemon : Demon 9055 +{ + Game Doom + SpawnID 121 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHDEMON" + HitObituary "$OB_STEALTHDEMON" +} + +ACTOR StealthHellKnight : HellKnight 9056 +{ + Game Doom + SpawnID 101 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHKNIGHT" + HitObituary "$OB_STEALTHKNIGHT" +} + +ACTOR StealthDoomImp : DoomImp 9057 +{ + Game Doom + SpawnID 122 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHIMP" + HitObituary "$OB_STEALTHIMP" +} + +ACTOR StealthFatso : Fatso 9058 +{ + Game Doom + SpawnID 123 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHFATSO" +} + +ACTOR StealthRevenant : Revenant 9059 +{ + Game Doom + SpawnID 124 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHUNDEAD" + HitObituary "$OB_STEALTHUNDEAD" +} + +ACTOR StealthShotgunGuy : ShotgunGuy 9060 +{ + Game Doom + SpawnID 103 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHSHOTGUNGUY" +} + +ACTOR StealthZombieMan : ZombieMan 9061 +{ + Game Doom + SpawnID 102 + +STEALTH + RenderStyle Translucent + Alpha 0 + Obituary "$OB_STEALTHZOMBIE" +} + diff --git a/wadsrc/decorate/strife/ratbuddy.txt b/wadsrc/decorate/strife/ratbuddy.txt index 4d5289070..660e28d66 100644 --- a/wadsrc/decorate/strife/ratbuddy.txt +++ b/wadsrc/decorate/strife/ratbuddy.txt @@ -7,7 +7,6 @@ ACTOR RatBuddy 85 Speed 13 Radius 10 Height 16 - +SHOOTABLE +NOBLOOD +FLOORCLIP +CANPASS +ISMONSTER +INCOMBAT MinMissileChance 150 diff --git a/wadsrc/decorate/strife/strifestuff.txt b/wadsrc/decorate/strife/strifestuff.txt index 83f942289..b56abf6ee 100644 --- a/wadsrc/decorate/strife/strifestuff.txt +++ b/wadsrc/decorate/strife/strifestuff.txt @@ -605,7 +605,7 @@ ACTOR TeleportSwirl 23 { Spawn: TELP ABCD 3 Bright - Stop + Loop } } diff --git a/wadsrc/wadsrc.vcproj b/wadsrc/wadsrc.vcproj index 9db22addb..c9fb29584 100644 --- a/wadsrc/wadsrc.vcproj +++ b/wadsrc/wadsrc.vcproj @@ -253,6 +253,9 @@ + +