- 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. SVN r1304 (trunk)
This commit is contained in:
parent
b692412a9e
commit
153a2a4c2c
26 changed files with 367 additions and 1019 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue