mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 03:52:12 -04:00
remove "Animated Health/Armor Count" feature (#2222)
I expect that people who value this kind of feature are already running Nugget Doom anyway.
This commit is contained in:
parent
c529f82f0f
commit
8cd06b0d69
@ -1856,8 +1856,6 @@ static setup_menu_t stat_settings1[] = {
|
|||||||
{"Solid Background Color", S_ONOFF, H_X, M_SPC, {"st_solidbackground"},
|
{"Solid Background Color", S_ONOFF, H_X, M_SPC, {"st_solidbackground"},
|
||||||
.action = RefreshSolidBackground},
|
.action = RefreshSolidBackground},
|
||||||
|
|
||||||
{"Animated Health/Armor Count", S_ONOFF, H_X, M_SPC, {"hud_animated_counts"}},
|
|
||||||
|
|
||||||
MI_RESET,
|
MI_RESET,
|
||||||
|
|
||||||
MI_END
|
MI_END
|
||||||
|
@ -172,7 +172,6 @@ typedef struct
|
|||||||
int maxlength;
|
int maxlength;
|
||||||
int value;
|
int value;
|
||||||
int numvalues;
|
int numvalues;
|
||||||
int oldvalue;
|
|
||||||
int xoffset;
|
int xoffset;
|
||||||
} sbe_number_t;
|
} sbe_number_t;
|
||||||
|
|
||||||
|
@ -106,9 +106,6 @@
|
|||||||
// graphics are drawn to a backing screen and blitted to the real screen
|
// graphics are drawn to a backing screen and blitted to the real screen
|
||||||
static pixel_t *st_backing_screen = NULL;
|
static pixel_t *st_backing_screen = NULL;
|
||||||
|
|
||||||
// [Alaux]
|
|
||||||
static boolean hud_animated_counts;
|
|
||||||
|
|
||||||
static boolean sts_colored_numbers;
|
static boolean sts_colored_numbers;
|
||||||
|
|
||||||
static boolean sts_pct_always_gray;
|
static boolean sts_pct_always_gray;
|
||||||
@ -432,31 +429,6 @@ static boolean CheckConditions(sbarcondition_t *conditions, player_t *player)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [Alaux]
|
|
||||||
static int SmoothCount(int shownval, int realval)
|
|
||||||
{
|
|
||||||
int step = realval - shownval;
|
|
||||||
|
|
||||||
if (!hud_animated_counts || !step)
|
|
||||||
{
|
|
||||||
return realval;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int sign = step / abs(step);
|
|
||||||
step = BETWEEN(1, 7, abs(step) / 20);
|
|
||||||
shownval += (step + 1) * sign;
|
|
||||||
|
|
||||||
if ((sign > 0 && shownval > realval)
|
|
||||||
|| (sign < 0 && shownval < realval))
|
|
||||||
{
|
|
||||||
shownval = realval;
|
|
||||||
}
|
|
||||||
|
|
||||||
return shownval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ResolveNumber(sbe_number_t *number, player_t *player)
|
static int ResolveNumber(sbe_number_t *number, player_t *player)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
@ -465,21 +437,11 @@ static int ResolveNumber(sbe_number_t *number, player_t *player)
|
|||||||
switch (number->type)
|
switch (number->type)
|
||||||
{
|
{
|
||||||
case sbn_health:
|
case sbn_health:
|
||||||
if (number->oldvalue == -1)
|
result = player->health;
|
||||||
{
|
|
||||||
number->oldvalue = player->health;
|
|
||||||
}
|
|
||||||
result = SmoothCount(number->oldvalue, player->health);
|
|
||||||
number->oldvalue = result;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sbn_armor:
|
case sbn_armor:
|
||||||
if (number->oldvalue == -1)
|
result = player->armorpoints;
|
||||||
{
|
|
||||||
number->oldvalue = player->armorpoints;
|
|
||||||
}
|
|
||||||
result = SmoothCount(number->oldvalue, player->armorpoints);
|
|
||||||
number->oldvalue = result;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sbn_frags:
|
case sbn_frags:
|
||||||
@ -1081,11 +1043,6 @@ static void ResetElem(sbarelem_t *elem, player_t *player)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sbe_number:
|
|
||||||
case sbe_percent:
|
|
||||||
elem->subtype.number->oldvalue = -1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case sbe_widget:
|
case sbe_widget:
|
||||||
elem->subtype.widget->duration_left = 0;
|
elem->subtype.widget->duration_left = 0;
|
||||||
break;
|
break;
|
||||||
@ -1909,8 +1866,6 @@ void ST_BindSTSVariables(void)
|
|||||||
M_BindBool("st_solidbackground", &st_solidbackground, NULL,
|
M_BindBool("st_solidbackground", &st_solidbackground, NULL,
|
||||||
false, ss_stat, wad_no,
|
false, ss_stat, wad_no,
|
||||||
"Use solid-color borders for the status bar in widescreen mode");
|
"Use solid-color borders for the status bar in widescreen mode");
|
||||||
M_BindBool("hud_animated_counts", &hud_animated_counts, NULL,
|
|
||||||
false, ss_stat, wad_no, "Animated health/armor counts");
|
|
||||||
M_BindBool("hud_armor_type", &hud_armor_type, NULL, true, ss_none, wad_no,
|
M_BindBool("hud_armor_type", &hud_armor_type, NULL, true, ss_none, wad_no,
|
||||||
"Armor count is colored based on armor type");
|
"Armor count is colored based on armor type");
|
||||||
M_BindNum("health_red", &health_red, NULL, 25, 0, 200, ss_none, wad_yes,
|
M_BindNum("health_red", &health_red, NULL, 25, 0, 200, ss_none, wad_yes,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user