mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'morehints' into 'next'
Allow for 10 emblem hints on a map by poking the drawer a bit. See merge request STJr/SRB2!650
This commit is contained in:
commit
2491046bc2
1 changed files with 31 additions and 9 deletions
40
src/m_menu.c
40
src/m_menu.c
|
@ -7227,12 +7227,26 @@ static void M_EmblemHints(INT32 choice)
|
|||
|
||||
static void M_DrawEmblemHints(void)
|
||||
{
|
||||
INT32 i, j = 0;
|
||||
UINT32 collected = 0;
|
||||
INT32 i, j = 0, x, y;
|
||||
UINT32 collected = 0, local = 0;
|
||||
emblem_t *emblem;
|
||||
const char *hint;
|
||||
|
||||
for (i = 0; i < numemblems; i++)
|
||||
{
|
||||
emblem = &emblemlocations[i];
|
||||
if (emblem->level != gamemap || emblem->type > ET_SKIN)
|
||||
continue;
|
||||
if (++local >= NUMHINTS*2)
|
||||
break;
|
||||
}
|
||||
|
||||
x = (local > NUMHINTS ? 4 : 12);
|
||||
y = 8;
|
||||
|
||||
if (!local)
|
||||
V_DrawCenteredString(160, 48, V_YELLOWMAP, "No hidden emblems on this map.");
|
||||
else for (i = 0; i < numemblems; i++)
|
||||
{
|
||||
emblem = &emblemlocations[i];
|
||||
if (emblem->level != gamemap || emblem->type > ET_SKIN)
|
||||
|
@ -7241,27 +7255,35 @@ static void M_DrawEmblemHints(void)
|
|||
if (emblem->collected)
|
||||
{
|
||||
collected = V_GREENMAP;
|
||||
V_DrawMappedPatch(12, 12+(28*j), 0, W_CachePatchName(M_GetEmblemPatch(emblem, false), PU_PATCH),
|
||||
V_DrawMappedPatch(x, y+4, 0, W_CachePatchName(M_GetEmblemPatch(emblem, false), PU_PATCH),
|
||||
R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
collected = 0;
|
||||
V_DrawScaledPatch(12, 12+(28*j), 0, W_CachePatchName("NEEDIT", PU_PATCH));
|
||||
V_DrawScaledPatch(x, y+4, 0, W_CachePatchName("NEEDIT", PU_PATCH));
|
||||
}
|
||||
|
||||
if (emblem->hint[0])
|
||||
hint = emblem->hint;
|
||||
else
|
||||
hint = M_GetText("No hints available.");
|
||||
hint = M_GetText("No hint available for this emblem.");
|
||||
hint = V_WordWrap(40, BASEVIDWIDTH-12, 0, hint);
|
||||
V_DrawString(40, 8+(28*j), V_RETURN8|V_ALLOWLOWERCASE|collected, hint);
|
||||
if (local > NUMHINTS)
|
||||
V_DrawThinString(x+28, y, V_RETURN8|V_ALLOWLOWERCASE|collected, hint);
|
||||
else
|
||||
V_DrawString(x+28, y, V_RETURN8|V_ALLOWLOWERCASE|collected, hint);
|
||||
|
||||
if (++j >= NUMHINTS)
|
||||
y += 28;
|
||||
|
||||
if (++j == NUMHINTS)
|
||||
{
|
||||
x = 4+(BASEVIDWIDTH/2);
|
||||
y = 8;
|
||||
}
|
||||
else if (j >= NUMHINTS*2)
|
||||
break;
|
||||
}
|
||||
if (!j)
|
||||
V_DrawCenteredString(160, 48, V_YELLOWMAP, "No hidden emblems on this map.");
|
||||
|
||||
M_DrawGenericMenu();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue