Add Podium level to Stereo Mode

- LF2_HIDEINMENU is considered equivalent to LF2_FINISHNEEDED for:
    - S_SoundTestDefLocked
        - So you don't see podium stuff without having beaten a GP
    - MV_FINISHNEEDED
        - So the status is saved to gamedata and persists between launches if custom
- G_UpdateVisited is now called in K_FinishCeremony, so level is marked as beaten
This commit is contained in:
toaster 2023-06-03 14:24:39 +01:00
parent 10c18fe3fa
commit 1d619d10f2
4 changed files with 8 additions and 6 deletions

View file

@ -3972,7 +3972,7 @@ void G_AddMapToBuffer(UINT16 map)
//
// G_UpdateVisited
//
static void G_UpdateVisited(void)
void G_UpdateVisited(void)
{
UINT8 i;
UINT8 earnedEmblems;
@ -5574,7 +5574,7 @@ void G_SaveGameData(void)
UINT8 mapvisitedtemp = (mapheaderinfo[i]->records.mapvisited & MV_MAX);
if ((mapheaderinfo[i]->menuflags & LF2_FINISHNEEDED))
if ((mapheaderinfo[i]->menuflags & (LF2_FINISHNEEDED|LF2_HIDEINMENU)))
{
mapvisitedtemp |= MV_FINISHNEEDED;
}

View file

@ -281,6 +281,8 @@ INT16 G_GetFirstMapOfGametype(UINT8 pgametype);
UINT16 G_RandMap(UINT32 tolflags, UINT16 pprevmap, boolean ignoreBuffers, boolean callAgainSoon, UINT16 *extBuffer);
void G_AddMapToBuffer(UINT16 map);
void G_UpdateVisited(void);
#ifdef __cplusplus
} // extern "C"
#endif

View file

@ -291,9 +291,9 @@ void K_FinishCeremony(void)
podiumData.ranking = true;
// Play the noise now
M_UpdateUnlockablesAndExtraEmblems(true, true);
G_SaveGameData();
// Play the noise now (via G_UpdateVisited's concluding gamedata save)
prevmap = gamemap-1;
G_UpdateVisited();
}
/*--------------------------------------------------

View file

@ -1533,7 +1533,7 @@ static boolean S_SoundTestDefLocked(musicdef_t *def)
return false;
// Is the level tied to SP progression?
if ((mapheaderinfo[def->sequence.map]->menuflags & LF2_FINISHNEEDED)
if ((mapheaderinfo[def->sequence.map]->menuflags & (LF2_FINISHNEEDED|LF2_HIDEINMENU))
&& !(mapheaderinfo[def->sequence.map]->records.mapvisited & MV_BEATEN))
return true;