Clear out some irrelevant/redundant functions now there are no non-platter Level Selects available.

This commit is contained in:
toasterbabe 2017-02-02 12:32:02 +00:00
parent 05ebc93f6c
commit 55e736250a
1 changed files with 6 additions and 37 deletions

View File

@ -1884,8 +1884,7 @@ menu_t OP_EraseDataDef = DEFAULTMENUSTYLE("M_DATA", OP_EraseDataMenu, &OP_DataOp
// (there's only a couple anyway)
// Prototypes
static INT32 M_FindFirstMap(INT32 gtype);
static INT32 M_GetFirstLevelInList(void);
static INT32 M_GetFirstLevelInList(INT32 gt);
// Nextmap. Used for Time Attack.
static void Nextmap_OnChange(void)
@ -2065,9 +2064,7 @@ static void Newgametype_OnChange(void)
break;
}
CV_SetValue(&cv_nextmap, M_FindFirstMap(value));
CV_AddValue(&cv_nextmap, -1);
CV_AddValue(&cv_nextmap, 1);
CV_SetValue(&cv_nextmap, M_GetFirstLevelInList(value));
}
}
}
@ -4125,15 +4122,6 @@ static void M_DrawLevelPlatterMenu(void)
#undef lsbasey
// Call before showing any level-select menus (Not necessary for platter-based ones)
static void M_PrepareLevelSelect(void)
{
if (levellistmode != LLM_CREATESERVER)
CV_SetValue(&cv_nextmap, M_GetFirstLevelInList());
else
Newgametype_OnChange(); // Make sure to start on an appropriate map if wads have been added
}
//
// M_CanShowLevelInList
//
@ -4156,12 +4144,12 @@ static INT32 M_CountLevelsToShowInList(void)
return count;
}
static INT32 M_GetFirstLevelInList(void)
static INT32 M_GetFirstLevelInList(INT32 gt)
{
INT32 mapnum;
for (mapnum = 0; mapnum < NUMMAPS; mapnum++)
if (M_CanShowLevelInList(mapnum, -1))
if (M_CanShowLevelInList(mapnum, gt))
return mapnum + 1;
return 1;
@ -6024,7 +6012,7 @@ static void M_TimeAttack(INT32 choice)
M_PatchSkinNameTable();
M_PrepareLevelSelect();
Newgametype_OnChange();
}
else
SP_TimeAttackDef.prevMenu = currentMenu;
@ -6214,7 +6202,7 @@ static void M_NightsAttack(INT32 choice)
// This is really just to make sure Sonic is the played character, just in case
M_PatchSkinNameTable();
M_PrepareLevelSelect();
Newgametype_OnChange();
}
else
SP_NightsAttackDef.prevMenu = currentMenu;
@ -6837,25 +6825,6 @@ static void M_ChooseRoom(INT32 choice)
// Start Server Menu
//===========================================================================
//
// FindFirstMap
//
// Finds the first map of a particular gametype
// Defaults to 1 if nothing found.
//
static INT32 M_FindFirstMap(INT32 gtype)
{
INT32 i;
for (i = 0; i < NUMMAPS; i++)
{
if (mapheaderinfo[i] && (mapheaderinfo[i]->typeoflevel & gtype))
return i + 1;
}
return 1;
}
static void M_StartServer(INT32 choice)
{
boolean StartSplitScreenGame = (currentMenu == &MP_SplitServerDef);