mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Modify the modern mini-HUD so that:
1. Instead of the Mighty Foot using the Protective Boots inventory item as its icon, display no icon at all. 2. Adjust the ammo icon so that it is drawn at one-quarter size if its y-size is >=50 instead of >50. This fixes the display of Water Pistol Ammo in Duke Caribbean. git-svn-id: https://svn.eduke32.com/eduke32@5057 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
97025d9fc7
commit
a81be01914
1 changed files with 7 additions and 5 deletions
|
@ -2009,14 +2009,14 @@ static void G_DrawStatusBar(int32_t snum)
|
|||
int32_t hudoffset = althud == 2 ? 32 : 200;
|
||||
static int32_t ammo_sprites[MAX_WEAPONS];
|
||||
|
||||
if (ammo_sprites[0] == 0)
|
||||
if (EDUKE32_PREDICT_FALSE(ammo_sprites[0] == 0))
|
||||
{
|
||||
/* this looks stupid but it lets us initialize static memory to dynamic values
|
||||
these values can be changed from the CONs with dynamic tile remapping
|
||||
but we don't want to have to recreate the values in memory every time
|
||||
the HUD is drawn */
|
||||
|
||||
int32_t asprites[MAX_WEAPONS] = { BOOTS, AMMO, SHOTGUNAMMO, BATTERYAMMO,
|
||||
int32_t asprites[MAX_WEAPONS] = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO,
|
||||
RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO,
|
||||
TRIPBOMBSPRITE, FREEZEAMMO+1, HBOMBAMMO, GROWAMMO
|
||||
};
|
||||
|
@ -2045,10 +2045,12 @@ static void G_DrawStatusBar(int32_t snum)
|
|||
lAmount = p->inv_amount[GET_SHIELD];
|
||||
G_DrawAltDigiNum(105,-(hudoffset-22),lAmount,-16,10+16+256);
|
||||
}
|
||||
|
||||
i = (tilesiz[ammo_sprites[p->curr_weapon]].y > 50) ? 16384 : 32768;
|
||||
|
||||
rotatesprite_althudr(57,hudoffset-15,sbarsc(i),0,ammo_sprites[p->curr_weapon],0,0,10+512);
|
||||
if (ammo_sprites[p->curr_weapon] >= 0)
|
||||
{
|
||||
i = (tilesiz[ammo_sprites[p->curr_weapon]].y >= 50) ? 16384 : 32768;
|
||||
rotatesprite_althudr(57,hudoffset-15,sbarsc(i),0,ammo_sprites[p->curr_weapon],0,0,10+512);
|
||||
}
|
||||
|
||||
if (PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
|
||||
else i = p->curr_weapon;
|
||||
|
|
Loading…
Reference in a new issue