mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- changed storage of lump and texture names in gameinfo to allow long names (with the exception of view border elements.)
This commit is contained in:
parent
e718a72b4d
commit
a05e62f3f7
9 changed files with 29 additions and 31 deletions
|
@ -303,7 +303,7 @@ void C_InitConback()
|
||||||
|
|
||||||
if (!conback.isValid())
|
if (!conback.isValid())
|
||||||
{
|
{
|
||||||
conback = TexMan.GetTexture (gameinfo.titlePage, FTexture::TEX_MiscPatch);
|
conback = TexMan.GetTexture (gameinfo.TitlePage, FTexture::TEX_MiscPatch);
|
||||||
conshade = MAKEARGB(175,0,0,0);
|
conshade = MAKEARGB(175,0,0,0);
|
||||||
conline = true;
|
conline = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1234,7 +1234,7 @@ void D_DoAdvanceDemo (void)
|
||||||
static char demoname[8] = "DEMO1";
|
static char demoname[8] = "DEMO1";
|
||||||
static int democount = 0;
|
static int democount = 0;
|
||||||
static int pagecount;
|
static int pagecount;
|
||||||
const char *pagename = NULL;
|
FString pagename;
|
||||||
|
|
||||||
advancedemo = false;
|
advancedemo = false;
|
||||||
|
|
||||||
|
@ -1299,7 +1299,7 @@ void D_DoAdvanceDemo (void)
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
gamestate = GS_DEMOSCREEN;
|
gamestate = GS_DEMOSCREEN;
|
||||||
pagename = gameinfo.titlePage;
|
pagename = gameinfo.TitlePage;
|
||||||
pagetic = (int)(gameinfo.titleTime * TICRATE);
|
pagetic = (int)(gameinfo.titleTime * TICRATE);
|
||||||
S_ChangeMusic (gameinfo.titleMusic, gameinfo.titleOrder, false);
|
S_ChangeMusic (gameinfo.titleMusic, gameinfo.titleOrder, false);
|
||||||
demosequence = 3;
|
demosequence = 3;
|
||||||
|
|
|
@ -42,9 +42,9 @@ void ABasicArmor::Tick ()
|
||||||
AbsorbCount = 0;
|
AbsorbCount = 0;
|
||||||
if (!Icon.isValid())
|
if (!Icon.isValid())
|
||||||
{
|
{
|
||||||
const char *icon = gameinfo.ArmorIcon1;
|
FString icon = gameinfo.ArmorIcon1;
|
||||||
|
|
||||||
if (SavePercent >= gameinfo.Armor2Percent && gameinfo.ArmorIcon2[0] != 0)
|
if (SavePercent >= gameinfo.Armor2Percent && gameinfo.ArmorIcon2.Len() != 0)
|
||||||
icon = gameinfo.ArmorIcon2;
|
icon = gameinfo.ArmorIcon2;
|
||||||
|
|
||||||
if (icon[0] != 0)
|
if (icon[0] != 0)
|
||||||
|
|
20
src/gi.cpp
20
src/gi.cpp
|
@ -271,16 +271,14 @@ void FMapInfoParser::ParseGameInfo()
|
||||||
else if(nextKey.CompareNoCase("armoricons") == 0)
|
else if(nextKey.CompareNoCase("armoricons") == 0)
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_StringConst);
|
sc.MustGetToken(TK_StringConst);
|
||||||
strncpy(gameinfo.ArmorIcon1, sc.String, 8);
|
gameinfo.ArmorIcon1 = sc.String;
|
||||||
gameinfo.ArmorIcon1[8] = 0;
|
|
||||||
if (sc.CheckToken(','))
|
if (sc.CheckToken(','))
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_FloatConst);
|
sc.MustGetToken(TK_FloatConst);
|
||||||
gameinfo.Armor2Percent = FLOAT2FIXED(sc.Float);
|
gameinfo.Armor2Percent = FLOAT2FIXED(sc.Float);
|
||||||
sc.MustGetToken(',');
|
sc.MustGetToken(',');
|
||||||
sc.MustGetToken(TK_StringConst);
|
sc.MustGetToken(TK_StringConst);
|
||||||
strncpy(gameinfo.ArmorIcon2, sc.String, 8);
|
gameinfo.ArmorIcon2 = sc.String;
|
||||||
gameinfo.ArmorIcon2[8] = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(nextKey.CompareNoCase("maparrow") == 0)
|
else if(nextKey.CompareNoCase("maparrow") == 0)
|
||||||
|
@ -295,7 +293,7 @@ void FMapInfoParser::ParseGameInfo()
|
||||||
else gameinfo.mCheatMapArrow = "";
|
else gameinfo.mCheatMapArrow = "";
|
||||||
}
|
}
|
||||||
// Insert valid keys here.
|
// Insert valid keys here.
|
||||||
GAMEINFOKEY_CSTRING(titlePage, "titlePage", 8)
|
GAMEINFOKEY_STRING(TitlePage, "titlePage")
|
||||||
GAMEINFOKEY_STRINGARRAY(creditPages, "addcreditPage", 8, false)
|
GAMEINFOKEY_STRINGARRAY(creditPages, "addcreditPage", 8, false)
|
||||||
GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true)
|
GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true)
|
||||||
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false)
|
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false)
|
||||||
|
@ -306,17 +304,17 @@ void FMapInfoParser::ParseGameInfo()
|
||||||
GAMEINFOKEY_FLOAT(pageTime, "pageTime")
|
GAMEINFOKEY_FLOAT(pageTime, "pageTime")
|
||||||
GAMEINFOKEY_STRING(chatSound, "chatSound")
|
GAMEINFOKEY_STRING(chatSound, "chatSound")
|
||||||
GAMEINFOKEY_MUSIC(finaleMusic, finaleOrder, "finaleMusic")
|
GAMEINFOKEY_MUSIC(finaleMusic, finaleOrder, "finaleMusic")
|
||||||
GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8)
|
GAMEINFOKEY_STRING(FinaleFlat, "finaleFlat")
|
||||||
GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true)
|
GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true)
|
||||||
GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false)
|
GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false)
|
||||||
GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8, true)
|
GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8, true)
|
||||||
GAMEINFOKEY_CSTRING(PauseSign, "pausesign", 8)
|
GAMEINFOKEY_STRING(PauseSign, "pausesign")
|
||||||
GAMEINFOKEY_STRING(quitSound, "quitSound")
|
GAMEINFOKEY_STRING(quitSound, "quitSound")
|
||||||
GAMEINFOKEY_CSTRING(borderFlat, "borderFlat", 8)
|
GAMEINFOKEY_STRING(BorderFlat, "borderFlat")
|
||||||
GAMEINFOKEY_FIXED(telefogheight, "telefogheight")
|
GAMEINFOKEY_FIXED(telefogheight, "telefogheight")
|
||||||
GAMEINFOKEY_FIXED(gibfactor, "gibfactor")
|
GAMEINFOKEY_FIXED(gibfactor, "gibfactor")
|
||||||
GAMEINFOKEY_INT(defKickback, "defKickback")
|
GAMEINFOKEY_INT(defKickback, "defKickback")
|
||||||
GAMEINFOKEY_CSTRING(SkyFlatName, "SkyFlatName", 8)
|
GAMEINFOKEY_STRING(SkyFlatName, "SkyFlatName")
|
||||||
GAMEINFOKEY_STRING(translator, "translator")
|
GAMEINFOKEY_STRING(translator, "translator")
|
||||||
GAMEINFOKEY_COLOR(pickupcolor, "pickupcolor")
|
GAMEINFOKEY_COLOR(pickupcolor, "pickupcolor")
|
||||||
GAMEINFOKEY_COLOR(defaultbloodcolor, "defaultbloodcolor")
|
GAMEINFOKEY_COLOR(defaultbloodcolor, "defaultbloodcolor")
|
||||||
|
@ -336,7 +334,7 @@ void FMapInfoParser::ParseGameInfo()
|
||||||
GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime")
|
GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime")
|
||||||
GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime")
|
GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime")
|
||||||
GAMEINFOKEY_INT(defaultdropstyle, "defaultdropstyle")
|
GAMEINFOKEY_INT(defaultdropstyle, "defaultdropstyle")
|
||||||
GAMEINFOKEY_CSTRING(Endoom, "endoom", 8)
|
GAMEINFOKEY_STRING(Endoom, "endoom")
|
||||||
GAMEINFOKEY_INT(player5start, "player5start")
|
GAMEINFOKEY_INT(player5start, "player5start")
|
||||||
GAMEINFOKEY_STRINGARRAY(quitmessages, "addquitmessages", 0, false)
|
GAMEINFOKEY_STRINGARRAY(quitmessages, "addquitmessages", 0, false)
|
||||||
GAMEINFOKEY_STRINGARRAY(quitmessages, "quitmessages", 0, true)
|
GAMEINFOKEY_STRINGARRAY(quitmessages, "quitmessages", 0, true)
|
||||||
|
@ -347,7 +345,7 @@ void FMapInfoParser::ParseGameInfo()
|
||||||
GAMEINFOKEY_STRING(mFontColorHeader, "menufontcolor_header")
|
GAMEINFOKEY_STRING(mFontColorHeader, "menufontcolor_header")
|
||||||
GAMEINFOKEY_STRING(mFontColorHighlight, "menufontcolor_highlight")
|
GAMEINFOKEY_STRING(mFontColorHighlight, "menufontcolor_highlight")
|
||||||
GAMEINFOKEY_STRING(mFontColorSelection, "menufontcolor_selection")
|
GAMEINFOKEY_STRING(mFontColorSelection, "menufontcolor_selection")
|
||||||
GAMEINFOKEY_CSTRING(mBackButton, "menubackbutton", 8)
|
GAMEINFOKEY_STRING(mBackButton, "menubackbutton")
|
||||||
GAMEINFOKEY_INT(TextScreenX, "textscreenx")
|
GAMEINFOKEY_INT(TextScreenX, "textscreenx")
|
||||||
GAMEINFOKEY_INT(TextScreenY, "textscreeny")
|
GAMEINFOKEY_INT(TextScreenY, "textscreeny")
|
||||||
GAMEINFOKEY_STRING(DefaultEndSequence, "defaultendsequence")
|
GAMEINFOKEY_STRING(DefaultEndSequence, "defaultendsequence")
|
||||||
|
|
18
src/gi.h
18
src/gi.h
|
@ -78,7 +78,7 @@ struct gameinfo_t
|
||||||
EGameType gametype;
|
EGameType gametype;
|
||||||
FString ConfigName;
|
FString ConfigName;
|
||||||
|
|
||||||
char titlePage[9];
|
FString TitlePage;
|
||||||
bool drawreadthis;
|
bool drawreadthis;
|
||||||
bool noloopfinalemusic;
|
bool noloopfinalemusic;
|
||||||
bool intermissioncounter;
|
bool intermissioncounter;
|
||||||
|
@ -98,13 +98,13 @@ struct gameinfo_t
|
||||||
FString chatSound;
|
FString chatSound;
|
||||||
FString finaleMusic;
|
FString finaleMusic;
|
||||||
int finaleOrder;
|
int finaleOrder;
|
||||||
char finaleFlat[9];
|
FString FinaleFlat;
|
||||||
char borderFlat[9];
|
FString BorderFlat;
|
||||||
char SkyFlatName[9];
|
FString SkyFlatName;
|
||||||
char ArmorIcon1[9];
|
FString ArmorIcon1;
|
||||||
char ArmorIcon2[9];
|
FString ArmorIcon2;
|
||||||
char PauseSign[9];
|
FString PauseSign;
|
||||||
char Endoom[9];
|
FString Endoom;
|
||||||
fixed_t Armor2Percent;
|
fixed_t Armor2Percent;
|
||||||
FString quitSound;
|
FString quitSound;
|
||||||
gameborder_t *border;
|
gameborder_t *border;
|
||||||
|
@ -133,7 +133,7 @@ struct gameinfo_t
|
||||||
FName mFontColorHeader;
|
FName mFontColorHeader;
|
||||||
FName mFontColorHighlight;
|
FName mFontColorHighlight;
|
||||||
FName mFontColorSelection;
|
FName mFontColorSelection;
|
||||||
char mBackButton[9];
|
FString mBackButton;
|
||||||
fixed_t gibfactor;
|
fixed_t gibfactor;
|
||||||
int TextScreenX;
|
int TextScreenX;
|
||||||
int TextScreenY;
|
int TextScreenY;
|
||||||
|
|
|
@ -104,7 +104,7 @@ void DIntermissionScreen::Init(FIntermissionAction *desc, bool first)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
texname = gameinfo.titlePage;
|
texname = gameinfo.TitlePage.GetChars();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*texname == '$')
|
else if (*texname == '$')
|
||||||
|
|
|
@ -1450,7 +1450,7 @@ void V_DrawBorder (int x1, int y1, int x2, int y2)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
picnum = TexMan.CheckForTexture (gameinfo.borderFlat, FTexture::TEX_Flat);
|
picnum = TexMan.CheckForTexture (gameinfo.BorderFlat, FTexture::TEX_Flat);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (picnum.isValid())
|
if (picnum.isValid())
|
||||||
|
|
|
@ -314,7 +314,7 @@ static bool IsExMy(const char * name)
|
||||||
|
|
||||||
void WI_LoadBackground(bool isenterpic)
|
void WI_LoadBackground(bool isenterpic)
|
||||||
{
|
{
|
||||||
const char * lumpname = NULL;
|
const char *lumpname;
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
in_anim_t an;
|
in_anim_t an;
|
||||||
lnode_t pt;
|
lnode_t pt;
|
||||||
|
@ -399,7 +399,7 @@ void WI_LoadBackground(bool isenterpic)
|
||||||
default:
|
default:
|
||||||
// Strife doesn't have an intermission pic so choose something neutral.
|
// Strife doesn't have an intermission pic so choose something neutral.
|
||||||
if (isenterpic) return;
|
if (isenterpic) return;
|
||||||
lumpname = gameinfo.borderFlat;
|
lumpname = gameinfo.BorderFlat;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1086,12 +1086,12 @@ void ST_Endoom()
|
||||||
{
|
{
|
||||||
if (showendoom == 0) exit(0);
|
if (showendoom == 0) exit(0);
|
||||||
|
|
||||||
if (gameinfo.Endoom[0] == 0)
|
if (gameinfo.Endoom.Len() == 0)
|
||||||
{
|
{
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int endoom_lump = Wads.CheckNumForName (gameinfo.Endoom);
|
int endoom_lump = Wads.CheckNumForFullName (gameinfo.Endoom, true);
|
||||||
|
|
||||||
BYTE endoom_screen[4000];
|
BYTE endoom_screen[4000];
|
||||||
BYTE *font;
|
BYTE *font;
|
||||||
|
|
Loading…
Reference in a new issue