mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
PrecacheLevelLocks: Automate naming SECRET_ALTMUSIC
Untested, might need to patch iF Oni runs into bugs
This commit is contained in:
parent
909eb7b6ef
commit
5aa71fb43e
1 changed files with 62 additions and 0 deletions
62
src/m_cond.c
62
src/m_cond.c
|
|
@ -1047,6 +1047,68 @@ static void M_PrecacheLevelLocks(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
mapheaderinfo[map]->cache_muslock[j - 1] = i;
|
mapheaderinfo[map]->cache_muslock[j - 1] = i;
|
||||||
|
|
||||||
|
const char *tempstr = NULL;
|
||||||
|
UINT8 positionid = 0;
|
||||||
|
|
||||||
|
if (mapheaderinfo[map]->cup)
|
||||||
|
{
|
||||||
|
for (positionid = 0; positionid < CUPCACHE_PODIUM; positionid++)
|
||||||
|
{
|
||||||
|
if (mapheaderinfo[map]->cup->cachedlevels[positionid] != map)
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (positionid < CUPCACHE_PODIUM)
|
||||||
|
{
|
||||||
|
char prefix = 'R';
|
||||||
|
if (positionid >= CUPCACHE_BONUS)
|
||||||
|
{
|
||||||
|
positionid -= (CUPCACHE_BONUS);
|
||||||
|
prefix = 'B';
|
||||||
|
}
|
||||||
|
|
||||||
|
tempstr = va(
|
||||||
|
"Music: %s Cup %c%u #%u",
|
||||||
|
mapheaderinfo[map]->cup->realname,
|
||||||
|
prefix,
|
||||||
|
positionid + 1,
|
||||||
|
j
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tempstr == NULL)
|
||||||
|
{
|
||||||
|
UINT16 mapcheck;
|
||||||
|
for (mapcheck = 0; mapcheck < map; mapcheck++)
|
||||||
|
{
|
||||||
|
if (!mapheaderinfo[mapcheck] || mapheaderinfo[mapcheck]->cup != NULL)
|
||||||
|
continue;
|
||||||
|
if (mapheaderinfo[mapcheck]->menuflags & (LF2_HIDEINSTATS|LF2_HIDEINMENU))
|
||||||
|
continue;
|
||||||
|
if (((mapheaderinfo[mapcheck]->typeoflevel & TOL_TUTORIAL) == TOL_TUTORIAL)
|
||||||
|
!= ((mapheaderinfo[map]->typeoflevel & TOL_TUTORIAL) == TOL_TUTORIAL))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// We don't check for locked, because the levels exist
|
||||||
|
positionid++;
|
||||||
|
}
|
||||||
|
|
||||||
|
tempstr = va(
|
||||||
|
"Music: %s #%u #%u",
|
||||||
|
(mapheaderinfo[map]->typeoflevel & TOL_TUTORIAL) ? "Tutorial" : "Lost and Found",
|
||||||
|
positionid + 1,
|
||||||
|
j
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tempstr != NULL)
|
||||||
|
{
|
||||||
|
strlcpy(unlockables[i].name, tempstr, sizeof (unlockables[i].name));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (j == mapheaderinfo[map]->musname_size)
|
if (j == mapheaderinfo[map]->musname_size)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue