Second pass at representing stacked information

Lots of internal discussion on my last approach, so here's a cleaner alternative
- No more offset with two complex flickering graphics on top of each other
- Instead, "less common" secondary info is represented by a coloured dot overlaid on the primary icon
    - Red for SPB Attack, Turquoise for Mystic Melody
- Only show Spray Can/Mystic Melody for Race-compatible courses
- Show courses where you haven't picked up a Spray Can with a dot
This commit is contained in:
toaster 2025-02-22 22:32:15 +00:00
parent 89afe780df
commit 5fad786b8f

View file

@ -3294,11 +3294,10 @@ void M_DrawCupSelect(void)
struct work_array_t { struct work_array_t {
emblem_t *medal; emblem_t *medal;
UINT16 col; UINT16 col;
UINT8 mapvisited; UINT16 dotcol;
} work_array[CUPCACHE_MAX]; } work_array[CUPCACHE_MAX];
boolean incj = false; boolean incj = false;
boolean showalternate = (skullAnimCounter & 4);
i = j = 0; i = j = 0;
@ -3313,8 +3312,7 @@ void M_DrawCupSelect(void)
incj = false; incj = false;
work_array[j].medal = NULL; work_array[j].medal = NULL;
work_array[j].col = UINT16_MAX; work_array[j].col = work_array[j].dotcol = UINT16_MAX;
work_array[j].mapvisited = 0;
if (templevelsearch.timeattack) if (templevelsearch.timeattack)
{ {
@ -3344,29 +3342,27 @@ void M_DrawCupSelect(void)
{ {
incj = true; incj = true;
if ((gamedata->collected[emblem-emblemlocations]) if (gamedata->collected[emblem-emblemlocations])
&& showalternate)
{ {
work_array[j].medal = emblem; work_array[j].dotcol = M_GetEmblemColor(emblem);
} }
} }
emblem = M_GetLevelEmblems(-1); emblem = M_GetLevelEmblems(-1);
} }
} }
else else if ((gamedata->gotspraycans > 0) && (mapheaderinfo[map]->typeoflevel & TOL_RACE))
{ {
incj = true;
if (mapheaderinfo[map]->cache_spraycan < gamedata->numspraycans) if (mapheaderinfo[map]->cache_spraycan < gamedata->numspraycans)
{ {
work_array[j].col = gamedata->spraycans[mapheaderinfo[map]->cache_spraycan].col; work_array[j].col = gamedata->spraycans[mapheaderinfo[map]->cache_spraycan].col;
incj = true;
} }
if ((mapheaderinfo[map]->records.mapvisited & MV_MYSTICMELODY) if (mapheaderinfo[map]->records.mapvisited & MV_MYSTICMELODY)
&& (incj == false || showalternate))
{ {
work_array[j].mapvisited |= MV_MYSTICMELODY; work_array[j].dotcol = SKINCOLOR_TURQUOISE;
incj = true;
} }
} }
@ -3392,23 +3388,45 @@ void M_DrawCupSelect(void)
for (i = 0; i < j; i++) for (i = 0; i < j; i++)
{ {
if (work_array[i].medal) if (templevelsearch.timeattack)
{ {
V_DrawMappedPatch(x, y, 0, W_CachePatchName(M_GetEmblemPatch(work_array[i].medal, false), PU_CACHE), if (work_array[i].medal)
R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(work_array[i].medal), GTC_MENUCACHE)); {
} // Primary Medal
else if (work_array[i].mapvisited & MV_MYSTICMELODY)
{ V_DrawMappedPatch(x, y, 0, W_CachePatchName(M_GetEmblemPatch(work_array[i].medal, false), PU_CACHE),
V_DrawScaledPatch(x, y, 0, W_CachePatchName("GOTMEL", PU_CACHE)); R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(work_array[i].medal), GTC_MENUCACHE));
} }
else if (work_array[i].col < numskincolors) else
{ {
V_DrawMappedPatch(x, y, 0, W_CachePatchName("GOTCAN", PU_CACHE), // Need it!
R_GetTranslationColormap(TC_DEFAULT, work_array[i].col, GTC_MENUCACHE));
V_DrawScaledPatch(x, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
}
} }
else else
{ {
V_DrawScaledPatch(x, y, 0, W_CachePatchName("NEEDIT", PU_CACHE)); if (work_array[i].col < numskincolors)
{
// Spray Can
V_DrawMappedPatch(x, y, 0, W_CachePatchName("GOTCAN", PU_CACHE),
R_GetTranslationColormap(TC_DEFAULT, work_array[i].col, GTC_MENUCACHE));
}
else
{
// Need it!
V_DrawFill(x+3, y+3, 2, 2, 20);
}
}
if (work_array[i].dotcol < numskincolors)
{
// Bonus (Secondary Medal or Ancient Shrine)
V_DrawMappedPatch(x+4, y+7, 0, W_CachePatchName("COLORSP1", PU_CACHE),
R_GetTranslationColormap(TC_DEFAULT, work_array[i].dotcol, GTC_MENUCACHE));
} }
x += 10; x += 10;