mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 17:00:48 +00:00
- added an option to disable reflective planes because they can cause
major slowdowns when used improperly. Update to ZDoom r1306: - Fixed: G_DoPlayDemo did not free the demobuffer or the CVAR backups when it failed to start the demo. - Added a MF5_BRIGHT flag to always render an actor fullbright. - Fixed: Calling Door_Animated with a non-zero tag created a new thinker for each two-sided line of the sector. - Added Karate Chris's submission for making 'spray' a cheat. - Added CO2's default parameter additions for several Doom code pointers submission. - Added CO2's A_RemoveMaster/A_RemoveChildren submission. - Added Blzut3's SBARINFO replacement for the Doom statusbar. - Fixed: SBarInfo still displayed the wrong bar for height 0 - Added A_KillSiblings and A_DamageSiblings code pointers. - added MaxAbsorb and MaxFullAbsorb properties for Armor. - Restored the multiplayer scoreboard's former centering so that it doesn't look awful on widescreen intermissions. - Fixed horizontal positioning of 'finished' on the Raven games when scaled. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@253 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
0daec6a9b4
commit
fd5cd3469b
34 changed files with 627 additions and 174 deletions
|
@ -1,3 +1,27 @@
|
|||
December 6, 2008 (Changes by Graf Zahl)
|
||||
- Fixed: G_DoPlayDemo did not free the demobuffer or the CVAR backups when it
|
||||
failed to start the demo.
|
||||
|
||||
December 2, 2008 (Changes by Graf Zahl)
|
||||
- Added a MF5_BRIGHT flag to always render an actor fullbright.
|
||||
- Fixed: Calling Door_Animated with a non-zero tag created a new thinker
|
||||
for each two-sided line of the sector.
|
||||
|
||||
December 1, 2008 (Changes by Graf Zahl)
|
||||
- Added Karate Chris's submission for making 'spray' a cheat.
|
||||
- Added CO2's default parameter additions for several Doom code pointers
|
||||
submission.
|
||||
- Added CO2's A_RemoveMaster/A_RemoveChildren submission.
|
||||
- Added Blzut3's SBARINFO replacement for the Doom statusbar.
|
||||
- Fixed: SBarInfo still displayed the wrong bar for height 0
|
||||
- Added A_KillSiblings and A_DamageSiblings code pointers.
|
||||
- added MaxAbsorb and MaxFullAbsorb properties for Armor.
|
||||
|
||||
December 1, 2008
|
||||
- Restored the multiplayer scoreboard's former centering so that it doesn't
|
||||
look awful on widescreen intermissions.
|
||||
- Fixed horizontal positioning of 'finished' on the Raven games when scaled.
|
||||
|
||||
November 30, 2008 (Changes by Graf Zahl)
|
||||
- Fixed: 'finished' wasn't drawn on the intermission because the space
|
||||
check compared scaled with unscaled coordinates.
|
||||
|
|
|
@ -2849,10 +2849,6 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_doom\doom_sbar.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Raven Shared"
|
||||
|
|
|
@ -557,7 +557,6 @@ add_executable( zdoom WIN32
|
|||
zstrformat.cpp
|
||||
zstring.cpp
|
||||
g_doom/a_doommisc.cpp
|
||||
g_doom/doom_sbar.cpp
|
||||
g_heretic/a_hereticmisc.cpp
|
||||
g_heretic/heretic_sbar.cpp
|
||||
g_hexen/a_hexenmisc.cpp
|
||||
|
|
|
@ -303,6 +303,7 @@ enum
|
|||
// dependence of main engine code of specific actor types.
|
||||
MF5_SUMMONEDMONSTER = 0x02000000, // To mark the friendly Minotaur. Hopefully to be generalized later.
|
||||
MF5_NOVERTICALMELEERANGE=0x04000000,// Does not check vertical distance for melee range
|
||||
MF5_BRIGHT = 0x08000000, // Actor is always rendered fullbright
|
||||
|
||||
|
||||
// --- mobj.renderflags ---
|
||||
|
|
|
@ -95,4 +95,4 @@ typedef DWORD dsfixed_t; // fixedpt used by span drawer
|
|||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -138,6 +138,7 @@ EXTERN_CVAR (Float, m_pitch)
|
|||
EXTERN_CVAR (Float, m_yaw)
|
||||
EXTERN_CVAR (Bool, invertmouse)
|
||||
EXTERN_CVAR (Bool, lookstrafe)
|
||||
EXTERN_CVAR (Int, screenblocks)
|
||||
|
||||
extern gameinfo_t SharewareGameInfo;
|
||||
extern gameinfo_t RegisteredGameInfo;
|
||||
|
@ -636,13 +637,13 @@ void D_Display ()
|
|||
R_RefreshViewBorder ();
|
||||
}
|
||||
|
||||
if (hud_althud && viewheight == SCREENHEIGHT)
|
||||
if (hud_althud && viewheight == SCREENHEIGHT && screenblocks > 10)
|
||||
{
|
||||
if (DrawFSHUD || automapactive) DrawHUD();
|
||||
StatusBar->DrawTopStuff (HUD_None);
|
||||
}
|
||||
else
|
||||
if (viewheight == SCREENHEIGHT && viewactive)
|
||||
if (viewheight == SCREENHEIGHT && viewactive && screenblocks > 10)
|
||||
{
|
||||
StatusBar->Draw (DrawFSHUD ? HUD_Fullscreen : HUD_None);
|
||||
StatusBar->DrawTopStuff (DrawFSHUD ? HUD_Fullscreen : HUD_None);
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
// PIT_VileCheck
|
||||
// Detect a corpse that could be raised.
|
||||
//
|
||||
DECLARE_ACTION(A_Fire)
|
||||
|
||||
void A_Fire(AActor *self, int height);
|
||||
|
||||
|
||||
//
|
||||
|
@ -33,16 +32,24 @@ DEFINE_ACTION_FUNCTION(AActor, A_VileStart)
|
|||
DEFINE_ACTION_FUNCTION(AActor, A_StartFire)
|
||||
{
|
||||
S_Sound (self, CHAN_BODY, "vile/firestrt", 1, ATTN_NORM);
|
||||
CALL_ACTION(A_Fire, self);
|
||||
A_Fire (self, 0);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_FireCrackle)
|
||||
{
|
||||
S_Sound (self, CHAN_BODY, "vile/firecrkl", 1, ATTN_NORM);
|
||||
CALL_ACTION(A_Fire, self);
|
||||
A_Fire (self, 0);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_Fire)
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Fire)
|
||||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_FIXED(height,0);
|
||||
|
||||
A_Fire(self, height);
|
||||
}
|
||||
|
||||
void A_Fire(AActor *self, int height)
|
||||
{
|
||||
AActor *dest;
|
||||
angle_t an;
|
||||
|
@ -59,7 +66,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Fire)
|
|||
|
||||
self->SetOrigin (dest->x + FixedMul (24*FRACUNIT, finecosine[an]),
|
||||
dest->y + FixedMul (24*FRACUNIT, finesine[an]),
|
||||
dest->z);
|
||||
dest->z + height);
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,8 +75,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_Fire)
|
|||
// A_VileTarget
|
||||
// Spawn the hellfire
|
||||
//
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_VileTarget)
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileTarget)
|
||||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_CLASS(fire,0);
|
||||
AActor *fog;
|
||||
|
||||
if (!self->target)
|
||||
|
@ -77,13 +86,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_VileTarget)
|
|||
|
||||
A_FaceTarget (self);
|
||||
|
||||
fog = Spawn ("ArchvileFire", self->target->x, self->target->y,
|
||||
fog = Spawn (fire, self->target->x, self->target->y,
|
||||
self->target->z, ALLOW_REPLACE);
|
||||
|
||||
self->tracer = fog;
|
||||
fog->target = self;
|
||||
fog->tracer = self->target;
|
||||
CALL_ACTION(A_Fire, fog);
|
||||
A_Fire(fog, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
//
|
||||
// A_KeenDie
|
||||
// DOOM II special, map 32.
|
||||
// Uses special tag 666.
|
||||
// Uses special tag 666 by default.
|
||||
//
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_KeenDie)
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie)
|
||||
{
|
||||
CALL_ACTION(A_NoBlocking, self);
|
||||
|
||||
|
@ -31,7 +31,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_KeenDie)
|
|||
}
|
||||
}
|
||||
|
||||
EV_DoDoor (DDoor::doorOpen, NULL, NULL, 666, 2*FRACUNIT, 0, 0, 0);
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_INT(doortag, 0);
|
||||
|
||||
EV_DoDoor (DDoor::doorOpen, NULL, NULL, doortag, 2*FRACUNIT, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2493,6 +2493,9 @@ void G_DoPlayDemo (void)
|
|||
{
|
||||
const char *eek = "Cannot play non-ZDoom demos.\n(They would go out of sync badly.)\n";
|
||||
|
||||
C_RestoreCVars();
|
||||
M_Free(demobuffer);
|
||||
demo_p = demobuffer = NULL;
|
||||
if (singledemo)
|
||||
{
|
||||
I_Error (eek);
|
||||
|
@ -2505,11 +2508,13 @@ void G_DoPlayDemo (void)
|
|||
}
|
||||
else if (G_ProcessIFFDemo (mapname))
|
||||
{
|
||||
C_RestoreCVars();
|
||||
gameaction = ga_nothing;
|
||||
demoplayback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// don't spend a lot of time in loadlevel
|
||||
precache = false;
|
||||
demonew = true;
|
||||
|
|
|
@ -1744,15 +1744,12 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
{
|
||||
StatusBar = new DBaseStatusBar (0);
|
||||
}
|
||||
else if (SBarInfoScript != NULL)
|
||||
else if (SBarInfoScript[SCRIPT_CUSTOM] != NULL)
|
||||
{
|
||||
int cstype = SBarInfoScript->GetGameType();
|
||||
int cstype = SBarInfoScript[SCRIPT_CUSTOM]->GetGameType();
|
||||
|
||||
if(cstype & GAME_DoomChex) //Did the user specify a "base"
|
||||
{
|
||||
StatusBar = CreateDoomStatusBar ();
|
||||
}
|
||||
else if(cstype == GAME_Heretic)
|
||||
//Did the user specify a "base"
|
||||
if(cstype == GAME_Heretic)
|
||||
{
|
||||
StatusBar = CreateHereticStatusBar();
|
||||
}
|
||||
|
@ -1764,16 +1761,20 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
{
|
||||
StatusBar = CreateStrifeStatusBar();
|
||||
}
|
||||
else //Use the default, empty or custom.
|
||||
else if(cstype == GAME_Any) //Use the default, empty or custom.
|
||||
{
|
||||
StatusBar = CreateCustomStatusBar();
|
||||
StatusBar = CreateCustomStatusBar(SCRIPT_CUSTOM);
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusBar = CreateCustomStatusBar(GETSBARINFOSCRIPT(gameinfo.gametype));
|
||||
}
|
||||
}
|
||||
if (StatusBar == NULL)
|
||||
{
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
StatusBar = CreateDoomStatusBar ();
|
||||
StatusBar = CreateCustomStatusBar (GETSBARINFOSCRIPT(gameinfo.gametype));
|
||||
}
|
||||
else if (gameinfo.gametype == GAME_Heretic)
|
||||
{
|
||||
|
@ -1797,7 +1798,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
StatusBar->NewGame ();
|
||||
setsizeneeded = true;
|
||||
|
||||
if (gameinfo.gametype == GAME_Strife || (SBarInfoScript != NULL && SBarInfoScript->GetGameType() == GAME_Strife))
|
||||
if (gameinfo.gametype == GAME_Strife || (SBarInfoScript != NULL && SBarInfoScript[SCRIPT_CUSTOM]->GetGameType() == GAME_Strife))
|
||||
{
|
||||
// Set the initial quest log text for Strife.
|
||||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
|
|
|
@ -22,7 +22,7 @@ IMPLEMENT_CLASS (AHexenArmor)
|
|||
void ABasicArmor::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << SavePercent << BonusCount;
|
||||
arc << SavePercent << BonusCount << MaxAbsorb << MaxFullAbsorb << AbsorbCount;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -37,6 +37,7 @@ void ABasicArmor::Serialize (FArchive &arc)
|
|||
void ABasicArmor::Tick ()
|
||||
{
|
||||
Super::Tick ();
|
||||
AbsorbCount = 0;
|
||||
if (!Icon.isValid())
|
||||
{
|
||||
switch (gameinfo.gametype)
|
||||
|
@ -108,15 +109,31 @@ bool ABasicArmor::HandlePickup (AInventory *item)
|
|||
|
||||
void ABasicArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
||||
{
|
||||
int saved;
|
||||
|
||||
if (damageType != NAME_Drowning)
|
||||
{
|
||||
int saved = FixedMul (damage, SavePercent);
|
||||
int full = MAX(0, MaxFullAbsorb - AbsorbCount);
|
||||
if (damage < full)
|
||||
{
|
||||
saved = damage;
|
||||
}
|
||||
else
|
||||
{
|
||||
saved = full + FixedMul (damage - full, SavePercent);
|
||||
if (MaxAbsorb > 0 && saved + AbsorbCount > MaxAbsorb)
|
||||
{
|
||||
saved = MAX(0, MaxAbsorb - AbsorbCount);
|
||||
}
|
||||
}
|
||||
|
||||
if (Amount < saved)
|
||||
{
|
||||
saved = Amount;
|
||||
}
|
||||
newdamage -= saved;
|
||||
Amount -= saved;
|
||||
AbsorbCount += saved;
|
||||
if (Amount == 0)
|
||||
{
|
||||
// The armor has become useless
|
||||
|
@ -159,7 +176,7 @@ void ABasicArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
|||
void ABasicArmorPickup::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << SavePercent << SaveAmount;
|
||||
arc << SavePercent << SaveAmount << MaxAbsorb << MaxFullAbsorb;
|
||||
arc << DropTime;
|
||||
}
|
||||
|
||||
|
@ -174,6 +191,8 @@ AInventory *ABasicArmorPickup::CreateCopy (AActor *other)
|
|||
ABasicArmorPickup *copy = static_cast<ABasicArmorPickup *> (Super::CreateCopy (other));
|
||||
copy->SavePercent = SavePercent;
|
||||
copy->SaveAmount = SaveAmount;
|
||||
copy->MaxAbsorb = MaxAbsorb;
|
||||
copy->MaxFullAbsorb = MaxFullAbsorb;
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
@ -216,6 +235,8 @@ bool ABasicArmorPickup::Use (bool pickup)
|
|||
armor->Amount = SaveAmount + armor->BonusCount;
|
||||
armor->MaxAmount = SaveAmount;
|
||||
armor->Icon = Icon;
|
||||
armor->MaxAbsorb = MaxAbsorb;
|
||||
armor->MaxFullAbsorb = MaxFullAbsorb;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -228,7 +249,8 @@ bool ABasicArmorPickup::Use (bool pickup)
|
|||
void ABasicArmorBonus::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << SavePercent << SaveAmount << MaxSaveAmount << BonusCount << BonusMax;
|
||||
arc << SavePercent << SaveAmount << MaxSaveAmount << BonusCount << BonusMax
|
||||
<< MaxAbsorb << MaxFullAbsorb;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -245,6 +267,8 @@ AInventory *ABasicArmorBonus::CreateCopy (AActor *other)
|
|||
copy->MaxSaveAmount = MaxSaveAmount;
|
||||
copy->BonusCount = BonusCount;
|
||||
copy->BonusMax = BonusMax;
|
||||
copy->MaxAbsorb = MaxAbsorb;
|
||||
copy->MaxFullAbsorb = MaxFullAbsorb;
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
@ -295,6 +319,8 @@ bool ABasicArmorBonus::Use (bool pickup)
|
|||
armor->Amount = 0;
|
||||
armor->Icon = Icon;
|
||||
armor->SavePercent = SavePercent;
|
||||
armor->MaxAbsorb = MaxAbsorb;
|
||||
armor->MaxFullAbsorb = MaxFullAbsorb;
|
||||
}
|
||||
|
||||
armor->Amount = MIN(armor->Amount + saveAmount, MaxSaveAmount + armor->BonusCount);
|
||||
|
|
|
@ -334,7 +334,10 @@ public:
|
|||
virtual bool HandlePickup (AInventory *item);
|
||||
virtual void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
||||
|
||||
int AbsorbCount;
|
||||
fixed_t SavePercent;
|
||||
int MaxAbsorb;
|
||||
int MaxFullAbsorb;
|
||||
int BonusCount;
|
||||
};
|
||||
|
||||
|
@ -348,6 +351,8 @@ public:
|
|||
virtual bool Use (bool pickup);
|
||||
|
||||
fixed_t SavePercent;
|
||||
int MaxAbsorb;
|
||||
int MaxFullAbsorb;
|
||||
int SaveAmount;
|
||||
};
|
||||
|
||||
|
@ -362,6 +367,8 @@ public:
|
|||
|
||||
fixed_t SavePercent; // The default, for when you don't already have armor
|
||||
int MaxSaveAmount;
|
||||
int MaxAbsorb;
|
||||
int MaxFullAbsorb;
|
||||
int SaveAmount;
|
||||
int BonusCount;
|
||||
int BonusMax;
|
||||
|
|
|
@ -360,8 +360,7 @@ extern DBaseStatusBar *StatusBar;
|
|||
|
||||
// Status bar factories -----------------------------------------------------
|
||||
|
||||
DBaseStatusBar *CreateDoomStatusBar();
|
||||
DBaseStatusBar *CreateHereticStatusBar();
|
||||
DBaseStatusBar *CreateHexenStatusBar();
|
||||
DBaseStatusBar *CreateStrifeStatusBar();
|
||||
DBaseStatusBar *CreateCustomStatusBar();
|
||||
DBaseStatusBar *CreateCustomStatusBar(int script=0);
|
||||
|
|
|
@ -147,7 +147,17 @@ struct SBarInfo
|
|||
static void Load();
|
||||
};
|
||||
|
||||
extern SBarInfo *SBarInfoScript;
|
||||
#define NUM_SCRIPTS 5
|
||||
#define SCRIPT_CUSTOM 0
|
||||
#define SCRIPT_DOOM 1
|
||||
// The next ones shouldn't be used... yet
|
||||
#define SCRIPT_HERETIC 2
|
||||
#define SCRIPT_HEXEN 3
|
||||
#define SCRIPT_STRIFE 4
|
||||
// Converts GAME_x to it's script number
|
||||
#define GETSBARINFOSCRIPT(game) \
|
||||
(game & GAME_DoomChex) ? SCRIPT_DOOM : (game == GAME_Heretic ? SCRIPT_HERETIC : (game == GAME_Hexen ? SCRIPT_HEXEN : (game == GAME_Strife ? SCRIPT_STRIFE : SCRIPT_CUSTOM)))
|
||||
extern SBarInfo *SBarInfoScript[5];
|
||||
|
||||
|
||||
// Enums used between the parser and the display
|
||||
|
@ -344,7 +354,7 @@ class DSBarInfo : public DBaseStatusBar
|
|||
{
|
||||
DECLARE_CLASS(DSBarInfo, DBaseStatusBar)
|
||||
public:
|
||||
DSBarInfo();
|
||||
DSBarInfo(SBarInfo *script=NULL);
|
||||
~DSBarInfo();
|
||||
void Draw(EHudState state);
|
||||
void NewGame();
|
||||
|
@ -367,6 +377,7 @@ private:
|
|||
bool wiggle, bool translate);
|
||||
FRemapTable* getTranslation();
|
||||
|
||||
SBarInfo *script;
|
||||
FImageCollection Images;
|
||||
FPlayerSkin *oldSkin;
|
||||
FFont *drawingFont;
|
||||
|
|
|
@ -155,12 +155,14 @@ void FBarShader::Unload()
|
|||
}
|
||||
|
||||
//SBarInfo Display
|
||||
DSBarInfo::DSBarInfo () : DBaseStatusBar (SBarInfoScript->height),
|
||||
DSBarInfo::DSBarInfo (SBarInfo *script) : DBaseStatusBar(script->height),
|
||||
shader_horz_normal(false, false),
|
||||
shader_horz_reverse(false, true),
|
||||
shader_vert_normal(true, false),
|
||||
shader_vert_reverse(true, true)
|
||||
{
|
||||
this->script = script;
|
||||
|
||||
static const char *InventoryBarLumps[] =
|
||||
{
|
||||
"ARTIBOX", "SELECTBO", "INVCURS", "INVGEML1",
|
||||
|
@ -168,21 +170,21 @@ DSBarInfo::DSBarInfo () : DBaseStatusBar (SBarInfoScript->height),
|
|||
"USEARTIA", "USEARTIB", "USEARTIC", "USEARTID",
|
||||
};
|
||||
TArray<const char *> patchnames;
|
||||
patchnames.Resize(SBarInfoScript->Images.Size()+10);
|
||||
patchnames.Resize(script->Images.Size()+10);
|
||||
unsigned int i = 0;
|
||||
for(i = 0;i < SBarInfoScript->Images.Size();i++)
|
||||
for(i = 0;i < script->Images.Size();i++)
|
||||
{
|
||||
patchnames[i] = SBarInfoScript->Images[i];
|
||||
patchnames[i] = script->Images[i];
|
||||
}
|
||||
for(i = 0;i < 10;i++)
|
||||
{
|
||||
patchnames[i+SBarInfoScript->Images.Size()] = InventoryBarLumps[i];
|
||||
patchnames[i+script->Images.Size()] = InventoryBarLumps[i];
|
||||
}
|
||||
for (i = 0;i < numskins;i++)
|
||||
{
|
||||
AddFaceToImageCollection (&skins[i], &Images);
|
||||
}
|
||||
invBarOffset = SBarInfoScript->Images.Size();
|
||||
invBarOffset = script->Images.Size();
|
||||
Images.Init(&patchnames[0], patchnames.Size());
|
||||
drawingFont = V_GetFont("ConFont");
|
||||
oldHealth = 0;
|
||||
|
@ -204,14 +206,14 @@ void DSBarInfo::Draw (EHudState state)
|
|||
int hud = STBAR_NORMAL;
|
||||
if(state == HUD_StatusBar)
|
||||
{
|
||||
if(SBarInfoScript->completeBorder) //Fill the statusbar with the border before we draw.
|
||||
if(script->completeBorder) //Fill the statusbar with the border before we draw.
|
||||
{
|
||||
FTexture *b = TexMan[gameinfo.border->b];
|
||||
R_DrawBorder(viewwindowx, viewwindowy + viewheight + b->GetHeight(), viewwindowx + viewwidth, SCREENHEIGHT);
|
||||
if(screenblocks == 10)
|
||||
screen->FlatFill(viewwindowx, viewwindowy + viewheight, viewwindowx + viewwidth, viewwindowy + viewheight + b->GetHeight(), b, true);
|
||||
}
|
||||
if(SBarInfoScript->automapbar && automapactive)
|
||||
if(script->automapbar && automapactive)
|
||||
{
|
||||
hud = STBAR_AUTOMAP;
|
||||
}
|
||||
|
@ -228,28 +230,28 @@ void DSBarInfo::Draw (EHudState state)
|
|||
{
|
||||
hud = STBAR_NONE;
|
||||
}
|
||||
if(SBarInfoScript->huds[hud].forceScaled) //scale the statusbar
|
||||
if(script->huds[hud].forceScaled) //scale the statusbar
|
||||
{
|
||||
SetScaled(true, true);
|
||||
setsizeneeded = true;
|
||||
}
|
||||
doCommands(SBarInfoScript->huds[hud], 0, 0, SBarInfoScript->huds[hud].alpha);
|
||||
doCommands(script->huds[hud], 0, 0, script->huds[hud].alpha);
|
||||
if(CPlayer->inventorytics > 0 && !(level.flags & LEVEL_NOINVENTORYBAR))
|
||||
{
|
||||
if(state == HUD_StatusBar)
|
||||
{
|
||||
// No overlay? Lets cancel it.
|
||||
if(SBarInfoScript->huds[STBAR_INVENTORY].commands.Size() == 0)
|
||||
if(script->huds[STBAR_INVENTORY].commands.Size() == 0)
|
||||
CPlayer->inventorytics = 0;
|
||||
else
|
||||
doCommands(SBarInfoScript->huds[STBAR_INVENTORY], 0, 0, SBarInfoScript->huds[STBAR_INVENTORY].alpha);
|
||||
doCommands(script->huds[STBAR_INVENTORY], 0, 0, script->huds[STBAR_INVENTORY].alpha);
|
||||
}
|
||||
else if(state == HUD_Fullscreen)
|
||||
{
|
||||
if(SBarInfoScript->huds[STBAR_INVENTORYFULLSCREEN].commands.Size() == 0)
|
||||
if(script->huds[STBAR_INVENTORYFULLSCREEN].commands.Size() == 0)
|
||||
CPlayer->inventorytics = 0;
|
||||
else
|
||||
doCommands(SBarInfoScript->huds[STBAR_INVENTORYFULLSCREEN], 0, 0, SBarInfoScript->huds[STBAR_INVENTORYFULLSCREEN].alpha);
|
||||
doCommands(script->huds[STBAR_INVENTORYFULLSCREEN], 0, 0, script->huds[STBAR_INVENTORYFULLSCREEN].alpha);
|
||||
}
|
||||
}
|
||||
if(currentPopup != POP_None)
|
||||
|
@ -261,8 +263,8 @@ void DSBarInfo::Draw (EHudState state)
|
|||
popbar = STBAR_POPUPKEYS;
|
||||
else if(currentPopup == POP_Status)
|
||||
popbar = STBAR_POPUPSTATUS;
|
||||
doCommands(SBarInfoScript->huds[popbar], SBarInfoScript->popups[currentPopup-1].getXOffset(), SBarInfoScript->popups[currentPopup-1].getYOffset(),
|
||||
SBarInfoScript->popups[currentPopup-1].getAlpha(SBarInfoScript->huds[popbar].alpha));
|
||||
doCommands(script->huds[popbar], script->popups[currentPopup-1].getXOffset(), script->popups[currentPopup-1].getYOffset(),
|
||||
script->popups[currentPopup-1].getAlpha(script->huds[popbar].alpha));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,20 +292,20 @@ void DSBarInfo::Tick ()
|
|||
DBaseStatusBar::Tick();
|
||||
if(level.time & 1)
|
||||
chainWiggle = pr_chainwiggle() & 1;
|
||||
if(!SBarInfoScript->interpolateHealth)
|
||||
if(!script->interpolateHealth)
|
||||
{
|
||||
oldHealth = CPlayer->health;
|
||||
}
|
||||
else
|
||||
{
|
||||
int health = SBarInfoScript->lowerHealthCap ? CPlayer->health : CPlayer->mo->health;
|
||||
int health = script->lowerHealthCap ? CPlayer->health : CPlayer->mo->health;
|
||||
if(oldHealth > health)
|
||||
{
|
||||
oldHealth -= clamp((oldHealth - health), 1, SBarInfoScript->interpolationSpeed);
|
||||
oldHealth -= clamp((oldHealth - health), 1, script->interpolationSpeed);
|
||||
}
|
||||
else if(oldHealth < CPlayer->health)
|
||||
{
|
||||
oldHealth += clamp((health - oldHealth), 1, SBarInfoScript->interpolationSpeed);
|
||||
oldHealth += clamp((health - oldHealth), 1, script->interpolationSpeed);
|
||||
}
|
||||
}
|
||||
AInventory *armor = CPlayer->mo->FindInventory<ABasicArmor>();
|
||||
|
@ -313,7 +315,7 @@ void DSBarInfo::Tick ()
|
|||
}
|
||||
else
|
||||
{
|
||||
if(!SBarInfoScript->interpolateArmor)
|
||||
if(!script->interpolateArmor)
|
||||
{
|
||||
oldArmor = armor->Amount;
|
||||
}
|
||||
|
@ -321,11 +323,11 @@ void DSBarInfo::Tick ()
|
|||
{
|
||||
if(oldArmor > armor->Amount)
|
||||
{
|
||||
oldArmor -= clamp((oldArmor - armor->Amount) >> 2, 1, SBarInfoScript->armorInterpolationSpeed);
|
||||
oldArmor -= clamp((oldArmor - armor->Amount) >> 2, 1, script->armorInterpolationSpeed);
|
||||
}
|
||||
else if(oldArmor < armor->Amount)
|
||||
{
|
||||
oldArmor += clamp((armor->Amount - oldArmor) >> 2, 1, SBarInfoScript->armorInterpolationSpeed);
|
||||
oldArmor += clamp((armor->Amount - oldArmor) >> 2, 1, script->armorInterpolationSpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -337,12 +339,12 @@ void DSBarInfo::Tick ()
|
|||
MugShot.Tick(CPlayer);
|
||||
if(currentPopup != POP_None)
|
||||
{
|
||||
SBarInfoScript->popups[currentPopup-1].tick();
|
||||
if(SBarInfoScript->popups[currentPopup-1].opened == false && SBarInfoScript->popups[currentPopup-1].isDoneMoving())
|
||||
script->popups[currentPopup-1].tick();
|
||||
if(script->popups[currentPopup-1].opened == false && script->popups[currentPopup-1].isDoneMoving())
|
||||
{
|
||||
currentPopup = pendingPopup;
|
||||
if(currentPopup != POP_None)
|
||||
SBarInfoScript->popups[currentPopup-1].open();
|
||||
script->popups[currentPopup-1].open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -367,13 +369,13 @@ void DSBarInfo::ShowPop(int popnum)
|
|||
else
|
||||
pendingPopup = POP_None;
|
||||
if(currentPopup != POP_None)
|
||||
SBarInfoScript->popups[currentPopup-1].close();
|
||||
script->popups[currentPopup-1].close();
|
||||
else
|
||||
{
|
||||
currentPopup = pendingPopup;
|
||||
pendingPopup = POP_None;
|
||||
if(currentPopup != POP_None)
|
||||
SBarInfoScript->popups[currentPopup-1].open();
|
||||
script->popups[currentPopup-1].open();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -386,11 +388,11 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
|
|||
ABasicArmor *armor = CPlayer->mo->FindInventory<ABasicArmor>();
|
||||
int health = CPlayer->mo->health;
|
||||
int armorAmount = armor != NULL ? armor->Amount : 0;
|
||||
if(SBarInfoScript->interpolateHealth)
|
||||
if(script->interpolateHealth)
|
||||
{
|
||||
health = oldHealth;
|
||||
}
|
||||
if(SBarInfoScript->interpolateArmor)
|
||||
if(script->interpolateArmor)
|
||||
{
|
||||
armorAmount = oldArmor;
|
||||
}
|
||||
|
@ -567,7 +569,7 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
|
|||
if(cmd.flags & DRAWNUMBER_HEALTH)
|
||||
{
|
||||
value = health;
|
||||
if(SBarInfoScript->lowerHealthCap && value < 0) //health shouldn't display negatives
|
||||
if(script->lowerHealthCap && value < 0) //health shouldn't display negatives
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
|
@ -1440,17 +1442,17 @@ void DSBarInfo::DrawString(const char* str, int x, int y, int xOffset, int yOffs
|
|||
continue;
|
||||
}
|
||||
int width;
|
||||
if(SBarInfoScript->spacingCharacter == '\0') //No monospace?
|
||||
if(script->spacingCharacter == '\0') //No monospace?
|
||||
width = drawingFont->GetCharWidth((int) *str);
|
||||
else
|
||||
width = drawingFont->GetCharWidth((int) SBarInfoScript->spacingCharacter);
|
||||
width = drawingFont->GetCharWidth((int) script->spacingCharacter);
|
||||
FTexture* character = drawingFont->GetChar((int) *str, &width);
|
||||
if(character == NULL) //missing character.
|
||||
{
|
||||
str++;
|
||||
continue;
|
||||
}
|
||||
if(SBarInfoScript->spacingCharacter == '\0') //If we are monospaced lets use the offset
|
||||
if(script->spacingCharacter == '\0') //If we are monospaced lets use the offset
|
||||
x += (character->LeftOffset+1); //ignore x offsets since we adapt to character size
|
||||
|
||||
int rx, ry, rw, rh;
|
||||
|
@ -1512,10 +1514,10 @@ void DSBarInfo::DrawString(const char* str, int x, int y, int xOffset, int yOffs
|
|||
DTA_HUDRules, HUD_Normal,
|
||||
TAG_DONE);
|
||||
}
|
||||
if(SBarInfoScript->spacingCharacter == '\0')
|
||||
if(script->spacingCharacter == '\0')
|
||||
x += width + spacing - (character->LeftOffset+1);
|
||||
else //width gets changed at the call to GetChar()
|
||||
x += drawingFont->GetCharWidth((int) SBarInfoScript->spacingCharacter) + spacing;
|
||||
x += drawingFont->GetCharWidth((int) script->spacingCharacter) + spacing;
|
||||
str++;
|
||||
}
|
||||
}
|
||||
|
@ -1542,10 +1544,10 @@ void DSBarInfo::DrawNumber(int num, int len, int x, int y, int xOffset, int yOff
|
|||
value.Insert(0, "0");
|
||||
}
|
||||
}
|
||||
if(SBarInfoScript->spacingCharacter == '\0')
|
||||
if(script->spacingCharacter == '\0')
|
||||
x -= int(drawingFont->StringWidth(value)+(spacing * value.Len()));
|
||||
else //monospaced, so just multiplay the character size
|
||||
x -= int((drawingFont->GetCharWidth((int) SBarInfoScript->spacingCharacter) + spacing) * value.Len());
|
||||
x -= int((drawingFont->GetCharWidth((int) script->spacingCharacter) + spacing) * value.Len());
|
||||
DrawString(value, x, y, xOffset, yOffset, alpha, fullScreenOffsets, translation, spacing, drawshadow);
|
||||
}
|
||||
|
||||
|
@ -1651,7 +1653,14 @@ FRemapTable* DSBarInfo::getTranslation()
|
|||
|
||||
IMPLEMENT_CLASS(DSBarInfo);
|
||||
|
||||
DBaseStatusBar *CreateCustomStatusBar ()
|
||||
DBaseStatusBar *CreateCustomStatusBar (int script)
|
||||
{
|
||||
return new DSBarInfo;
|
||||
if(SBarInfoScript[script] == NULL)
|
||||
I_FatalError("Tried to create a status bar with no script!");
|
||||
return new DSBarInfo(SBarInfoScript[script]);
|
||||
}
|
||||
|
||||
DBaseStatusBar *CreateDoomStatusBar ()
|
||||
{
|
||||
return new DSBarInfo(SBarInfoScript[1]);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,15 @@
|
|||
#include "i_system.h"
|
||||
#include "g_level.h"
|
||||
|
||||
SBarInfo *SBarInfoScript;
|
||||
SBarInfo *SBarInfoScript[NUM_SCRIPTS] = {NULL,NULL,NULL,NULL,NULL};
|
||||
static const char *DefaultScriptNames[NUM_SCRIPTS] =
|
||||
{
|
||||
"SBARINFO", //Custom
|
||||
"sbarinfo/doom.txt",
|
||||
NULL, //Heretic
|
||||
NULL, //Hexen
|
||||
NULL //Strife
|
||||
};
|
||||
|
||||
static const char *SBarInfoTopLevel[] =
|
||||
{
|
||||
|
@ -105,29 +113,48 @@ static const char *SBarInfoRoutineLevel[] =
|
|||
|
||||
static void FreeSBarInfoScript()
|
||||
{
|
||||
if (SBarInfoScript != NULL)
|
||||
for(int i = 0;i < NUM_SCRIPTS;i++)
|
||||
{
|
||||
delete SBarInfoScript;
|
||||
SBarInfoScript = NULL;
|
||||
if (SBarInfoScript[i] != NULL)
|
||||
{
|
||||
delete SBarInfoScript[i];
|
||||
SBarInfoScript[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SBarInfo::Load()
|
||||
{
|
||||
if(Wads.CheckNumForName("SBARINFO") != -1)
|
||||
Printf ("ParseSBarInfo: Loading default status bar definitions.\n");
|
||||
for(int i = 1;i < NUM_SCRIPTS;i++) // Read in default bars if they exist
|
||||
{
|
||||
if(DefaultScriptNames[i] != NULL)
|
||||
{
|
||||
int lump = Wads.CheckNumForFullName(DefaultScriptNames[i], true);
|
||||
if(lump != -1)
|
||||
{
|
||||
if(SBarInfoScript[i] == NULL)
|
||||
SBarInfoScript[i] = new SBarInfo(lump);
|
||||
else
|
||||
SBarInfoScript[i]->ParseSBarInfo(lump);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(Wads.CheckNumForName(DefaultScriptNames[SCRIPT_CUSTOM]) != -1)
|
||||
{
|
||||
Printf ("ParseSBarInfo: Loading custom status bar definition.\n");
|
||||
int lastlump, lump;
|
||||
lastlump = 0;
|
||||
while((lump = Wads.FindLump("SBARINFO", &lastlump)) != -1)
|
||||
while((lump = Wads.FindLump(DefaultScriptNames[SCRIPT_CUSTOM], &lastlump)) != -1)
|
||||
{
|
||||
if(SBarInfoScript == NULL)
|
||||
SBarInfoScript = new SBarInfo(lump);
|
||||
if(SBarInfoScript[SCRIPT_CUSTOM] == NULL)
|
||||
SBarInfoScript[SCRIPT_CUSTOM] = new SBarInfo(lump);
|
||||
else //We now have to load multiple SBarInfo Lumps so the 2nd time we need to use this method instead.
|
||||
SBarInfoScript->ParseSBarInfo(lump);
|
||||
SBarInfoScript[SCRIPT_CUSTOM]->ParseSBarInfo(lump);
|
||||
}
|
||||
atterm(FreeSBarInfoScript);
|
||||
}
|
||||
atterm(FreeSBarInfoScript);
|
||||
}
|
||||
|
||||
//SBarInfo Script Reader
|
||||
|
@ -155,7 +182,12 @@ void SBarInfo::ParseSBarInfo(int lump)
|
|||
if(!sc.CheckToken(TK_None))
|
||||
sc.MustGetToken(TK_Identifier);
|
||||
if(sc.Compare("Doom"))
|
||||
gameType = GAME_Doom;
|
||||
{
|
||||
int lump = Wads.CheckNumForFullName("sbarinfo/doom.txt", true);
|
||||
if(lump == -1)
|
||||
sc.ScriptError("Standard Doom Status Bar not found.");
|
||||
ParseSBarInfo(lump);
|
||||
}
|
||||
else if(sc.Compare("Heretic"))
|
||||
gameType = GAME_Heretic;
|
||||
else if(sc.Compare("Hexen"))
|
||||
|
|
|
@ -72,6 +72,11 @@ CUSTOM_CVAR(Int, r_mirror_recursions,4,CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|||
if (self<0) self=0;
|
||||
if (self>10) self=10;
|
||||
}
|
||||
bool gl_plane_reflection_i; // This is needed in a header that cannot include the CVAR stuff...
|
||||
CUSTOM_CVAR(Bool, gl_plane_reflection, true, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
||||
{
|
||||
gl_plane_reflection_i = self;
|
||||
}
|
||||
TArray<GLPortal *> GLPortal::portals;
|
||||
int GLPortal::recursion;
|
||||
int GLPortal::MirrorFlag;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
** Routines for drawing the scoreboards.
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 1998-2006 Randy Heit
|
||||
** Copyright 1998-2008 Randy Heit
|
||||
** Copyright 2007-2008 Christopher Westley
|
||||
** All rights reserved.
|
||||
**
|
||||
|
@ -59,7 +59,7 @@
|
|||
|
||||
static void HU_DoDrawScores (player_t *, player_t *[MAXPLAYERS]);
|
||||
static void HU_DrawTimeRemaining (int y);
|
||||
static void HU_DrawPlayer (player_t *, bool, int, int, int, bool);
|
||||
static void HU_DrawPlayer (player_t *, bool, int, int, int, int, int, int, int);
|
||||
|
||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||
|
||||
|
@ -84,15 +84,36 @@ CVAR (Int, sb_teamdeathmatch_headingcolor, CR_RED, CVAR_ARCHIVE)
|
|||
|
||||
static int STACK_ARGS comparepoints (const void *arg1, const void *arg2)
|
||||
{
|
||||
if (deathmatch)
|
||||
return (*(player_t **)arg2)->fragcount - (*(player_t **)arg1)->fragcount;
|
||||
else
|
||||
return (*(player_t **)arg2)->killcount - (*(player_t **)arg1)->killcount;
|
||||
// Compare first be frags/kills, then by name.
|
||||
player_t *p1 = *(player_t **)arg1;
|
||||
player_t *p2 = *(player_t **)arg2;
|
||||
int diff;
|
||||
|
||||
diff = deathmatch ? p2->fragcount - p1->fragcount : p2->killcount - p1->killcount;
|
||||
if (diff == 0)
|
||||
{
|
||||
diff = stricmp (p1->userinfo.netname, p2->userinfo.netname);
|
||||
}
|
||||
return diff;
|
||||
}
|
||||
|
||||
static int STACK_ARGS compareteams (const void *arg1, const void *arg2)
|
||||
{
|
||||
return (*(player_t **)arg1)->userinfo.team - (*(player_t **)arg2)->userinfo.team;
|
||||
// Compare first by teams, then by frags, then by name.
|
||||
player_t *p1 = *(player_t **)arg1;
|
||||
player_t *p2 = *(player_t **)arg2;
|
||||
int diff;
|
||||
|
||||
diff = p1->userinfo.team - p2->userinfo.team;
|
||||
if (diff == 0)
|
||||
{
|
||||
diff = p2->fragcount - p1->fragcount;
|
||||
if (diff == 0)
|
||||
{
|
||||
diff = stricmp (p1->userinfo.netname, p2->userinfo.netname);
|
||||
}
|
||||
}
|
||||
return diff;
|
||||
}
|
||||
|
||||
// CODE --------------------------------------------------------------------
|
||||
|
@ -159,9 +180,10 @@ static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYER
|
|||
int color;
|
||||
int height = SmallFont->GetHeight() * CleanYfac;
|
||||
unsigned int i;
|
||||
int maxwidth = 0;
|
||||
int maxnamewidth, maxscorewidth;
|
||||
int numTeams = 0;
|
||||
int x, y;
|
||||
int x, y, bottom;
|
||||
int col2, col3, col4;
|
||||
|
||||
if (deathmatch)
|
||||
{
|
||||
|
@ -175,25 +197,42 @@ static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYER
|
|||
color = sb_cooperative_headingcolor;
|
||||
}
|
||||
|
||||
maxnamewidth = SmallFont->StringWidth("Name");
|
||||
maxscorewidth = 0;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i])
|
||||
{
|
||||
int width = SmallFont->StringWidth (players[i].userinfo.netname);
|
||||
if (width > maxwidth)
|
||||
maxwidth = width;
|
||||
if (width > maxnamewidth)
|
||||
{
|
||||
maxnamewidth = width;
|
||||
}
|
||||
if (players[i].mo->ScoreIcon.isValid())
|
||||
{
|
||||
FTexture *pic = TexMan[players[i].mo->ScoreIcon];
|
||||
width = pic->GetWidth() - pic->GetScaledLeftOffset() + 2;
|
||||
if (width > maxscorewidth)
|
||||
{
|
||||
maxscorewidth = width;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (teamplay && deathmatch)
|
||||
gamestate == GS_INTERMISSION ? y = SCREENHEIGHT * 2 / 7 : y = SCREENHEIGHT / 16;
|
||||
else
|
||||
gamestate == GS_INTERMISSION ? y = SCREENHEIGHT / 4 : y = SCREENHEIGHT / 16;
|
||||
bottom = gamestate != GS_INTERMISSION ? ST_Y : SCREENHEIGHT;
|
||||
y = MAX(48*CleanYfac, (bottom - MAXPLAYERS * (height + CleanYfac + 1)) / 2);
|
||||
|
||||
HU_DrawTimeRemaining (ST_Y - height);
|
||||
HU_DrawTimeRemaining (bottom - height);
|
||||
|
||||
if (teamplay && deathmatch)
|
||||
{
|
||||
y -= (BigFont->GetHeight() + 8) * CleanYfac;
|
||||
if (gamestate == GS_INTERMISSION)
|
||||
{
|
||||
y = MAX(BigFont->GetHeight() * 4, y);
|
||||
}
|
||||
|
||||
for (i = 0; i < teams.Size (); i++)
|
||||
{
|
||||
teams[i].players = 0;
|
||||
|
@ -213,44 +252,60 @@ static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYER
|
|||
}
|
||||
}
|
||||
|
||||
int scorexwidth = SCREENWIDTH / 32;
|
||||
for (i = 0; i < teams.Size (); i++)
|
||||
int scorexwidth = SCREENWIDTH / MAX(8, numTeams);
|
||||
int numscores = 0;
|
||||
int scorex;
|
||||
|
||||
for (i = 0; i < teams.Size(); ++i)
|
||||
{
|
||||
if (teams[i].players)
|
||||
{
|
||||
numscores++;
|
||||
}
|
||||
}
|
||||
|
||||
scorex = (SCREENWIDTH - scorexwidth * (numscores - 1)) / 2;
|
||||
|
||||
for (i = 0; i < teams.Size(); ++i)
|
||||
{
|
||||
if (teams[i].players)
|
||||
{
|
||||
char score[80];
|
||||
mysnprintf (score, countof(score), "%d", teams[i].score);
|
||||
|
||||
screen->DrawText (BigFont, teams[i].GetTextColor(), scorexwidth, gamestate == GS_INTERMISSION ? y * 4 / 5 : y / 2, score,
|
||||
screen->DrawText (BigFont, teams[i].GetTextColor(),
|
||||
scorex - BigFont->StringWidth(score)*CleanXfac/2, y, score,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
scorexwidth += SCREENWIDTH / 8;
|
||||
scorex += scorexwidth;
|
||||
}
|
||||
}
|
||||
|
||||
gamestate == GS_INTERMISSION ? y += 0 : y += SCREENWIDTH / 32;
|
||||
y += (BigFont->GetHeight() + 8) * CleanYfac;
|
||||
}
|
||||
|
||||
screen->DrawText (SmallFont, color, SCREENWIDTH / 32, y, "Color",
|
||||
col2 = (SmallFont->StringWidth("Color") + 8) * CleanXfac;
|
||||
col3 = col2 + (SmallFont->StringWidth("Frags") + 8) * CleanXfac;
|
||||
col4 = col3 + maxscorewidth * CleanXfac;
|
||||
x = (SCREENWIDTH >> 1) - ((maxnamewidth * CleanXfac + col4) >> 1);
|
||||
|
||||
screen->DrawText (SmallFont, color, x, y, "Color",
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
screen->DrawText (SmallFont, color, SCREENWIDTH / 4, y, deathmatch ? "Frags" : "Kills",
|
||||
screen->DrawText (SmallFont, color, x + col2, y, deathmatch ? "Frags" : "Kills",
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
screen->DrawText (SmallFont, color, SCREENWIDTH / 2, y, "Name",
|
||||
screen->DrawText (SmallFont, color, x + col4, y, "Name",
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
x = (SCREENWIDTH >> 1) - (((maxwidth + 32 + 32 + 16) * CleanXfac) >> 1);
|
||||
gamestate == GS_INTERMISSION ? y = SCREENHEIGHT * 2 / 7 : y = SCREENHEIGHT / 10;
|
||||
y += height + 6 * CleanYfac;
|
||||
bottom -= height;
|
||||
|
||||
if (teamplay && deathmatch)
|
||||
y += SCREENWIDTH / 32;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS && y < ST_Y - 12 * CleanYfac; i++)
|
||||
for (i = 0; i < MAXPLAYERS && y <= bottom; i++)
|
||||
{
|
||||
if (playeringame[sortedplayers[i] - players])
|
||||
{
|
||||
HU_DrawPlayer (sortedplayers[i], player==sortedplayers[i], x, y, height, false);
|
||||
HU_DrawPlayer (sortedplayers[i], player==sortedplayers[i], x, col2, col3, col4, maxnamewidth, y, height);
|
||||
y += height + CleanYfac;
|
||||
}
|
||||
}
|
||||
|
@ -295,52 +350,78 @@ static void HU_DrawTimeRemaining (int y)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
static void HU_DrawPlayer (player_t *player, bool highlight, int x, int y, int height, bool pack)
|
||||
static void HU_DrawPlayer (player_t *player, bool highlight, int col1, int col2, int col3, int col4, int maxnamewidth, int y, int height)
|
||||
{
|
||||
float h, s, v, r, g, b;
|
||||
int color;
|
||||
char str[80];
|
||||
|
||||
D_GetPlayerColor (int(player - players), &h, &s, &v);
|
||||
HSVtoRGB (&r, &g, &b, h, s, v);
|
||||
if (highlight)
|
||||
{
|
||||
// The teamplay mode uses colors to show teams, so we need some
|
||||
// other way to do highlighting. And it may as well be used for
|
||||
// all modes for the sake of consistancy.
|
||||
screen->Dim(MAKERGB(200,245,255), 0.125f, col1 - 12*CleanXfac, y - 1, col4 + (maxnamewidth + 24)*CleanXfac, height + 2);
|
||||
}
|
||||
|
||||
screen->Clear (SCREENWIDTH / 24, y, SCREENWIDTH / 24 + 24*CleanXfac, y + height, -1,
|
||||
MAKEARGB(255,clamp(int(r*255.f),0,255),
|
||||
clamp(int(g*255.f),0,255),
|
||||
clamp(int(b*255.f),0,255)));
|
||||
col2 += col1;
|
||||
col3 += col1;
|
||||
col4 += col1;
|
||||
|
||||
if (teamplay && deathmatch)
|
||||
{
|
||||
if (TEAMINFO_IsValidTeam (player->userinfo.team))
|
||||
color = teams[player->userinfo.team].GetTextColor ();
|
||||
color = teams[player->userinfo.team].GetTextColor();
|
||||
else
|
||||
color = CR_GREY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!highlight)
|
||||
deathmatch ? color = sb_deathmatch_otherplayercolor : color = sb_cooperative_otherplayercolor;
|
||||
{
|
||||
if (demoplayback && player == &players[consoleplayer])
|
||||
{
|
||||
color = CR_GOLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
color = deathmatch ? sb_deathmatch_otherplayercolor : sb_cooperative_otherplayercolor;
|
||||
}
|
||||
}
|
||||
else
|
||||
deathmatch ? color = sb_deathmatch_yourplayercolor : color = sb_cooperative_yourplayercolor;
|
||||
{
|
||||
color = deathmatch ? sb_deathmatch_yourplayercolor : sb_cooperative_yourplayercolor;
|
||||
}
|
||||
}
|
||||
|
||||
D_GetPlayerColor (int(player - players), &h, &s, &v);
|
||||
HSVtoRGB (&r, &g, &b, h, s, v);
|
||||
|
||||
screen->Clear (col1, y, col1 + 24*CleanXfac, y + height, -1,
|
||||
MAKEARGB(255,clamp(int(r*255.f),0,255),
|
||||
clamp(int(g*255.f),0,255),
|
||||
clamp(int(b*255.f),0,255)));
|
||||
|
||||
mysnprintf (str, countof(str), "%d", deathmatch ? player->fragcount : player->killcount);
|
||||
|
||||
screen->DrawText (SmallFont, color, SCREENWIDTH / 4, y, player->playerstate == PST_DEAD && !deathmatch ? "DEAD" : str,
|
||||
screen->DrawText (SmallFont, color, col2, y, player->playerstate == PST_DEAD && !deathmatch ? "DEAD" : str,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
screen->DrawText (SmallFont, color, SCREENWIDTH / 2, y, player->userinfo.netname,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
if (teamplay && teams[player->userinfo.team].logo.GetChars ())
|
||||
{
|
||||
screen->DrawTexture (TexMan[teams[player->userinfo.team].logo.GetChars ()], SCREENWIDTH / 5, y,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
|
||||
if (player->mo->ScoreIcon.isValid())
|
||||
{
|
||||
screen->DrawTexture (TexMan[player->mo->ScoreIcon], SCREENWIDTH * 4 / 9, y,
|
||||
FTexture *pic = TexMan[player->mo->ScoreIcon];
|
||||
screen->DrawTexture (pic, col3, y,
|
||||
DTA_CleanNoMove, true,
|
||||
TAG_DONE);
|
||||
}
|
||||
|
||||
screen->DrawText (SmallFont, color, col4, y, player->userinfo.netname,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
if (teamplay && teams[player->userinfo.team].logo.IsNotEmpty())
|
||||
{
|
||||
FTexture *pic = TexMan[teams[player->userinfo.team].logo];
|
||||
screen->DrawTexture (pic, col1 - (pic->GetWidth() + 2) * CleanXfac, y,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -797,6 +797,7 @@ bool EV_SlidingDoor (line_t *line, AActor *actor, int tag, int speed, int delay)
|
|||
{
|
||||
rtn = true;
|
||||
new DAnimatedDoor (sec, line, speed, delay);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1105,18 +1105,6 @@ FUNC(LS_Thing_Deactivate)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void RemoveThing(AActor * actor)
|
||||
{
|
||||
// Don't remove live players.
|
||||
if (actor->player == NULL || actor != actor->player->mo)
|
||||
{
|
||||
// be friendly to the level statistics. ;)
|
||||
if (actor->CountsAsKill() && actor->health > 0) level.total_monsters--;
|
||||
if (actor->flags&MF_COUNTITEM) level.total_items--;
|
||||
actor->Destroy ();
|
||||
}
|
||||
}
|
||||
|
||||
FUNC(LS_Thing_Remove)
|
||||
// Thing_Remove (tid)
|
||||
{
|
||||
|
@ -1130,13 +1118,13 @@ FUNC(LS_Thing_Remove)
|
|||
{
|
||||
AActor *temp = iterator.Next ();
|
||||
|
||||
RemoveThing(actor);
|
||||
P_RemoveThing(actor);
|
||||
actor = temp;
|
||||
}
|
||||
}
|
||||
else if (it != NULL)
|
||||
{
|
||||
RemoveThing(it);
|
||||
P_RemoveThing(it);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -139,6 +139,7 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char * type_na
|
|||
bool P_MoveThing(AActor *source, fixed_t x, fixed_t y, fixed_t z, bool fog);
|
||||
bool P_Thing_Move (int tid, AActor *source, int mapspot, bool fog);
|
||||
int P_Thing_Damage (int tid, AActor *whofor0, int amount, FName type);
|
||||
void P_RemoveThing(AActor * actor);
|
||||
|
||||
//
|
||||
// P_ENEMY
|
||||
|
|
|
@ -412,6 +412,19 @@ int P_Thing_Damage (int tid, AActor *whofor0, int amount, FName type)
|
|||
return count;
|
||||
}
|
||||
|
||||
void P_RemoveThing(AActor * actor)
|
||||
{
|
||||
// Don't remove live players.
|
||||
if (actor->player == NULL || actor != actor->player->mo)
|
||||
{
|
||||
// be friendly to the level statistics. ;)
|
||||
if (actor->CountsAsKill() && actor->health > 0) level.total_monsters--;
|
||||
if (actor->flags&MF_COUNTITEM) level.total_items--;
|
||||
actor->Destroy ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CCMD (dumpspawnables)
|
||||
{
|
||||
int i;
|
||||
|
@ -424,3 +437,4 @@ CCMD (dumpspawnables)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -232,6 +232,7 @@ inline FArchive &operator<< (FArchive &arc, secplane_t &plane)
|
|||
|
||||
#include "p_3dfloors.h"
|
||||
struct subsector_t;
|
||||
extern bool gl_plane_reflection_i;
|
||||
|
||||
// Ceiling/floor flags
|
||||
enum
|
||||
|
@ -621,6 +622,9 @@ struct sector_t
|
|||
int subsectorcount; // list of subsectors
|
||||
subsector_t ** subsectors;
|
||||
|
||||
float GetFloorReflect() { return gl_plane_reflection_i? floor_reflect : 0; }
|
||||
float GetCeilingReflect() { return gl_plane_reflection_i? ceiling_reflect : 0; }
|
||||
|
||||
};
|
||||
|
||||
FArchive &operator<< (FArchive &arc, sector_t::splane &p);
|
||||
|
|
|
@ -1474,7 +1474,7 @@ void R_ProjectSprite (AActor *thing, int fakeside)
|
|||
// fixed map
|
||||
vis->colormap = fixedcolormap;
|
||||
}
|
||||
else if (!foggy && (thing->renderflags & RF_FULLBRIGHT))
|
||||
else if (!foggy && ((thing->renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT)))
|
||||
{
|
||||
// full bright
|
||||
if (invertcolormap)
|
||||
|
|
|
@ -101,4 +101,4 @@ struct FISoundChannel
|
|||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// This file was automatically generated by the
|
||||
// updaterevision tool. Do not edit by hand.
|
||||
|
||||
#define ZD_SVN_REVISION_STRING "1301"
|
||||
#define ZD_SVN_REVISION_NUMBER 1301
|
||||
#define ZD_SVN_REVISION_STRING "1306"
|
||||
#define ZD_SVN_REVISION_NUMBER 1306
|
||||
|
|
|
@ -1788,6 +1788,25 @@ DEFINE_ACTION_FUNCTION(AActor, A_KillChildren)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_KillSiblings
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_KillSiblings)
|
||||
{
|
||||
TThinkerIterator<AActor> it;
|
||||
AActor * mo;
|
||||
|
||||
while ( (mo = it.Next()) )
|
||||
{
|
||||
if (mo->master == self->master && mo != self)
|
||||
{
|
||||
P_DamageMobj(mo, self, self, mo->health, NAME_None, DMG_NO_ARMOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_CountdownArg
|
||||
|
@ -2129,6 +2148,39 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DamageChildren)
|
|||
|
||||
// [KS] *** End of my modifications ***
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_DamageSiblings (amount)
|
||||
// Damages the siblings of this master by the specified amount. Negative values heal.
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DamageSiblings)
|
||||
{
|
||||
TThinkerIterator<AActor> it;
|
||||
AActor * mo;
|
||||
|
||||
ACTION_PARAM_START(2);
|
||||
ACTION_PARAM_INT(amount, 0);
|
||||
ACTION_PARAM_NAME(DamageType, 1);
|
||||
|
||||
while ( (mo = it.Next()) )
|
||||
{
|
||||
if (mo->master == self->master && mo != self)
|
||||
{
|
||||
if (amount > 0)
|
||||
{
|
||||
P_DamageMobj(mo, self, self, amount, DamageType, DMG_NO_ARMOR);
|
||||
}
|
||||
else if (amount < 0)
|
||||
{
|
||||
amount = -amount;
|
||||
P_GiveBody(mo, amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Modified code pointer from Skulltag
|
||||
|
@ -2254,3 +2306,36 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeFlag)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_RemoveMaster
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_RemoveMaster)
|
||||
{
|
||||
if (self->master != NULL)
|
||||
{
|
||||
P_RemoveThing(self->master);
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_RemoveChildren
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveChildren)
|
||||
{
|
||||
TThinkerIterator<AActor> it;
|
||||
AActor * mo;
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_BOOL(removeall,0);
|
||||
|
||||
while ( (mo = it.Next()) )
|
||||
{
|
||||
if ( ( mo->master == self ) && ( ( mo->health <= 0 ) || removeall) )
|
||||
{
|
||||
P_RemoveThing(mo);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -205,6 +205,7 @@ static FFlagDef ActorFlags[]=
|
|||
DEFINE_FLAG(MF5, SPECIALFIREDAMAGE, AActor, flags5),
|
||||
DEFINE_FLAG(MF5, SUMMONEDMONSTER, AActor, flags5),
|
||||
DEFINE_FLAG(MF5, NOVERTICALMELEERANGE, AActor, flags5),
|
||||
DEFINE_FLAG(MF5, BRIGHT, AActor, flags5),
|
||||
|
||||
// Effect flags
|
||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||
|
@ -547,4 +548,4 @@ void InitThingdef()
|
|||
variables.ShrinkToFit();
|
||||
qsort(&variables[0], variables.Size(), sizeof(variables[0]), varcmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1039,19 +1039,62 @@ DEFINE_CLASS_PROPERTY(savepercent, F, Armor)
|
|||
{
|
||||
PROP_FIXED_PARM(i, 0);
|
||||
|
||||
i = clamp(i, 0, 100*FRACUNIT)/100;
|
||||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorPickup)))
|
||||
{
|
||||
((ABasicArmorPickup*)defaults)->SavePercent = i;
|
||||
((ABasicArmorPickup*)defaults)->SavePercent=i;
|
||||
}
|
||||
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorBonus)))
|
||||
{
|
||||
((ABasicArmorBonus*)defaults)->SavePercent = i;
|
||||
((ABasicArmorBonus*)defaults)->SavePercent=i;
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("\"Armor.SavePercent\" requires an actor of type \"Armor\"\n");
|
||||
I_Error("\"Armor.SavePercent\" requires an actor of type \"Armor\"");
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(maxabsorb, I, Armor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
|
||||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorPickup)))
|
||||
{
|
||||
((ABasicArmorPickup*)defaults)->MaxAbsorb = i;
|
||||
}
|
||||
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorBonus)))
|
||||
{
|
||||
((ABasicArmorBonus*)defaults)->MaxAbsorb = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("\"Armor.MaxAbsorb\" requires an actor of type \"Armor\"\n");
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(maxfullabsorb, I, Armor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
|
||||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorPickup)))
|
||||
{
|
||||
((ABasicArmorPickup*)defaults)->MaxFullAbsorb = i;
|
||||
}
|
||||
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorBonus)))
|
||||
{
|
||||
((ABasicArmorBonus*)defaults)->MaxFullAbsorb = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("\"Armor.MaxFullAbsorb\" requires an actor of type \"Armor\"\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,4 +93,4 @@ struct FExpressionType
|
|||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
// SAVESIG should match SAVEVER.
|
||||
|
||||
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
||||
#define MINSAVEVER 1271
|
||||
#define MINSAVEVER 1304
|
||||
|
||||
#if ZD_SVN_REVISION_NUMBER < MINSAVEVER
|
||||
// Never write a savegame with a version lower than what we need
|
||||
|
|
|
@ -769,7 +769,7 @@ void WI_drawLF ()
|
|||
else
|
||||
{
|
||||
screen->DrawText(font, CR_WHITE,
|
||||
midx - font->StringWidth("finished")/2, y - 4*CleanYfac, "finished",
|
||||
midx - font->StringWidth("finished")*CleanXfac/2, y - 4*CleanYfac, "finished",
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
|
113
wadsrc/static/sbarinfo/doom.txt
Normal file
113
wadsrc/static/sbarinfo/doom.txt
Normal file
|
@ -0,0 +1,113 @@
|
|||
/*******************************************************************************
|
||||
* DEFAULT DOOM STATUS BAR
|
||||
*******************************************************************************
|
||||
* If you wish to include this file into a custom status bar please use the
|
||||
* following command:
|
||||
*
|
||||
* base Doom;
|
||||
*
|
||||
* Using #include "sbarinfo/doom.txt" will not be supported.
|
||||
******************************************************************************/
|
||||
|
||||
height 32;
|
||||
monospacefonts true, "0";
|
||||
|
||||
statusbar fullscreen, fullscreenoffsets // ZDoom HUD
|
||||
{
|
||||
//health
|
||||
drawimage "MEDIA0", 20, -2, centerbottom;
|
||||
drawnumber 3, HUDFONT_DOOM, untranslated, health, drawshadow, 82, -20;
|
||||
|
||||
//armor
|
||||
drawimage armoricon, 20, -24, centerbottom;
|
||||
drawnumber 3, HUDFONT_DOOM, untranslated, armor, drawshadow, whennotzero, 82, -39;
|
||||
|
||||
//ammo
|
||||
drawimage ammoicon1, -14, -4, centerbottom;
|
||||
drawnumber 3, HUDFONT_DOOM, untranslated, ammo1, drawshadow, -25, -20;
|
||||
|
||||
//secondary ammo and inventory
|
||||
usessecondaryammo
|
||||
{
|
||||
drawimage ammoicon2, -14, -22, centerbottom;
|
||||
drawnumber 3, HUDFONT_DOOM, untranslated, ammo2, drawshadow, -25, -38;
|
||||
inventorybarnotvisible
|
||||
{
|
||||
drawselectedinventory centerbottom, drawshadow, alwaysshowcounter, HUDFONT_DOOM, -14, -39, -26, -56, untranslated;
|
||||
}
|
||||
}
|
||||
//no secondary ammo
|
||||
usessecondaryammo not
|
||||
{
|
||||
inventorybarnotvisible
|
||||
{
|
||||
drawselectedinventory centerbottom, drawshadow, alwaysshowcounter, HUDFONT_DOOM, -14, -21, -26, -38, untranslated;
|
||||
}
|
||||
}
|
||||
|
||||
gamemode deathmatch
|
||||
{
|
||||
drawnumber 2, HUDFONT_DOOM, untranslated, frags, drawshadow, -3, 1;
|
||||
}
|
||||
gamemode singleplayer, cooperative, teamgame
|
||||
{
|
||||
drawkeybar 6, vertical, reverserows, auto, -10, 2, 0, 3, auto;
|
||||
}
|
||||
}
|
||||
|
||||
statusbar normal // Standard Doom Status bar
|
||||
{
|
||||
drawimage "STBAR", 0, 168;
|
||||
drawimage "STTPRCNT", 90, 171;
|
||||
drawimage "STTPRCNT", 221, 171;
|
||||
drawnumber 3, HUDFONT_DOOM, untranslated, ammo1, 44, 171;
|
||||
drawnumber 3, HUDFONT_DOOM, untranslated, health, 90, 171;
|
||||
drawnumber 3, HUDFONT_DOOM, untranslated, armor, 221, 171;
|
||||
|
||||
//keys
|
||||
drawswitchableimage keyslot 2 && 5, "nullimage", "STKEYS0", "STKEYS3", "STKEYS6", 239, 171;
|
||||
drawswitchableimage keyslot 3 && 6, "nullimage", "STKEYS1", "STKEYS4", "STKEYS7", 239, 181;
|
||||
drawswitchableimage keyslot 1 && 4, "nullimage", "STKEYS2", "STKEYS5", "STKEYS8", 239, 191;
|
||||
|
||||
drawnumber 3, INDEXFONT, gold, ammo Clip, 288, 173;
|
||||
drawnumber 3, INDEXFONT, gold, ammo Shell, 288, 179;
|
||||
drawnumber 3, INDEXFONT, gold, ammo RocketAmmo, 288, 185;
|
||||
drawnumber 3, INDEXFONT, gold, ammo Cell, 288, 191;
|
||||
|
||||
drawnumber 3, INDEXFONT, gold, ammocapacity Clip, 314, 173;
|
||||
drawnumber 3, INDEXFONT, gold, ammocapacity Shell, 314, 179;
|
||||
drawnumber 3, INDEXFONT, gold, ammocapacity RocketAmmo, 314, 185;
|
||||
drawnumber 3, INDEXFONT, gold, ammocapacity Cell, 314, 191;
|
||||
gamemode deathmatch, teamgame
|
||||
{
|
||||
drawnumber 2, HUDFONT_DOOM, untranslated, frags, 138, 171;
|
||||
}
|
||||
gamemode cooperative, singleplayer
|
||||
{
|
||||
drawimage "STARMS", 104, 168;
|
||||
drawswitchableimage weaponslot 2, "STGNUM2", "STYSNUM2", 111, 172;
|
||||
drawswitchableimage weaponslot 3, "STGNUM3", "STYSNUM3", 123, 172;
|
||||
drawswitchableimage weaponslot 4, "STGNUM4", "STYSNUM4", 135, 172;
|
||||
drawswitchableimage weaponslot 5, "STGNUM5", "STYSNUM5", 111, 182;
|
||||
drawswitchableimage weaponslot 6, "STGNUM6", "STYSNUM6", 123, 182;
|
||||
drawswitchableimage weaponslot 7, "STGNUM7", "STYSNUM7", 135, 182;
|
||||
}
|
||||
gamemode cooperative, deathmatch, teamgame
|
||||
{
|
||||
drawimage translatable "STFBANY", 144, 169;
|
||||
}
|
||||
drawselectedinventory alternateonempty, INDEXFONT, 143, 168
|
||||
{
|
||||
drawmugshot 5, 143, 168;
|
||||
}
|
||||
}
|
||||
|
||||
statusbar inventory // Standard bar overlay (ZDoom Addition)
|
||||
{
|
||||
drawinventorybar Doom, 7, INDEXFONT, 50, 170;
|
||||
}
|
||||
|
||||
statusbar inventoryfullscreen // ZDoom HUD overlay.
|
||||
{
|
||||
drawinventorybar Doom, translucent, 7, INDEXFONT, 50, 170;
|
||||
}
|
|
@ -450,12 +450,6 @@ brightmap sprite BOSSD5
|
|||
iwad
|
||||
}
|
||||
|
||||
brightmap sprite BOSSD5
|
||||
{
|
||||
map "brightmaps/doom/bossd5.png"
|
||||
iwad
|
||||
}
|
||||
|
||||
brightmap sprite BOSSE1
|
||||
{
|
||||
map "brightmaps/doom/bosse1.png"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue