mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-09 16:32:33 +00:00
Grand Prix course preview adjustment: Show Prison Break stages too, just like on Challenges Board preview
- All gametypes will be shown in the drawer, as opposed to just Race - However, don't attempt to add the preview pic for CUPCACHE_SPECIAL (the Sealed Star)
This commit is contained in:
parent
38274046a9
commit
1034dd7ec9
8 changed files with 26 additions and 19 deletions
|
|
@ -3557,6 +3557,7 @@ UINT16 G_GetFirstMapOfGametype(UINT16 pgametype)
|
|||
templevelsearch.typeoflevel = G_TOLFlag(pgametype);
|
||||
templevelsearch.cupmode = (!(gametypes[pgametype]->rules & GTR_NOCUPSELECT));
|
||||
templevelsearch.timeattack = false;
|
||||
templevelsearch.grandprix = false;
|
||||
templevelsearch.tutorial = (pgametype == GT_TUTORIAL);
|
||||
templevelsearch.checklocked = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -863,7 +863,6 @@ extern struct cupgrid_s {
|
|||
size_t numpages;
|
||||
size_t cappages;
|
||||
tic_t previewanim;
|
||||
boolean grandprix; // Setup grand prix server after picking
|
||||
boolean cache_secondrowlocked;
|
||||
} cupgrid;
|
||||
|
||||
|
|
@ -872,6 +871,7 @@ typedef struct levelsearch_s {
|
|||
cupheader_t *cup;
|
||||
boolean timeattack;
|
||||
boolean tutorial;
|
||||
boolean grandprix;
|
||||
boolean cupmode;
|
||||
boolean checklocked;
|
||||
} levelsearch_t;
|
||||
|
|
|
|||
|
|
@ -3222,7 +3222,7 @@ void M_DrawCupSelect(void)
|
|||
if (cupgrid.cache_secondrowlocked == true)
|
||||
y += 28;
|
||||
|
||||
const boolean isGP = (cupgrid.grandprix && (cv_dummygpdifficulty.value >= 0 && cv_dummygpdifficulty.value < KARTGP_MAX));
|
||||
const boolean isGP = (templevelsearch.grandprix && (cv_dummygpdifficulty.value >= 0 && cv_dummygpdifficulty.value < KARTGP_MAX));
|
||||
if (isGP)
|
||||
{
|
||||
windata = &templevelsearch.cup->windata[cv_dummygpdifficulty.value];
|
||||
|
|
@ -3236,7 +3236,7 @@ void M_DrawCupSelect(void)
|
|||
windata ? windata->best_placement : 0
|
||||
);
|
||||
|
||||
if (cupgrid.grandprix == true
|
||||
if (templevelsearch.grandprix == true
|
||||
&& templevelsearch.cup == cupsavedata.cup
|
||||
&& id != CUPMENU_CURSORID)
|
||||
{
|
||||
|
|
@ -3284,7 +3284,7 @@ void M_DrawCupSelect(void)
|
|||
|
||||
templevelsearch.cup = cupgrid.builtgrid[CUPMENU_CURSORID];
|
||||
|
||||
if (cupgrid.grandprix == true
|
||||
if (templevelsearch.grandprix == true
|
||||
&& templevelsearch.cup != NULL
|
||||
&& templevelsearch.cup == cupsavedata.cup)
|
||||
{
|
||||
|
|
@ -6982,7 +6982,8 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
|
|||
break;
|
||||
|
||||
templevelsearch.cup = temp;
|
||||
templevelsearch.typeoflevel = G_TOLFlag(GT_RACE)|G_TOLFlag(GT_BATTLE);
|
||||
templevelsearch.typeoflevel = 0; // doesn't matter...
|
||||
templevelsearch.grandprix = true; // this will overwrite
|
||||
templevelsearch.cupmode = true;
|
||||
templevelsearch.timeattack = false;
|
||||
templevelsearch.tutorial = false;
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ menu_t *M_SpecificMenuRestore(menu_t *torestore)
|
|||
if (levellist.newgametype == GT_RACE)
|
||||
{
|
||||
M_SetupRaceMenu(-1);
|
||||
M_SetupDifficultyOptions((cupgrid.grandprix == false));
|
||||
M_SetupDifficultyOptions((levellist.levelsearch.grandprix == false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1254,7 +1254,7 @@ void M_GonerTutorial(INT32 choice)
|
|||
// Please also see M_LevelSelectInit as called in extras-1.c
|
||||
levellist.netgame = false;
|
||||
levellist.levelsearch.checklocked = true;
|
||||
cupgrid.grandprix = false;
|
||||
levellist.levelsearch.grandprix = false;
|
||||
levellist.levelsearch.timeattack = false;
|
||||
|
||||
if (!M_LevelListFromGametype(GT_TUTORIAL) && gamedata->gonerlevel < GDGONER_OUTRO)
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ void M_MPSetupNetgameMapSelect(INT32 choice)
|
|||
// Make sure we reset those
|
||||
levellist.levelsearch.timeattack = false;
|
||||
levellist.levelsearch.checklocked = true;
|
||||
cupgrid.grandprix = false;
|
||||
levellist.levelsearch.grandprix = false;
|
||||
|
||||
// okay this is REALLY stupid but this fixes the host menu re-folding on itself when we go back.
|
||||
mpmenu.modewinextend[0][0] = 1;
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ void M_CupSelectHandler(INT32 choice)
|
|||
|
||||
if (count == 0
|
||||
|| (
|
||||
cupgrid.grandprix == true
|
||||
levellist.levelsearch.grandprix == true
|
||||
&& newcup->cachedlevels[0] == NEXTMAP_INVALID
|
||||
)
|
||||
)
|
||||
|
|
@ -298,7 +298,7 @@ void M_CupSelectHandler(INT32 choice)
|
|||
return;
|
||||
}
|
||||
|
||||
if (cupgrid.grandprix == true)
|
||||
if (levellist.levelsearch.grandprix == true)
|
||||
{
|
||||
if (newcup == cupsavedata.cup
|
||||
&& FIL_FileExists(gpbackup))
|
||||
|
|
|
|||
|
|
@ -76,7 +76,9 @@ boolean M_CanShowLevelInList(INT16 mapnum, levelsearch_t *levelsearch)
|
|||
return false;
|
||||
|
||||
// Check for TOL (permits TEST RUN outside of time attack)
|
||||
if ((levelsearch->timeattack || levelsearch->tutorial || mapheaderinfo[mapnum]->typeoflevel)
|
||||
// (grand prix can contain anything, we limit in a different way)
|
||||
if (levelsearch->grandprix == false
|
||||
&& (levelsearch->timeattack || levelsearch->tutorial || mapheaderinfo[mapnum]->typeoflevel)
|
||||
&& !(mapheaderinfo[mapnum]->typeoflevel & levelsearch->typeoflevel))
|
||||
return false;
|
||||
|
||||
|
|
@ -133,7 +135,8 @@ UINT16 M_CountLevelsToShowInList(levelsearch_t *levelsearch)
|
|||
if (levelsearch->checklocked && M_CupLocked(levelsearch->cup))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < CUPCACHE_PODIUM; i++)
|
||||
const INT16 limit = (levelsearch->grandprix ? CUPCACHE_SPECIAL : CUPCACHE_PODIUM);
|
||||
for (i = 0; i < limit; i++)
|
||||
{
|
||||
if (!M_CanShowLevelInList(levelsearch->cup->cachedlevels[i], levelsearch))
|
||||
continue;
|
||||
|
|
@ -170,7 +173,8 @@ UINT16 M_GetFirstLevelInList(UINT8 *i, levelsearch_t *levelsearch)
|
|||
|
||||
*i = 0;
|
||||
mapnum = NEXTMAP_INVALID;
|
||||
for (; *i < CUPCACHE_PODIUM; (*i)++)
|
||||
const INT16 limit = (levelsearch->grandprix ? CUPCACHE_SPECIAL : CUPCACHE_PODIUM);
|
||||
for (; *i < limit; (*i)++)
|
||||
{
|
||||
if (!M_CanShowLevelInList(levelsearch->cup->cachedlevels[*i], levelsearch))
|
||||
continue;
|
||||
|
|
@ -200,7 +204,8 @@ UINT16 M_GetNextLevelInList(UINT16 mapnum, UINT8 *i, levelsearch_t *levelsearch)
|
|||
{
|
||||
mapnum = NEXTMAP_INVALID;
|
||||
(*i)++;
|
||||
for (; *i < CUPCACHE_PODIUM; (*i)++)
|
||||
const INT16 limit = (levelsearch->grandprix ? CUPCACHE_SPECIAL : CUPCACHE_PODIUM);
|
||||
for (; *i < limit; (*i)++)
|
||||
{
|
||||
if (!M_CanShowLevelInList(levelsearch->cup->cachedlevels[*i], levelsearch))
|
||||
continue;
|
||||
|
|
@ -357,7 +362,7 @@ boolean M_LevelListFromGametype(INT16 gt)
|
|||
size_t deltaid = 0;
|
||||
|
||||
G_GetBackupCupData(
|
||||
cupgrid.grandprix == true
|
||||
templevelsearch.grandprix == true
|
||||
&& cv_splitplayers.value <= 1
|
||||
);
|
||||
|
||||
|
|
@ -436,7 +441,7 @@ boolean M_LevelListFromGametype(INT16 gt)
|
|||
}
|
||||
|
||||
size_t olddelta = deltaid;
|
||||
if (cupgrid.grandprix == false)
|
||||
if (templevelsearch.grandprix == false)
|
||||
{
|
||||
cupheader_t *restore = templevelsearch.cup;
|
||||
|
||||
|
|
@ -646,15 +651,15 @@ void M_LevelSelectInit(INT32 choice)
|
|||
switch (currentMenu->menuitems[itemOn].mvar1)
|
||||
{
|
||||
case 0:
|
||||
cupgrid.grandprix = false;
|
||||
levellist.levelsearch.grandprix = false;
|
||||
levellist.levelsearch.timeattack = false;
|
||||
break;
|
||||
case 1:
|
||||
cupgrid.grandprix = false;
|
||||
levellist.levelsearch.grandprix = false;
|
||||
levellist.levelsearch.timeattack = true;
|
||||
break;
|
||||
case 2:
|
||||
cupgrid.grandprix = true;
|
||||
levellist.levelsearch.grandprix = true;
|
||||
levellist.levelsearch.timeattack = false;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue