- Added Blzut3's patch for a real Chex Quest game mode.
SVN r1188 (trunk)
This commit is contained in:
parent
62a9958a9a
commit
dbcc246cf3
47 changed files with 969 additions and 126 deletions
102
src/m_menu.cpp
102
src/m_menu.cpp
|
|
@ -926,7 +926,7 @@ void M_NotifyNewSave (const char *file, const char *title, bool okForQuicksave)
|
|||
//
|
||||
void M_DrawLoad (void)
|
||||
{
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
FTexture *title = TexMan["M_LOADG"];
|
||||
screen->DrawTexture (title,
|
||||
|
|
@ -952,7 +952,7 @@ void M_DrawLoad (void)
|
|||
//
|
||||
void M_DrawSaveLoadBorder (int x, int y, int len)
|
||||
{
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -1272,7 +1272,10 @@ void M_LoadGame (int choice)
|
|||
{
|
||||
if (netgame)
|
||||
{
|
||||
M_StartMessage (GStrings("LOADNET"), NULL, false);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
M_StartMessage (GStrings("CLOADNET"), NULL, false);
|
||||
else
|
||||
M_StartMessage (GStrings("LOADNET"), NULL, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1289,7 +1292,7 @@ void M_LoadGame (int choice)
|
|||
//
|
||||
void M_DrawSave()
|
||||
{
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
FTexture *title = TexMan["M_SAVEG"];
|
||||
screen->DrawTexture (title,
|
||||
|
|
@ -1401,7 +1404,10 @@ void M_QuickSave ()
|
|||
M_SaveGame (0);
|
||||
return;
|
||||
}
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("QSPROMPT"), quickSaveSlot->Title);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("CQSPROMPT"), quickSaveSlot->Title);
|
||||
else
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("QSPROMPT"), quickSaveSlot->Title);
|
||||
strcpy (savegamestring, quickSaveSlot->Title);
|
||||
M_StartMessage (tempstring, M_QuickSaveResponse, true);
|
||||
}
|
||||
|
|
@ -1425,7 +1431,10 @@ void M_QuickLoad ()
|
|||
{
|
||||
if (netgame)
|
||||
{
|
||||
M_StartMessage (GStrings("QLOADNET"), NULL, false);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
M_StartMessage (GStrings("CQLOADNET"), NULL, false);
|
||||
else
|
||||
M_StartMessage (GStrings("QLOADNET"), NULL, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1437,7 +1446,10 @@ void M_QuickLoad ()
|
|||
M_LoadGame (0);
|
||||
return;
|
||||
}
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("QLPROMPT"), quickSaveSlot->Title);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("CQLPROMPT"), quickSaveSlot->Title);
|
||||
else
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("QLPROMPT"), quickSaveSlot->Title);
|
||||
M_StartMessage (tempstring, M_QuickLoadResponse, true);
|
||||
}
|
||||
|
||||
|
|
@ -1499,7 +1511,7 @@ void M_DrawReadThis ()
|
|||
//
|
||||
void M_DrawMainMenu (void)
|
||||
{
|
||||
if (gameinfo.gametype == GAME_Doom)
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
screen->DrawTexture (TexMan["M_DOOM"], 94, 2, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
|
|
@ -1542,9 +1554,9 @@ void M_DrawHereticMainMenu ()
|
|||
//
|
||||
void M_DrawNewGame(void)
|
||||
{
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
screen->DrawTexture (TexMan[gameinfo.gametype == GAME_Doom ? "M_NEWG" : "M_NGAME"], 96, 14, DTA_Clean, true, TAG_DONE);
|
||||
screen->DrawTexture (TexMan[gameinfo.gametype & GAME_DoomChex ? "M_NEWG" : "M_NGAME"], 96, 14, DTA_Clean, true, TAG_DONE);
|
||||
screen->DrawTexture (TexMan["M_SKILL"], 54, 38, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
|
@ -1553,12 +1565,15 @@ void M_NewGame(int choice)
|
|||
{
|
||||
if (netgame && !demoplayback)
|
||||
{
|
||||
M_StartMessage (GStrings("NEWGAME"), NULL, false);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
M_StartMessage (GStrings("CNEWGAME"), NULL, false);
|
||||
else
|
||||
M_StartMessage (GStrings("NEWGAME"), NULL, false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Set up episode menu positioning
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
EpiDef.x = 48;
|
||||
EpiDef.y = 63;
|
||||
|
|
@ -1679,7 +1694,7 @@ static void M_DrawClassMenu ()
|
|||
if (ClassMenuDef.numitems > 4 && gameinfo.gametype & GAME_Raven)
|
||||
tit_y = 2;
|
||||
|
||||
screen->DrawText (gameinfo.gametype == GAME_Doom ? CR_RED : CR_UNTRANSLATED,
|
||||
screen->DrawText (gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||
160 - BigFont->StringWidth (text)/2,
|
||||
tit_y,
|
||||
text, DTA_Clean, true, TAG_DONE);
|
||||
|
|
@ -1738,7 +1753,7 @@ static void DrawHexenSkillMenu()
|
|||
//
|
||||
void M_DrawEpisode ()
|
||||
{
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
screen->DrawTexture (TexMan["M_EPISOD"], 54, 38, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
|
|
@ -1790,6 +1805,10 @@ void M_Episode (int choice)
|
|||
M_StartMessage(GStrings("SWSTRING"),NULL,false);
|
||||
//M_SetupNextMenu(&ReadDef);
|
||||
}
|
||||
else if (gameinfo.gametype == GAME_Chex)
|
||||
{
|
||||
M_StartMessage(GStrings("CSWSTRING"),NULL,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
showSharewareMessage = 3*TICRATE;
|
||||
|
|
@ -1818,7 +1837,10 @@ static void SCClass (int option)
|
|||
{
|
||||
if (netgame)
|
||||
{
|
||||
M_StartMessage (GStrings("NEWGAME"), NULL, false);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
M_StartMessage (GStrings("CNEWGAME"), NULL, false);
|
||||
else
|
||||
M_StartMessage (GStrings("NEWGAME"), NULL, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1846,7 +1868,10 @@ static void M_ChooseClass (int choice)
|
|||
{
|
||||
if (netgame)
|
||||
{
|
||||
M_StartMessage (GStrings("NEWGAME"), NULL, false);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
M_StartMessage (GStrings("CNEWGAME"), NULL, false);
|
||||
else
|
||||
M_StartMessage (GStrings("NEWGAME"), NULL, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1899,11 +1924,17 @@ void M_EndGame(int choice)
|
|||
|
||||
if (netgame)
|
||||
{
|
||||
M_StartMessage(GStrings("NETEND"),NULL,false);
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
M_StartMessage(GStrings("CNETEND"),NULL,false);
|
||||
else
|
||||
M_StartMessage(GStrings("NETEND"),NULL,false);
|
||||
return;
|
||||
}
|
||||
|
||||
M_StartMessage(GStrings("ENDGAME"),M_EndGameResponse,true);
|
||||
|
||||
if(gameinfo.gametype == GAME_Chex)
|
||||
M_StartMessage(GStrings("CENDGAME"),M_EndGameResponse,true);
|
||||
else
|
||||
M_StartMessage(GStrings("ENDGAME"),M_EndGameResponse,true);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1966,12 +1997,19 @@ void M_QuitGame (int choice)
|
|||
{
|
||||
// We pick index 0 which is language sensitive,
|
||||
// or one at random, between 1 and maximum number.
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
int quitmsg = gametic % (gameinfo.gametype == GAME_Doom ? NUM_QUITDOOMMESSAGES : NUM_QUITSTRIFEMESSAGES - 1);
|
||||
if (quitmsg != 0 || gameinfo.gametype == GAME_Strife)
|
||||
int quitmsg = 0;gametic % (gameinfo.gametype == GAME_Doom ? (gameinfo.gametype != GAME_Chex ? NUM_QUITDOOMMESSAGES : NUM_QUITCHEXMESSAGES - 1) : NUM_QUITSTRIFEMESSAGES - 1);
|
||||
if (gameinfo.gametype == GAME_Doom)
|
||||
quitmsg = gametic % NUM_QUITDOOMMESSAGES;
|
||||
else if (gameinfo.gametype == GAME_Strife)
|
||||
quitmsg = gametic % NUM_QUITSTRIFEMESSAGES - 1;
|
||||
else //Chex quest has 2 messages but one is more likely to show
|
||||
quitmsg = (gametic % NUM_QUITCHEXMESSAGES + 6) > NUM_QUITCHEXMESSAGES ? NUM_QUITCHEXMESSAGES - 1 : (gametic % NUM_QUITCHEXMESSAGES + 6);
|
||||
|
||||
if (quitmsg != 0 || gameinfo.gametype == GAME_Strife || gameinfo.gametype == GAME_Chex)
|
||||
{
|
||||
EndString.Format("QUITMSG%d", quitmsg + (gameinfo.gametype == GAME_Doom ? 0 : NUM_QUITDOOMMESSAGES + 1));
|
||||
EndString.Format("QUITMSG%d", quitmsg + (gameinfo.gametype == GAME_Doom ? 0 : (gameinfo.gametype == GAME_Chex ? NUM_QUITDOOMMESSAGES + NUM_QUITSTRIFEMESSAGES : NUM_QUITDOOMMESSAGES + 1)));
|
||||
EndString.Format("%s\n\n%s", GStrings(EndString), GStrings("DOSY"));
|
||||
}
|
||||
else
|
||||
|
|
@ -2061,7 +2099,7 @@ static void M_PlayerSetupDrawer ()
|
|||
EColorRange label, value;
|
||||
DWORD color;
|
||||
|
||||
if (!(gameinfo.gametype & (GAME_Doom|GAME_Strife)))
|
||||
if (!(gameinfo.gametype & (GAME_DoomStrifeChex)))
|
||||
{
|
||||
xo = 5;
|
||||
yo = 5;
|
||||
|
|
@ -2077,7 +2115,7 @@ static void M_PlayerSetupDrawer ()
|
|||
|
||||
// Draw title
|
||||
const char * text = GStrings("MNU_PLAYERSETUP");
|
||||
screen->DrawText (gameinfo.gametype == GAME_Doom ? CR_RED : CR_UNTRANSLATED,
|
||||
screen->DrawText (gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
||||
160 - BigFont->StringWidth (text)/2,
|
||||
15,
|
||||
text, DTA_Clean, true, TAG_DONE);
|
||||
|
|
@ -3210,7 +3248,7 @@ void M_Drawer ()
|
|||
if (color == CR_UNTRANSLATED)
|
||||
{
|
||||
// The default DBIGFONT is white but Doom's default should be red.
|
||||
if (gameinfo.gametype == GAME_Doom)
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
color = CR_RED;
|
||||
}
|
||||
|
|
@ -3241,12 +3279,12 @@ void M_Drawer ()
|
|||
screen->SetFont (ConFont);
|
||||
screen->DrawText (CR_RED, x - 16,
|
||||
currentMenu->y + itemOn*LINEHEIGHT +
|
||||
(!(gameinfo.gametype & (GAME_Doom|GAME_Strife)) ? 6 : -1), "\xd",
|
||||
(!(gameinfo.gametype & (GAME_DoomStrifeChex)) ? 6 : -1), "\xd",
|
||||
DTA_Clean, true, TAG_DONE);
|
||||
screen->SetFont (SmallFont);
|
||||
}
|
||||
}
|
||||
else if (gameinfo.gametype == GAME_Doom)
|
||||
else if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
screen->DrawTexture (TexMan[skullName[whichSkull]],
|
||||
x + SKULLXOFF, currentMenu->y - 5 + itemOn*LINEHEIGHT,
|
||||
|
|
@ -3398,7 +3436,7 @@ void M_Init (void)
|
|||
|
||||
atterm (M_Deinit);
|
||||
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
TopLevelMenu = currentMenu = &MainDef;
|
||||
if (gameinfo.gametype == GAME_Strife)
|
||||
|
|
@ -3429,10 +3467,10 @@ void M_Init (void)
|
|||
lastSaveSlot = NULL;
|
||||
strcpy (NewSaveNode.Title, "<New Save Game>");
|
||||
|
||||
underscore[0] = (gameinfo.gametype & (GAME_Doom|GAME_Strife)) ? '_' : '[';
|
||||
underscore[0] = (gameinfo.gametype & (GAME_DoomStrifeChex)) ? '_' : '[';
|
||||
underscore[1] = '\0';
|
||||
|
||||
if (gameinfo.gametype == GAME_Doom)
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
LINEHEIGHT = 16;
|
||||
}
|
||||
|
|
@ -3494,7 +3532,7 @@ void M_Init (void)
|
|||
ClassMenuDef.numitems = 1;
|
||||
}
|
||||
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
if (gameinfo.gametype & (GAME_DoomStrifeChex))
|
||||
{
|
||||
ClassMenuDef.x = 48;
|
||||
ClassMenuDef.y = 63;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue