mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 12:50:44 +00:00
Make character cursor framerate-independent
This commit is contained in:
parent
a4090db7b9
commit
2fe0555e3f
1 changed files with 12 additions and 12 deletions
24
src/m_menu.c
24
src/m_menu.c
|
@ -9141,12 +9141,13 @@ Update the maxplayers label...
|
|||
|
||||
if (itemOn == 2 && i == setupm_pselect)
|
||||
{
|
||||
static UINT8 cursorframe = 0;
|
||||
if (skullAnimCounter % 4 == 0)
|
||||
cursorframe++;
|
||||
if (cursorframe > 7)
|
||||
cursorframe = 0;
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, 0, W_CachePatchName(va("K_BHILI%d", cursorframe+1), PU_CACHE), NULL);
|
||||
static fixed_t cursorframe = 0;
|
||||
|
||||
cursorframe += renderdeltatics / 4;
|
||||
if (cursorframe > 7 * FRACUNIT)
|
||||
cursorframe -= 7 * FRACUNIT;
|
||||
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, 0, W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE), NULL);
|
||||
}
|
||||
|
||||
x += incrwidth;
|
||||
|
@ -9487,16 +9488,15 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
|||
fixed_t scale = FRACUNIT/2;
|
||||
INT32 offx = 8, offy = 8;
|
||||
patch_t *cursor;
|
||||
static UINT8 cursorframe = 0;
|
||||
static fixed_t cursorframe = 0;
|
||||
patch_t *face;
|
||||
UINT8 *colmap;
|
||||
|
||||
if (skullAnimCounter % 4 == 0)
|
||||
cursorframe++;
|
||||
if (cursorframe > 7)
|
||||
cursorframe = 0;
|
||||
cursorframe += renderdeltatics / 4;
|
||||
if (cursorframe > 7 * FRACUNIT)
|
||||
cursorframe -= 7 * FRACUNIT;
|
||||
|
||||
cursor = W_CachePatchName(va("K_BHILI%d", cursorframe+1), PU_CACHE);
|
||||
cursor = W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE);
|
||||
|
||||
if (col < 0)
|
||||
col += numskins;
|
||||
|
|
Loading…
Reference in a new issue