- 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.

SVN r110 (trunk)
This commit is contained in:
Christoph Oelckers 2006-05-11 17:56:35 +00:00
parent e89867489c
commit 01441cd4f0
22 changed files with 173 additions and 217 deletions

View file

@ -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.

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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 != '%')

View file

@ -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];

View file

@ -419,7 +419,6 @@ enum slopetype_t
ST_NEGATIVE
};
#define ML_ZONEBOUNDARY 0x00010000
struct line_s
{

View file

@ -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"

View file

@ -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"
}

View file

@ -7,7 +7,6 @@ ACTOR RatBuddy 85
Speed 13
Radius 10
Height 16
+SHOOTABLE
+NOBLOOD +FLOORCLIP +CANPASS
+ISMONSTER +INCOMBAT
MinMissileChance 150

View file

@ -605,7 +605,7 @@ ACTOR TeleportSwirl 23
{
Spawn:
TELP ABCD 3 Bright
Stop
Loop
}
}

View file

@ -253,6 +253,9 @@
<File
RelativePath=".\decorate\doom\doomkeys.txt">
</File>
<File
RelativePath=".\decorate\doom\stealthmonsters.txt">
</File>
</Filter>
<Filter
Name="Heretic"

View file

@ -192,6 +192,7 @@ actors/doom/doomarmor.txt decorate/doom/doomarmor.txt
actors/doom/doomartifacts.txt decorate/doom/doomartifacts.txt
actors/doom/doomkeys.txt decorate/doom/doomkeys.txt
actors/doom/doomdecorations.txt decorate/doom/doomdecorations.txt
actors/doom/stealthmonsters.txt decorate/doom/stealthmonsters.txt
actors/raven/ravenartifacts.txt decorate/raven/ravenartifacts.txt
actors/raven/ravenhealth.txt decorate/raven/ravenhealth.txt