mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Precache static level graphics
This commit is contained in:
parent
9e3ca7a59b
commit
601b39378d
3 changed files with 8 additions and 1 deletions
|
|
@ -97,6 +97,7 @@ static char hu_tick;
|
|||
|
||||
patch_t *missingpat;
|
||||
patch_t *blanklvl, *nolvl;
|
||||
patch_t *unvisitedlvl[4];
|
||||
|
||||
// song credits
|
||||
static patch_t *songcreditbg;
|
||||
|
|
@ -196,6 +197,11 @@ void HU_LoadGraphics(void)
|
|||
HU_UpdatePatch(&blanklvl, "BLANKLVL");
|
||||
HU_UpdatePatch(&nolvl, "M_NOLVL");
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
HU_UpdatePatch(&unvisitedlvl[i], "PREVST0%d", i+1);
|
||||
}
|
||||
|
||||
HU_UpdatePatch(&songcreditbg, "K_SONGCR");
|
||||
|
||||
// cache ping gfx:
|
||||
|
|
|
|||
|
|
@ -2724,9 +2724,9 @@ static void M_DrawCupPreview(INT16 y, levelsearch_t *levelsearch)
|
|||
}
|
||||
else
|
||||
{
|
||||
patch_t *st = W_CachePatchName(va("PREVST0%d", (cupgrid.previewanim % 4) + 1), PU_CACHE);
|
||||
while (x < BASEVIDWIDTH * FRACUNIT)
|
||||
{
|
||||
patch_t *st = unvisitedlvl[cupgrid.previewanim % 4];
|
||||
V_DrawFixedPatch(x + FRACUNIT, (y+2) * FRACUNIT, FRACUNIT, 0, st, NULL);
|
||||
x += step;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -900,6 +900,7 @@ struct patch_t
|
|||
|
||||
extern patch_t *missingpat;
|
||||
extern patch_t *blanklvl, *nolvl;
|
||||
extern patch_t *unvisitedlvl[4];
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue