mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +00:00
- Added Blzut3's SBARINFO submission.
SVN r613 (trunk)
This commit is contained in:
parent
91a48d9aa7
commit
5ffda41c7e
6 changed files with 1721 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
December 20, 2007 (Changes by Graf Zahl)
|
||||
- Added Blzut3's SBARINFO submission.
|
||||
- Added SnowKate709's A_LookEx submission.
|
||||
- Added Karate Chris's TEAMINFO submission.
|
||||
- Added true color processing to FDDSTexture. This is untested so far
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
#include "m_menu.h"
|
||||
#include "statnums.h"
|
||||
#include "vectors.h"
|
||||
#include "sbarinfo.h"
|
||||
|
||||
#include "gi.h"
|
||||
|
||||
|
@ -1527,6 +1528,13 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
S_ResumeSound ();
|
||||
}
|
||||
|
||||
//SBarInfo support.
|
||||
int stbar = gameinfo.gametype;
|
||||
if(Wads.CheckNumForName("SBARINFO") != -1)
|
||||
{
|
||||
stbar = SBarInfoScript.ParseSBarInfo(Wads.GetNumForName("SBARINFO")); //load last SBARINFO lump to avoid clashes
|
||||
}
|
||||
//end most of the SBarInfo stuff
|
||||
if (StatusBar != NULL)
|
||||
{
|
||||
delete StatusBar;
|
||||
|
@ -1535,22 +1543,26 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
{
|
||||
StatusBar = new FBaseStatusBar (0);
|
||||
}
|
||||
else if (gameinfo.gametype == GAME_Doom)
|
||||
else if (stbar == GAME_Doom)
|
||||
{
|
||||
StatusBar = CreateDoomStatusBar ();
|
||||
}
|
||||
else if (gameinfo.gametype == GAME_Heretic)
|
||||
else if (stbar == GAME_Heretic)
|
||||
{
|
||||
StatusBar = CreateHereticStatusBar ();
|
||||
}
|
||||
else if (gameinfo.gametype == GAME_Hexen)
|
||||
else if (stbar == GAME_Hexen)
|
||||
{
|
||||
StatusBar = CreateHexenStatusBar ();
|
||||
}
|
||||
else if (gameinfo.gametype == GAME_Strife)
|
||||
else if (stbar == GAME_Strife)
|
||||
{
|
||||
StatusBar = CreateStrifeStatusBar ();
|
||||
}
|
||||
else if (stbar == GAME_Any)
|
||||
{
|
||||
StatusBar = CreateCustomStatusBar (); //SBARINFO is empty unless scripted.
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusBar = new FBaseStatusBar (0);
|
||||
|
|
|
@ -257,3 +257,4 @@ FBaseStatusBar *CreateDoomStatusBar ();
|
|||
FBaseStatusBar *CreateHereticStatusBar ();
|
||||
FBaseStatusBar *CreateHexenStatusBar ();
|
||||
FBaseStatusBar *CreateStrifeStatusBar ();
|
||||
FBaseStatusBar *CreateCustomStatusBar ();
|
||||
|
|
1644
src/g_shared/sbarinfo.cpp
Normal file
1644
src/g_shared/sbarinfo.cpp
Normal file
File diff suppressed because it is too large
Load diff
51
src/g_shared/sbarinfo.h
Normal file
51
src/g_shared/sbarinfo.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
#ifndef __SBarInfo_SBAR_H__
|
||||
#define __SBarInfo_SBAR_H__
|
||||
|
||||
#include "tarray.h"
|
||||
#include "v_collection.h"
|
||||
|
||||
struct SBarInfoCommand; //we need to be able to use this before it is defined.
|
||||
|
||||
struct SBarInfoBlock
|
||||
{
|
||||
TArray<SBarInfoCommand> commands;
|
||||
};
|
||||
|
||||
struct SBarInfoCommand
|
||||
{
|
||||
int type;
|
||||
int special;
|
||||
int special2;
|
||||
int special3;
|
||||
int special4;
|
||||
int flags;
|
||||
int x;
|
||||
int y;
|
||||
int value;
|
||||
int sprite;
|
||||
char* string[2];
|
||||
FFont *font;
|
||||
EColorRange translation;
|
||||
SBarInfoBlock subBlock; //for type SBarInfo_CMD_GAMEMODE
|
||||
void setString(const char* source, int strnum, int maxlength=-1, bool exact=false);
|
||||
SBarInfoCommand();
|
||||
};
|
||||
|
||||
struct SBarInfo
|
||||
{
|
||||
TArray<const char*> Images;
|
||||
SBarInfoBlock huds[6];
|
||||
bool automapbar;
|
||||
bool interpolateHealth;
|
||||
int interpolationSpeed;
|
||||
int height;
|
||||
int ParseSBarInfo(int lump);
|
||||
void ParseSBarInfoBlock(SBarInfoBlock &block);
|
||||
int newImage(const char* patchname);
|
||||
EColorRange GetTranslation(char* translation);
|
||||
SBarInfo();
|
||||
};
|
||||
|
||||
extern SBarInfo SBarInfoScript;
|
||||
|
||||
#endif //__SBarInfo_SBAR_H__
|
|
@ -6183,6 +6183,14 @@
|
|||
RelativePath=".\src\g_shared\sbar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\sbarinfo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\sbarinfo.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\shared_sbar.cpp"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue