- 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:
Christoph Oelckers 2010-09-26 06:53:40 +00:00
commit cf9792ed53
6 changed files with 29 additions and 6 deletions

View file

@ -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))
{