Add a funny little rotating question mark ala SA1 character select

This commit is contained in:
toaster 2023-01-04 17:23:18 +00:00
parent f9e0c0a444
commit 06e7eb3567
3 changed files with 27 additions and 1 deletions

View file

@ -789,6 +789,8 @@ char sprnames[NUMSPRITES + 1][5] =
"UFOA", "UFOA",
"UFOS", "UFOS",
"UQMK",
// First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later
"VIEW", "VIEW",
}; };

View file

@ -1340,6 +1340,8 @@ typedef enum sprite
SPR_UFOA, SPR_UFOA,
SPR_UFOS, SPR_UFOS,
SPR_UQMK,
// First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later
SPR_VIEW, SPR_VIEW,

View file

@ -4633,9 +4633,31 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
// Okay, this is what we want to draw. // Okay, this is what we want to draw.
ref = &unlockables[challengesmenu.currentunlock]; ref = &unlockables[challengesmenu.currentunlock];
// Funny question mark?
if (!gamedata->unlocked[challengesmenu.currentunlock]) if (!gamedata->unlocked[challengesmenu.currentunlock])
{ {
// todo draw some sort of question mark? spritedef_t *sprdef = &sprites[SPR_UQMK];
spriteframe_t *sprframe;
patch_t *patch;
UINT32 useframe;
UINT32 addflags = 0;
if (!sprdef->numframes)
{
return;
}
useframe = (challengesmenu.ticker / 2) % sprdef->numframes;
sprframe = &sprdef->spriteframes[useframe];
patch = W_CachePatchNum(sprframe->lumppat[0], PU_CACHE);
if (sprframe->flip & 1) // Only for first sprite
{
addflags ^= V_FLIP; // This sprite is left/right flipped!
}
V_DrawFixedPatch(x*FRACUNIT, (y+6)*FRACUNIT, FRACUNIT, addflags, patch, NULL);
return; return;
} }