mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Challenges menu visual adjustment
* Use the new background * Use clipped rectangles instead of black pixel overdraw, so pre-baked darkened areas in the new background can be visible instead
This commit is contained in:
parent
5bdbbd1695
commit
f9e0c0a444
1 changed files with 16 additions and 28 deletions
|
|
@ -1926,8 +1926,6 @@ static void M_DrawCupPreview(INT16 y, levelsearch_t *levelsearch)
|
||||||
INT16 map, start = M_GetFirstLevelInList(&i, levelsearch);
|
INT16 map, start = M_GetFirstLevelInList(&i, levelsearch);
|
||||||
UINT8 starti = i;
|
UINT8 starti = i;
|
||||||
|
|
||||||
V_DrawFill(0, y, BASEVIDWIDTH, 54, 31);
|
|
||||||
|
|
||||||
if (levelsearch->cup && maxlevels > 0)
|
if (levelsearch->cup && maxlevels > 0)
|
||||||
{
|
{
|
||||||
add = (cupgrid.previewanim / 82) % maxlevels;
|
add = (cupgrid.previewanim / 82) % maxlevels;
|
||||||
|
|
@ -2060,7 +2058,9 @@ void M_DrawCupSelect(void)
|
||||||
|
|
||||||
templevelsearch.cup = cupgrid.builtgrid[CUPMENU_CURSORID];
|
templevelsearch.cup = cupgrid.builtgrid[CUPMENU_CURSORID];
|
||||||
|
|
||||||
|
V_DrawFill(0, 146 + (24*menutransition.tics), BASEVIDWIDTH, 54, 31);
|
||||||
M_DrawCupPreview(146 + (24*menutransition.tics), &templevelsearch);
|
M_DrawCupPreview(146 + (24*menutransition.tics), &templevelsearch);
|
||||||
|
|
||||||
M_DrawCupTitle(120 - (24*menutransition.tics), &templevelsearch);
|
M_DrawCupTitle(120 - (24*menutransition.tics), &templevelsearch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4518,7 +4518,8 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
|
||||||
patch_t *pat = missingpat;
|
patch_t *pat = missingpat;
|
||||||
UINT8 *colormap = NULL;
|
UINT8 *colormap = NULL;
|
||||||
fixed_t siz;
|
fixed_t siz;
|
||||||
UINT8 id, num, work;
|
UINT8 id, num;
|
||||||
|
UINT32 edgelength;
|
||||||
|
|
||||||
id = (i * CHALLENGEGRIDHEIGHT) + j;
|
id = (i * CHALLENGEGRIDHEIGHT) + j;
|
||||||
num = gamedata->challengegrid[id];
|
num = gamedata->challengegrid[id];
|
||||||
|
|
@ -4526,19 +4527,19 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
|
||||||
// Empty spots in the grid are always unconnected.
|
// Empty spots in the grid are always unconnected.
|
||||||
if (num >= MAXUNLOCKABLES)
|
if (num >= MAXUNLOCKABLES)
|
||||||
{
|
{
|
||||||
V_DrawFill(x, y, 16, 16, challengesbordercolor);
|
|
||||||
goto drawborder;
|
goto drawborder;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Okay, this is what we want to draw.
|
// Okay, this is what we want to draw.
|
||||||
ref = &unlockables[num];
|
ref = &unlockables[num];
|
||||||
|
|
||||||
|
edgelength = (ref->majorunlock ? 30 : 14);
|
||||||
|
|
||||||
// ...unless we simply aren't unlocked yet.
|
// ...unless we simply aren't unlocked yet.
|
||||||
if ((gamedata->unlocked[num] == false)
|
if ((gamedata->unlocked[num] == false)
|
||||||
|| (challengesmenu.pending && num == challengesmenu.currentunlock && challengesmenu.unlockanim <= UNLOCKTIME))
|
|| (challengesmenu.pending && num == challengesmenu.currentunlock && challengesmenu.unlockanim <= UNLOCKTIME))
|
||||||
{
|
{
|
||||||
work = (ref->majorunlock) ? 2 : 1;
|
V_DrawFill(x+1, y+1, edgelength, edgelength,
|
||||||
V_DrawFill(x, y, 16*work, 16*work,
|
|
||||||
((challengesmenu.extradata[id] == CHE_HINT) ? 132 : 11));
|
((challengesmenu.extradata[id] == CHE_HINT) ? 132 : 11));
|
||||||
goto drawborder;
|
goto drawborder;
|
||||||
}
|
}
|
||||||
|
|
@ -4589,6 +4590,12 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
|
||||||
siz = (SHORT(pat->width) << FRACBITS);
|
siz = (SHORT(pat->width) << FRACBITS);
|
||||||
siz = FixedDiv(((ref->majorunlock) ? 32 : 16) << FRACBITS, siz);
|
siz = FixedDiv(((ref->majorunlock) ? 32 : 16) << FRACBITS, siz);
|
||||||
|
|
||||||
|
V_SetClipRect(
|
||||||
|
(x+1) << FRACBITS, (y+1) << FRACBITS,
|
||||||
|
edgelength << FRACBITS, edgelength << FRACBITS,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
V_DrawFixedPatch(
|
V_DrawFixedPatch(
|
||||||
x*FRACUNIT, y*FRACUNIT,
|
x*FRACUNIT, y*FRACUNIT,
|
||||||
siz,
|
siz,
|
||||||
|
|
@ -4596,19 +4603,11 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
|
||||||
colormap
|
colormap
|
||||||
);
|
);
|
||||||
|
|
||||||
|
V_ClearClipRect();
|
||||||
|
|
||||||
drawborder:
|
drawborder:
|
||||||
if (!hili)
|
if (!hili)
|
||||||
{
|
{
|
||||||
if (ref != NULL)
|
|
||||||
{
|
|
||||||
work = 16 * (ref->majorunlock ? 2 : 1);
|
|
||||||
// Horizontal
|
|
||||||
V_DrawFill(x, y , work, 1, challengesbordercolor);
|
|
||||||
V_DrawFill(x, y + work-1, work, 1, challengesbordercolor);
|
|
||||||
// Vertical
|
|
||||||
V_DrawFill(x , y+1, 1, work-2, challengesbordercolor);
|
|
||||||
V_DrawFill(x + work-1, y+1, 1, work-2, challengesbordercolor);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4628,7 +4627,6 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
|
||||||
|
|
||||||
if (challengesmenu.currentunlock >= MAXUNLOCKABLES)
|
if (challengesmenu.currentunlock >= MAXUNLOCKABLES)
|
||||||
{
|
{
|
||||||
V_DrawFill(0, 146, BASEVIDWIDTH, 54, challengesbordercolor);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4638,13 +4636,9 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
|
||||||
if (!gamedata->unlocked[challengesmenu.currentunlock])
|
if (!gamedata->unlocked[challengesmenu.currentunlock])
|
||||||
{
|
{
|
||||||
// todo draw some sort of question mark?
|
// todo draw some sort of question mark?
|
||||||
V_DrawFill(0, 146, BASEVIDWIDTH, 54, challengesbordercolor);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ref->type != SECRET_CUP)
|
|
||||||
V_DrawFill(0, 146, BASEVIDWIDTH, 54, challengesbordercolor);
|
|
||||||
|
|
||||||
switch (ref->type)
|
switch (ref->type)
|
||||||
{
|
{
|
||||||
case SECRET_SKIN:
|
case SECRET_SKIN:
|
||||||
|
|
@ -4812,7 +4806,7 @@ void M_DrawChallenges(void)
|
||||||
INT16 offset;
|
INT16 offset;
|
||||||
|
|
||||||
{
|
{
|
||||||
patch_t *bg = W_CachePatchName("M_XTRABG", PU_CACHE);
|
patch_t *bg = W_CachePatchName("BGUNLCK2", PU_CACHE);
|
||||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, bg, NULL);
|
V_DrawFixedPatch(0, 0, FRACUNIT, 0, bg, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4847,15 +4841,10 @@ void M_DrawChallenges(void)
|
||||||
i = gamedata->challengegridwidth-1;
|
i = gamedata->challengegridwidth-1;
|
||||||
explodex = x - (i*16)/2;
|
explodex = x - (i*16)/2;
|
||||||
x += (i*16)/2;
|
x += (i*16)/2;
|
||||||
|
|
||||||
V_DrawFill(0, currentMenu->y, explodex, (CHALLENGEGRIDHEIGHT*16), challengesbordercolor);
|
|
||||||
V_DrawFill((x+16), currentMenu->y, BASEVIDWIDTH - (x+16), (CHALLENGEGRIDHEIGHT*16), challengesbordercolor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectx = explodex + (challengesmenu.hilix*16);
|
selectx = explodex + (challengesmenu.hilix*16);
|
||||||
|
|
||||||
V_DrawFill(0, (currentMenu->y)-1 , BASEVIDWIDTH, 1, challengesbordercolor);
|
|
||||||
V_DrawFill(0, (currentMenu->y) + (CHALLENGEGRIDHEIGHT*16), BASEVIDWIDTH, 1, challengesbordercolor);
|
|
||||||
while (i >= 0 && x >= -32)
|
while (i >= 0 && x >= -32)
|
||||||
{
|
{
|
||||||
y = currentMenu->y-16;
|
y = currentMenu->y-16;
|
||||||
|
|
@ -4910,7 +4899,6 @@ challengedesc:
|
||||||
// Name bar
|
// Name bar
|
||||||
{
|
{
|
||||||
y = 120;
|
y = 120;
|
||||||
V_DrawScaledPatch(0, y, 0, W_CachePatchName("MENUHINT", PU_CACHE));
|
|
||||||
|
|
||||||
if (challengesmenu.currentunlock < MAXUNLOCKABLES)
|
if (challengesmenu.currentunlock < MAXUNLOCKABLES)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue