mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
M_DrawCupPreview: Show static in place of courses which would not be accessible via Match Race (visitation/head of cupcache/NoVisitNeeded)
This commit is contained in:
parent
83366b6507
commit
21e2be41db
1 changed files with 31 additions and 16 deletions
|
|
@ -2687,24 +2687,28 @@ void M_DrawRaceDifficulty(void)
|
||||||
|
|
||||||
// LEVEL SELECT
|
// LEVEL SELECT
|
||||||
|
|
||||||
static void M_DrawCupPreview(INT16 y, levelsearch_t *levelsearch)
|
static void M_DrawCupPreview(INT16 y, levelsearch_t *baselevelsearch)
|
||||||
{
|
{
|
||||||
|
levelsearch_t locklesslevelsearch = *baselevelsearch; // full copy
|
||||||
|
locklesslevelsearch.checklocked = false;
|
||||||
|
|
||||||
UINT8 i = 0;
|
UINT8 i = 0;
|
||||||
INT16 maxlevels = M_CountLevelsToShowInList(levelsearch);
|
INT16 maxlevels = M_CountLevelsToShowInList(&locklesslevelsearch);
|
||||||
const fixed_t step = (82 * FRACUNIT);
|
const fixed_t step = (82 * FRACUNIT);
|
||||||
fixed_t previewanimwork = (cupgrid.previewanim * FRACUNIT) + rendertimefrac_unpaused;
|
fixed_t previewanimwork = (cupgrid.previewanim * FRACUNIT) + rendertimefrac_unpaused;
|
||||||
fixed_t x = -(previewanimwork % step);
|
fixed_t x = -(previewanimwork % step);
|
||||||
INT16 add;
|
INT16 map, start = M_GetFirstLevelInList(&i, &locklesslevelsearch);
|
||||||
INT16 map, start = M_GetFirstLevelInList(&i, levelsearch);
|
|
||||||
UINT8 starti = i;
|
UINT8 starti = i;
|
||||||
|
|
||||||
if (levelsearch->cup && maxlevels > 0)
|
patch_t *staticpat = unvisitedlvl[cupgrid.previewanim % 4];
|
||||||
|
|
||||||
|
if (baselevelsearch->cup && maxlevels > 0)
|
||||||
{
|
{
|
||||||
add = (previewanimwork / step) % maxlevels;
|
INT16 add = (previewanimwork / step) % maxlevels;
|
||||||
map = start;
|
map = start;
|
||||||
while (add > 0)
|
while (add > 0)
|
||||||
{
|
{
|
||||||
map = M_GetNextLevelInList(map, &i, levelsearch);
|
map = M_GetNextLevelInList(map, &i, &locklesslevelsearch);
|
||||||
|
|
||||||
if (map >= nummapheaders)
|
if (map >= nummapheaders)
|
||||||
{
|
{
|
||||||
|
|
@ -2721,24 +2725,35 @@ static void M_DrawCupPreview(INT16 y, levelsearch_t *levelsearch)
|
||||||
i = starti;
|
i = starti;
|
||||||
}
|
}
|
||||||
|
|
||||||
K_DrawMapThumbnail(
|
if (M_CanShowLevelInList(map, baselevelsearch))
|
||||||
x + FRACUNIT, (y+2)<<FRACBITS,
|
{
|
||||||
80<<FRACBITS,
|
K_DrawMapThumbnail(
|
||||||
0,
|
x + FRACUNIT, (y+2)<<FRACBITS,
|
||||||
map,
|
80<<FRACBITS,
|
||||||
NULL);
|
0,
|
||||||
|
map,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
V_DrawFixedPatch(
|
||||||
|
x + FRACUNIT, (y+2) * FRACUNIT,
|
||||||
|
FRACUNIT,
|
||||||
|
0,
|
||||||
|
staticpat,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
x += step;
|
x += step;
|
||||||
|
|
||||||
map = M_GetNextLevelInList(map, &i, levelsearch);
|
map = M_GetNextLevelInList(map, &i, &locklesslevelsearch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (x < BASEVIDWIDTH * FRACUNIT)
|
while (x < BASEVIDWIDTH * FRACUNIT)
|
||||||
{
|
{
|
||||||
patch_t *st = unvisitedlvl[cupgrid.previewanim % 4];
|
V_DrawFixedPatch(x + FRACUNIT, (y+2) * FRACUNIT, FRACUNIT, 0, staticpat, NULL);
|
||||||
V_DrawFixedPatch(x + FRACUNIT, (y+2) * FRACUNIT, FRACUNIT, 0, st, NULL);
|
|
||||||
x += step;
|
x += step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue