- Use normal texture animation for the main menu cursors. This required updating animations

all the time and not just when inside a level.

SVN r2248 (trunk)
This commit is contained in:
Randy Heit 2010-03-27 03:30:02 +00:00
parent 7f2ab00abe
commit e83a9a2a00
3 changed files with 28 additions and 12 deletions

View File

@ -657,6 +657,7 @@ void D_Display ()
switch (gamestate)
{
case GS_FULLCONSOLE:
R_UpdateAnimations(I_MSTime());
screen->SetBlendingRect(0,0,0,0);
hw2d = screen->Begin2D(false);
C_DrawConsole (false);
@ -721,6 +722,7 @@ void D_Display ()
break;
case GS_INTERMISSION:
R_UpdateAnimations(I_MSTime());
screen->SetBlendingRect(0,0,0,0);
hw2d = screen->Begin2D(false);
WI_Drawer ();
@ -728,6 +730,7 @@ void D_Display ()
break;
case GS_FINALE:
R_UpdateAnimations(I_MSTime());
screen->SetBlendingRect(0,0,0,0);
hw2d = screen->Begin2D(false);
F_Drawer ();
@ -735,6 +738,7 @@ void D_Display ()
break;
case GS_DEMOSCREEN:
R_UpdateAnimations(I_MSTime());
screen->SetBlendingRect(0,0,0,0);
hw2d = screen->Begin2D(false);
D_PageDrawer ();

View File

@ -247,17 +247,10 @@ static char savegamestring[SAVESTRINGSIZE];
static FString EndString;
static short itemOn; // menu item skull is on
static short whichSkull; // which skull to draw
static int MenuTime;
static int InfoType;
static int InfoTic;
static const char skullName[2][9] = {"M_SKULL1", "M_SKULL2"}; // graphic name of skulls
static const char cursName[8][8] = // graphic names of Strife menu selector
{
"M_CURS1", "M_CURS2", "M_CURS3", "M_CURS4", "M_CURS5", "M_CURS6", "M_CURS7", "M_CURS8"
};
static oldmenu_t *currentMenu; // current menudef
static oldmenu_t *TopLevelMenu; // The main menu everything hangs off of
@ -3745,19 +3738,19 @@ void M_Drawer ()
}
else if (gameinfo.gametype & GAME_DoomChex)
{
screen->DrawTexture (TexMan[skullName[whichSkull]],
screen->DrawTexture (TexMan("M_SKULL1"),
x + SKULLXOFF, currentMenu->y - 5 + itemOn*LINEHEIGHT,
DTA_Clean, true, TAG_DONE);
}
else if (gameinfo.gametype == GAME_Strife)
{
screen->DrawTexture (TexMan[cursName[(MenuTime >> 2) & 7]],
screen->DrawTexture (TexMan("M_CURS1"),
x - 28, currentMenu->y - 5 + itemOn*LINEHEIGHT,
DTA_Clean, true, TAG_DONE);
}
else
{
screen->DrawTexture (TexMan[MenuTime & 16 ? "M_SLCTR1" : "M_SLCTR2"],
screen->DrawTexture (TexMan("M_SLCTR1"),
x + SELECTOR_XOFFSET,
currentMenu->y + itemOn*LINEHEIGHT + SELECTOR_YOFFSET,
DTA_Clean, true, TAG_DONE);
@ -3951,7 +3944,6 @@ void M_Ticker (void)
MenuTime++;
if (--skullAnimCounter <= 0)
{
whichSkull ^= 1;
skullAnimCounter = 8;
}
if (currentMenu == &PSetupDef || currentMenu == &ClassMenuDef)
@ -4005,7 +3997,6 @@ void M_Init (void)
menuactive = MENU_Off;
InfoType = 0;
itemOn = currentMenu->lastOn;
whichSkull = 0;
skullAnimCounter = 10;
drawSkull = true;
messageToPrint = 0;

View File

@ -1,3 +1,24 @@
// Doom menu cursor
texture optional M_SKULL1
pic M_SKULL1 tics 8
pic M_SKULL2 tics 8
// Heretic/Hexen menu cursor
texture optional M_SLCTR1
pic M_SLCTR1 tics 16
pic M_SLCTR2 tics 16
// Strife menu cursor
texture optional M_CURS1
pic M_CURS1 tics 4
pic M_CURS2 tics 4
pic M_CURS3 tics 4
pic M_CURS4 tics 4
pic M_CURS5 tics 4
pic M_CURS6 tics 4
pic M_CURS7 tics 4
pic M_CURS8 tics 4
// Tome of Power
texture optional SPINBK0
pic SPINBK0 tics 3