mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-19 20:12:01 +00:00
Cup icon drawing
This commit is contained in:
parent
32bdd10dbf
commit
cf8a77cfd6
3 changed files with 38 additions and 4 deletions
|
|
@ -1481,7 +1481,10 @@ static void readcupheader(MYFILE *f, cupheader_t *cup)
|
|||
}
|
||||
else if (fastcmp(word, "EMERALDNUM"))
|
||||
{
|
||||
cup->emeraldnum = (INT16)i;
|
||||
if (i >= 0 && i <= 14)
|
||||
cup->emeraldnum = (UINT8)i;
|
||||
else
|
||||
deh_warning("%s Cup: invalid emerald number %d", cup->name, i);
|
||||
}
|
||||
else
|
||||
deh_warning("%s Cup: unknown word '%s'", cup->name, word);
|
||||
|
|
|
|||
|
|
@ -912,12 +912,44 @@ void M_DrawCupSelect(void)
|
|||
{
|
||||
for (j = 0; j < CUPS_ROWS; j++)
|
||||
{
|
||||
V_DrawFill(14 + (i*42), 22 + (j*40) - (15*menutransition.tics), 39, 38, 31);
|
||||
UINT8 id = (i + (j * CUPS_COLUMNS));
|
||||
cupheader_t *iconcup = kartcupheaders;
|
||||
patch_t *patch = NULL;
|
||||
INT16 x, y;
|
||||
INT16 icony = 7;
|
||||
|
||||
while (iconcup)
|
||||
{
|
||||
if (iconcup->id == id)
|
||||
break;
|
||||
iconcup = iconcup->next;
|
||||
}
|
||||
|
||||
if (!iconcup)
|
||||
break;
|
||||
|
||||
/*if (iconcup->emeraldnum == 0)
|
||||
patch = W_CachePatchName("CUPMON3A", PU_CACHE);
|
||||
else*/ if (iconcup->emeraldnum > 7)
|
||||
{
|
||||
patch = W_CachePatchName("CUPMON2A", PU_CACHE);
|
||||
icony = 5;
|
||||
}
|
||||
else
|
||||
patch = W_CachePatchName("CUPMON1A", PU_CACHE);
|
||||
|
||||
x = 14 + (i*42);
|
||||
y = 20 + (j*44) - (15*menutransition.tics);
|
||||
|
||||
V_DrawScaledPatch(x, y, 0, patch);
|
||||
|
||||
V_DrawScaledPatch(x + 8, y + icony, 0, W_CachePatchName(iconcup->icon, PU_CACHE));
|
||||
V_DrawScaledPatch(x + 8, y + icony, 0, W_CachePatchName("CUPBOX", PU_CACHE));
|
||||
}
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(14 + (levellist_cupgrid.x*42) - 4,
|
||||
22 + (levellist_cupgrid.y*40) - 4 - (12*menutransition.tics),
|
||||
20 + (levellist_cupgrid.y*44) - 1 - (12*menutransition.tics),
|
||||
0, W_CachePatchName("CUPCURS", PU_CACHE)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -2150,7 +2150,6 @@ void M_CupSelectHandler(INT32 choice)
|
|||
|
||||
while (newcup)
|
||||
{
|
||||
CONS_Printf("%d == %d?\n", newcup->id, CUPID);
|
||||
if (newcup->id == CUPID)
|
||||
break;
|
||||
newcup = newcup->next;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue