mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
- Added Blzut3's statusbar maintenance patch.
SVN r1380 (trunk)
This commit is contained in:
parent
176608cbf4
commit
40d740506d
6 changed files with 35 additions and 35 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
January 30, 2009 (Changes by Graf Zahl)
|
||||||
|
- Added Blzut3's statusbar maintenance patch.
|
||||||
|
|
||||||
January 29, 2009 (Changes by Graf Zahl)
|
January 29, 2009 (Changes by Graf Zahl)
|
||||||
- fixed sound origin of the Mage Wand's missile.
|
- fixed sound origin of the Mage Wand's missile.
|
||||||
|
|
||||||
|
|
|
@ -1750,14 +1750,14 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StatusBar = CreateCustomStatusBar(GETSBARINFOSCRIPT(gameinfo.gametype));
|
StatusBar = CreateCustomStatusBar(SCRIPT_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StatusBar == NULL)
|
if (StatusBar == NULL)
|
||||||
{
|
{
|
||||||
if (gameinfo.gametype & GAME_DoomChex)
|
if (gameinfo.gametype & GAME_DoomChex)
|
||||||
{
|
{
|
||||||
StatusBar = CreateCustomStatusBar (GETSBARINFOSCRIPT(gameinfo.gametype));
|
StatusBar = CreateCustomStatusBar (SCRIPT_DEFAULT);
|
||||||
}
|
}
|
||||||
else if (gameinfo.gametype == GAME_Heretic)
|
else if (gameinfo.gametype == GAME_Heretic)
|
||||||
{
|
{
|
||||||
|
|
|
@ -147,17 +147,9 @@ struct SBarInfo
|
||||||
static void Load();
|
static void Load();
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_SCRIPTS 5
|
|
||||||
#define SCRIPT_CUSTOM 0
|
#define SCRIPT_CUSTOM 0
|
||||||
#define SCRIPT_DOOM 1
|
#define SCRIPT_DEFAULT 1
|
||||||
// The next ones shouldn't be used... yet
|
extern SBarInfo *SBarInfoScript[2];
|
||||||
#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
|
// Enums used between the parser and the display
|
||||||
|
|
|
@ -47,15 +47,7 @@
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
|
|
||||||
SBarInfo *SBarInfoScript[NUM_SCRIPTS] = {NULL,NULL,NULL,NULL,NULL};
|
SBarInfo *SBarInfoScript[2] = {NULL,NULL};
|
||||||
static const char *DefaultScriptNames[NUM_SCRIPTS] =
|
|
||||||
{
|
|
||||||
"SBARINFO", //Custom
|
|
||||||
"sbarinfo/doom.txt",
|
|
||||||
NULL, //Heretic
|
|
||||||
NULL, //Hexen
|
|
||||||
NULL //Strife
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *SBarInfoTopLevel[] =
|
static const char *SBarInfoTopLevel[] =
|
||||||
{
|
{
|
||||||
|
@ -114,7 +106,7 @@ static const char *SBarInfoRoutineLevel[] =
|
||||||
|
|
||||||
static void FreeSBarInfoScript()
|
static void FreeSBarInfoScript()
|
||||||
{
|
{
|
||||||
for(int i = 0;i < NUM_SCRIPTS;i++)
|
for(int i = 0;i < 2;i++)
|
||||||
{
|
{
|
||||||
if (SBarInfoScript[i] != NULL)
|
if (SBarInfoScript[i] != NULL)
|
||||||
{
|
{
|
||||||
|
@ -126,28 +118,25 @@ static void FreeSBarInfoScript()
|
||||||
|
|
||||||
void SBarInfo::Load()
|
void SBarInfo::Load()
|
||||||
{
|
{
|
||||||
Printf ("ParseSBarInfo: Loading default status bar definitions.\n");
|
if(gameinfo.statusbar != NULL)
|
||||||
for(int i = 1;i < NUM_SCRIPTS;i++) // Read in default bars if they exist
|
|
||||||
{
|
{
|
||||||
if(DefaultScriptNames[i] != NULL)
|
int lump = Wads.CheckNumForFullName(gameinfo.statusbar, true);
|
||||||
|
if(lump != -1)
|
||||||
{
|
{
|
||||||
int lump = Wads.CheckNumForFullName(DefaultScriptNames[i], true);
|
Printf ("ParseSBarInfo: Loading default status bar definition.\n");
|
||||||
if(lump != -1)
|
if(SBarInfoScript[SCRIPT_DEFAULT] == NULL)
|
||||||
{
|
SBarInfoScript[SCRIPT_DEFAULT] = new SBarInfo(lump);
|
||||||
if(SBarInfoScript[i] == NULL)
|
else
|
||||||
SBarInfoScript[i] = new SBarInfo(lump);
|
SBarInfoScript[SCRIPT_DEFAULT]->ParseSBarInfo(lump);
|
||||||
else
|
|
||||||
SBarInfoScript[i]->ParseSBarInfo(lump);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Wads.CheckNumForName(DefaultScriptNames[SCRIPT_CUSTOM]) != -1)
|
if(Wads.CheckNumForName("SBARINFO") != -1)
|
||||||
{
|
{
|
||||||
Printf ("ParseSBarInfo: Loading custom status bar definition.\n");
|
Printf ("ParseSBarInfo: Loading custom status bar definition.\n");
|
||||||
int lastlump, lump;
|
int lastlump, lump;
|
||||||
lastlump = 0;
|
lastlump = 0;
|
||||||
while((lump = Wads.FindLump(DefaultScriptNames[SCRIPT_CUSTOM], &lastlump)) != -1)
|
while((lump = Wads.FindLump("SBARINFO", &lastlump)) != -1)
|
||||||
{
|
{
|
||||||
if(SBarInfoScript[SCRIPT_CUSTOM] == NULL)
|
if(SBarInfoScript[SCRIPT_CUSTOM] == NULL)
|
||||||
SBarInfoScript[SCRIPT_CUSTOM] = new SBarInfo(lump);
|
SBarInfoScript[SCRIPT_CUSTOM] = new SBarInfo(lump);
|
||||||
|
|
15
src/gi.cpp
15
src/gi.cpp
|
@ -101,6 +101,7 @@ gameinfo_t HexenGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"BagOfHolding", // Hexen doesn't have a backpack so use Heretic's.
|
"BagOfHolding", // Hexen doesn't have a backpack so use Heretic's.
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t HexenDKGameInfo =
|
gameinfo_t HexenDKGameInfo =
|
||||||
|
@ -134,6 +135,7 @@ gameinfo_t HexenDKGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"BagOfHolding",
|
"BagOfHolding",
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t HereticGameInfo =
|
gameinfo_t HereticGameInfo =
|
||||||
|
@ -167,6 +169,7 @@ gameinfo_t HereticGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"BagOfHolding",
|
"BagOfHolding",
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t HereticSWGameInfo =
|
gameinfo_t HereticSWGameInfo =
|
||||||
|
@ -200,6 +203,7 @@ gameinfo_t HereticSWGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"BagOfHolding",
|
"BagOfHolding",
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t SharewareGameInfo =
|
gameinfo_t SharewareGameInfo =
|
||||||
|
@ -233,6 +237,7 @@ gameinfo_t SharewareGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"Backpack",
|
"Backpack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t RegisteredGameInfo =
|
gameinfo_t RegisteredGameInfo =
|
||||||
|
@ -266,6 +271,7 @@ gameinfo_t RegisteredGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"Backpack",
|
"Backpack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t ChexGameInfo =
|
gameinfo_t ChexGameInfo =
|
||||||
|
@ -299,6 +305,7 @@ gameinfo_t ChexGameInfo =
|
||||||
MAKERGB(63,125,57),
|
MAKERGB(63,125,57),
|
||||||
MAKERGB(95,175,87),
|
MAKERGB(95,175,87),
|
||||||
"ZorchPack",
|
"ZorchPack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t Chex3GameInfo =
|
gameinfo_t Chex3GameInfo =
|
||||||
|
@ -332,6 +339,7 @@ gameinfo_t Chex3GameInfo =
|
||||||
MAKERGB(63,125,57),
|
MAKERGB(63,125,57),
|
||||||
MAKERGB(95,175,87),
|
MAKERGB(95,175,87),
|
||||||
"ZorchPack",
|
"ZorchPack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t RetailGameInfo =
|
gameinfo_t RetailGameInfo =
|
||||||
|
@ -365,6 +373,7 @@ gameinfo_t RetailGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"Backpack",
|
"Backpack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t CommercialGameInfo =
|
gameinfo_t CommercialGameInfo =
|
||||||
|
@ -398,6 +407,7 @@ gameinfo_t CommercialGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"Backpack",
|
"Backpack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t PlutoniaGameInfo =
|
gameinfo_t PlutoniaGameInfo =
|
||||||
|
@ -431,6 +441,7 @@ gameinfo_t PlutoniaGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"Backpack",
|
"Backpack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t TNTGameInfo =
|
gameinfo_t TNTGameInfo =
|
||||||
|
@ -464,6 +475,7 @@ gameinfo_t TNTGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"Backpack",
|
"Backpack",
|
||||||
|
"sbarinfo/doom.txt",
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t StrifeGameInfo =
|
gameinfo_t StrifeGameInfo =
|
||||||
|
@ -497,6 +509,7 @@ gameinfo_t StrifeGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"AmmoSatchel",
|
"AmmoSatchel",
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t StrifeTeaserGameInfo =
|
gameinfo_t StrifeTeaserGameInfo =
|
||||||
|
@ -530,6 +543,7 @@ gameinfo_t StrifeTeaserGameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"AmmoSatchel",
|
"AmmoSatchel",
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
gameinfo_t StrifeTeaser2GameInfo =
|
gameinfo_t StrifeTeaser2GameInfo =
|
||||||
|
@ -563,4 +577,5 @@ gameinfo_t StrifeTeaser2GameInfo =
|
||||||
MAKERGB(104,0,0),
|
MAKERGB(104,0,0),
|
||||||
MAKERGB(255,0,0),
|
MAKERGB(255,0,0),
|
||||||
"AmmoSatchel",
|
"AmmoSatchel",
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
1
src/gi.h
1
src/gi.h
|
@ -122,6 +122,7 @@ typedef struct
|
||||||
DWORD defaultbloodcolor;
|
DWORD defaultbloodcolor;
|
||||||
DWORD defaultbloodparticlecolor;
|
DWORD defaultbloodparticlecolor;
|
||||||
const char *backpacktype;
|
const char *backpacktype;
|
||||||
|
const char *statusbar;
|
||||||
} gameinfo_t;
|
} gameinfo_t;
|
||||||
|
|
||||||
extern gameinfo_t gameinfo;
|
extern gameinfo_t gameinfo;
|
||||||
|
|
Loading…
Reference in a new issue