mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Challenges Menu: Highlight overlay for newly unlocked tiles that haven't yet been focused on
Game design solution to the problem of multiple Challenges being unlocked at once not being clear enough. Uses the `unlockpending` array for gamedata save purposes, which I was always intending to use for this purpose but never quite got around to.
This commit is contained in:
parent
aad69b5209
commit
966ce7a256
2 changed files with 28 additions and 5 deletions
|
|
@ -6389,7 +6389,7 @@ void M_DrawAddons(void)
|
||||||
|
|
||||||
// Challenges Menu
|
// Challenges Menu
|
||||||
|
|
||||||
static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili)
|
static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, UINT8 *flashmap, boolean hili)
|
||||||
{
|
{
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
extern consvar_t cv_debugchallenges;
|
extern consvar_t cv_debugchallenges;
|
||||||
|
|
@ -6710,6 +6710,13 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
|
||||||
}
|
}
|
||||||
|
|
||||||
drawborder:
|
drawborder:
|
||||||
|
|
||||||
|
if (num < MAXUNLOCKABLES && gamedata->unlockpending[num])
|
||||||
|
{
|
||||||
|
INT32 area = (ref->majorunlock) ? 42 : 20;
|
||||||
|
V_DrawFadeFill(x, y, area, area, 0, flashmap[(skullAnimCounter/5) ? 99 : 101], 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (hili)
|
if (hili)
|
||||||
{
|
{
|
||||||
boolean maj = (ref != NULL && ref->majorunlock);
|
boolean maj = (ref != NULL && ref->majorunlock);
|
||||||
|
|
@ -6719,13 +6726,11 @@ drawborder:
|
||||||
buffer[7] = (skullAnimCounter/5) ? '2' : '1';
|
buffer[7] = (skullAnimCounter/5) ? '2' : '1';
|
||||||
pat = W_CachePatchName(buffer, PU_CACHE);
|
pat = W_CachePatchName(buffer, PU_CACHE);
|
||||||
|
|
||||||
colormap = R_GetTranslationColormap(TC_DEFAULT, M_GetCvPlayerColor(0), GTC_MENUCACHE);
|
|
||||||
|
|
||||||
V_DrawFixedPatch(
|
V_DrawFixedPatch(
|
||||||
x*FRACUNIT, y*FRACUNIT,
|
x*FRACUNIT, y*FRACUNIT,
|
||||||
FRACUNIT,
|
FRACUNIT,
|
||||||
0, pat,
|
0, pat,
|
||||||
colormap
|
flashmap
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7519,6 +7524,8 @@ void M_DrawChallenges(void)
|
||||||
goto challengedesc;
|
goto challengedesc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT8 *flashmap = R_GetTranslationColormap(TC_DEFAULT, M_GetCvPlayerColor(0), GTC_MENUCACHE);
|
||||||
|
|
||||||
y = currentMenu->y;
|
y = currentMenu->y;
|
||||||
|
|
||||||
V_DrawFadeFill(0, y-2, BASEVIDWIDTH, (challengesgridstep * CHALLENGEGRIDHEIGHT) + 2, 0, 31, challengetransparentstrength);
|
V_DrawFadeFill(0, y-2, BASEVIDWIDTH, (challengesgridstep * CHALLENGEGRIDHEIGHT) + 2, 0, 31, challengetransparentstrength);
|
||||||
|
|
@ -7572,7 +7579,7 @@ void M_DrawChallenges(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
M_DrawChallengeTile(i, j, x, y, false);
|
M_DrawChallengeTile(i, j, x, y, flashmap, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
x -= challengesgridstep;
|
x -= challengesgridstep;
|
||||||
|
|
@ -7592,6 +7599,7 @@ void M_DrawChallenges(void)
|
||||||
challengesmenu.hiliy,
|
challengesmenu.hiliy,
|
||||||
selectx,
|
selectx,
|
||||||
selecty,
|
selecty,
|
||||||
|
flashmap,
|
||||||
true);
|
true);
|
||||||
M_DrawCharSelectExplosions(false, explodex, currentMenu->y);
|
M_DrawCharSelectExplosions(false, explodex, currentMenu->y);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -766,6 +766,21 @@ void M_ChallengesTick(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (challengesmenu.currentunlock < MAXUNLOCKABLES
|
||||||
|
&& gamedata->unlockpending[challengesmenu.currentunlock] == true)
|
||||||
|
{
|
||||||
|
UINT16 id = (challengesmenu.hilix * CHALLENGEGRIDHEIGHT) + challengesmenu.hiliy;
|
||||||
|
if (challengesmenu.extradata
|
||||||
|
&& challengesmenu.extradata[id].flip != (TILEFLIP_MAX/2))
|
||||||
|
{
|
||||||
|
// Only mark visited once flipped
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gamedata->unlockpending[challengesmenu.currentunlock] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue