[Fixed] [r3455] Doom weapons don't have Inventory.Icon defined

Bugs that have been investigated and resolved somehow.

Moderator: Developers

[r3455] Doom weapons don't have Inventory.Icon defined

Postby wildweasel » Mon Apr 02, 2012 9:19 pm

I noticed this while making new SBARINFO HUDs - the default Doom weapons (possibly also the other IWADs) don't have Inventory.Icons defined, so this code would not display any icons on the center-bottom of the screen.
Code: Select allExpand view
height 18;

statusbar normal
{
   DrawImage "BarBase", 0, 178;
   DrawNumber 3, LCDNUMS, Untranslated, Health, Alignment(left), FillZeros, Interpolate(5), 105, 186, 1;
   DrawBar "BarFront", "BarBack", Health, horizontal, reverse, 29, 185;
   
   DrawImage weaponicon, 150, 186, center;
   DrawNumber 3, LCDNUMS, Untranslated, Ammo1, Alignment(left), FillZeros, WhenNotZero, 150, 186, 1;
}
User avatar
wildweasel
...huh.
 
Joined: 15 Jul 2003
Location: Non-euclidean space

Re: [r3455] Doom weapons don't have Inventory.Icon defined

Postby Graf Zahl » Sun Apr 22, 2012 4:09 am

I decided against adding icons to all weapons.

Instead, if the weapon doesn't have an icon, I let this call the code in the shared HUD that tries to get something usable as an icon from the weapon definition, so it first tries what's set in ALTHUDCF, then it looks at the spawn state's sprite, then at the Ready state's sprite.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: [r3455] Doom weapons don't have Inventory.Icon defined

Postby wildweasel » Sun Apr 22, 2012 4:56 pm

Fair enough; thanks.
User avatar
wildweasel
...huh.
 
Joined: 15 Jul 2003
Location: Non-euclidean space


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest