Althud health and ammo numbers flash when value is low... I don't know if I like this yet or not

can be disabled with "hud_flashing 0"


git-svn-id: https://svn.eduke32.com/eduke32@952 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-08-09 11:19:27 +00:00
parent ae32f428cd
commit 18614505b1
3 changed files with 13 additions and 8 deletions

View file

@ -149,6 +149,7 @@ extern void computergetinput(int snum, input_t *syn);
int althud_numbertile = 2930;
int althud_numberpal = 0;
int althud_shadows = 1;
int althud_flashing = 1;
enum
{
@ -2024,7 +2025,8 @@ static void coolgaugetext(int snum)
if (sprite[p->i].pal == 1 && p->last_extra < 2)
altdigitalnumber(40,-(200-22),1,-16,10+16);
else altdigitalnumber(40,-(200-22),p->last_extra,-16,10+16);
else if (!althud_flashing || p->last_extra > 25 || totalclock&32)
altdigitalnumber(40,-(200-22),p->last_extra,-16,10+16);
if (althud_shadows)
rotatesprite(sbarx(62+1),sbary(200-25+1),sbarsc(49152L),0,SHIELD,0,4,10+16+1+32,0,0,xdim-1,ydim-1);
@ -2051,7 +2053,9 @@ static void coolgaugetext(int snum)
if (p->curr_weapon == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
else i = p->curr_weapon;
altdigitalnumber(-20,-(200-22),p->ammo_amount[i],-16,10+16);
if (p->curr_weapon != KNEE_WEAPON &&
(!althud_flashing || totalclock&32 || p->ammo_amount[i] > (p->max_ammo_amount[i]/10)))
altdigitalnumber(-20,-(200-22),p->ammo_amount[i],-16,10+16);
o = 102;
permbit = 0;

View file

@ -6099,10 +6099,12 @@ static int parse(void)
if (tw == CON_SETSPRITE)
{
if (spritenum >= 0 && spritenum < MAXSPRITES)
setsprite(spritenum, x, y, z);
else
if (spritenum < 0 || spritenum >= MAXSPRITES)
{
OSD_Printf(CON_ERROR "CON_SETSPRITE: invalid sprite ID %d\n",line_num,spritenum);
break;
}
setsprite(spritenum, x, y, z);
break;
}

View file

@ -35,9 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern int voting, doquicksave;
struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
float r_ambientlight = 1.0, r_ambientlightrecip = 1.0;
extern int althud_numbertile;
extern int althud_numberpal;
extern int althud_shadows;
extern int althud_numbertile, althud_numberpal, althud_shadows, althud_flashing;
static inline int osdcmd_quit(const osdfuncparm_t *parm)
{
@ -663,6 +661,7 @@ cvarmappings cvar[] =
{ "hud_numbertile", "hud_numbertile: first tile in alt hud number set", (void*)&althud_numbertile, CVAR_INT, 0, 0, MAXTILES-10 },
{ "hud_numberpal", "hud_numberpal: pal for alt hud numbers", (void*)&althud_numberpal, CVAR_INT, 0, 0, MAXPALOOKUPS },
{ "hud_shadows", "hud_shadows: enable/disable althud shadows", (void*)&althud_shadows, CVAR_BOOL, 0, 0, 1 },
{ "hud_flashing", "hud_flashing: enable/disable althud flashing", (void*)&althud_flashing, CVAR_BOOL, 0, 0, 1 },
{ "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
{ "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
{ "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT|CVAR_MULTI, 0, 0, 2 },