mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- fixed: The order of items in the main menu was wrong. Doom is supposed to have 'Options' in second place. Many vanilla-compatible mods with special one-patch menus would not work correctly due to this. Fortunately the only mod I could find that relied on ZDoom's order was Action Doom 2, which as an IWAD can easily be handled by a simple configuration option.
- added 'else' blocks to MENUDEF parser. SVN r2854 (trunk)
This commit is contained in:
parent
79f26d9e5c
commit
cf9792ed53
6 changed files with 29 additions and 6 deletions
|
@ -80,7 +80,7 @@ const IWADInfo IWADInfos[NUM_IWAD_TYPES] =
|
|||
{ "Blasphemer", "Blasphemer",MAKERGB(115,0,0), MAKERGB(0,0,0), GAME_Heretic, "mapinfo/heretic.txt" },
|
||||
{ "Chex(R) Quest", "Chex1", MAKERGB(255,255,0), MAKERGB(0,192,0), GAME_Chex, "mapinfo/chex.txt" },
|
||||
{ "Chex(R) Quest 3", "Chex3", MAKERGB(255,255,0), MAKERGB(0,192,0), GAME_Chex, "mapinfo/chex3.txt", GI_NOTEXTCOLOR },
|
||||
{ "Action Doom 2: Urban Brawl", "UrbanBrawl",MAKERGB(168,168,0), MAKERGB(168,0,0), GAME_Doom, "mapinfo/doom2.txt", GI_MAPxx },
|
||||
{ "Action Doom 2: Urban Brawl", "UrbanBrawl",MAKERGB(168,168,0), MAKERGB(168,0,0), GAME_Doom, "mapinfo/urbanbrawl.txt", GI_MAPxx },
|
||||
{ "Harmony", "Harmony", MAKERGB(110,180,230), MAKERGB(69,79,126), GAME_Doom, "mapinfo/doom2.txt", GI_MAPxx },
|
||||
//{ "ZDoom Engine", NULL, MAKERGB(168,0,0), MAKERGB(168,168,168) },
|
||||
};
|
||||
|
|
|
@ -277,6 +277,7 @@ void FMapInfoParser::ParseGameInfo()
|
|||
GAMEINFOKEY_STRING(CursorPic, "CursorPic")
|
||||
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
|
||||
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")
|
||||
GAMEINFOKEY_BOOL(swapmenu, "swapmenu")
|
||||
GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter")
|
||||
GAMEINFOKEY_BOOL(nightmarefast, "nightmarefast")
|
||||
GAMEINFOKEY_COLOR(dimcolor, "dimcolor")
|
||||
|
|
1
src/gi.h
1
src/gi.h
|
@ -76,6 +76,7 @@ struct gameinfo_t
|
|||
bool noloopfinalemusic;
|
||||
bool intermissioncounter;
|
||||
bool nightmarefast;
|
||||
bool swapmenu;
|
||||
TArray<FName> creditPages;
|
||||
TArray<FName> finalePages;
|
||||
TArray<FName> infoPages;
|
||||
|
|
|
@ -147,6 +147,7 @@ static bool CheckSkipOptionBlock(FScanner &sc)
|
|||
{
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("ReadThis")) filter |= gameinfo.drawreadthis;
|
||||
else if (sc.Compare("Swapmenu")) filter |= gameinfo.swapmenu;
|
||||
else if (sc.Compare("Windows"))
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
@ -171,7 +172,7 @@ static bool CheckSkipOptionBlock(FScanner &sc)
|
|||
if (!filter)
|
||||
{
|
||||
SkipSubBlock(sc);
|
||||
return true;
|
||||
return !sc.CheckString("else");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -188,7 +189,11 @@ static void ParseListMenuBody(FScanner &sc, FListMenuDescriptor *desc)
|
|||
while (!sc.CheckString("}"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("ifgame"))
|
||||
if (sc.Compare("else"))
|
||||
{
|
||||
SkipSubBlock(sc);
|
||||
}
|
||||
else if (sc.Compare("ifgame"))
|
||||
{
|
||||
if (!CheckSkipGameBlock(sc))
|
||||
{
|
||||
|
|
7
wadsrc/static/mapinfo/urbanbrawl.txt
Normal file
7
wadsrc/static/mapinfo/urbanbrawl.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
include "mapinfo/doom2.txt"
|
||||
|
||||
gameinfo
|
||||
{
|
||||
swapmenu = true
|
||||
}
|
||||
|
|
@ -69,9 +69,18 @@ LISTMENU "MainMenu"
|
|||
IfGame(Doom, Strife, Chex)
|
||||
{
|
||||
PatchItem "M_NGAME", "n", "PlayerclassMenu"
|
||||
PatchItem "M_LOADG", "l", "LoadGameMenu"
|
||||
PatchItem "M_SAVEG", "s", "SaveGameMenu"
|
||||
PatchItem "M_OPTION","o", "OptionsMenu"
|
||||
ifOption(SwapMenu)
|
||||
{
|
||||
PatchItem "M_LOADG", "l", "LoadGameMenu"
|
||||
PatchItem "M_SAVEG", "s", "SaveGameMenu"
|
||||
PatchItem "M_OPTION","o", "OptionsMenu"
|
||||
}
|
||||
else
|
||||
{
|
||||
PatchItem "M_OPTION","o", "OptionsMenu"
|
||||
PatchItem "M_LOADG", "l", "LoadGameMenu"
|
||||
PatchItem "M_SAVEG", "s", "SaveGameMenu"
|
||||
}
|
||||
ifOption(ReadThis)
|
||||
{
|
||||
PatchItem "M_RDTHIS","r", "ReadThisMenu"
|
||||
|
|
Loading…
Reference in a new issue