SBARINFO

Moderator: GZDoom Developers

Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Graf Zahl wrote:2. It's a bit of work but doable. If this really would help you I can do it but it's something I have to think about first.
As it is right now I need to make a command to check for custom weapon pieces (HasPiece <weapon>, <num>). To support Hexen's weapon pieces a separate command would be needed (HasHexenPiece <num>). It would probably be less work for me to handle both from SBarInfo's side, but it would result in a command that no one would use (and perhaps confusion for those who do wish to use it).

If you think that having the two SBarInfo commands would be better than I will go ahead with that plan.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49229
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

This is something I have been thinking about changing before so I'm going to do it. I don't like the current redundancy of the code. It's practically the same with some serious limitations in the Hexen version. But it might take a little to figure out how to do it properly.
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Replacing the mugshot code in doom_sbar.cpp is done. I added the ability to check if a weapon uses two ammo types so now the zdoom additions to the Heretic and Hexen status bar are possible. The hasweaponpeice command does not work with Hexen's forth weapons because of the difference mentioned in the last few posts.

Code: Select all

- Added: hasweaponpiece command to check for custom weapon pieces.
- Added: usessecondaryammo command to check if the current weapon has a second 
  ammo type.
- Most of SBarInfo's mugshot scripting can be used with the default Doom status 
  bar.
- Fixed: By default drawmugshot would never come out of normal god mode state.
  In addition the state change to and from god mode was not quite as responsive 
  as the original code.
Also could this FONTDEFS entry be added? Its the INDEXFONT for Heretic and Hexen. Its not needed for anything in ZDoom but it's small and will be useful for when I put the Heretic/Hexen status bar in the wiki.

Code: Select all

INDEXFONT_RAVEN
{
	0 SMALLIN0
	1 SMALLIN1
	2 SMALLIN2
	3 SMALLIN3
	4 SMALLIN4
	5 SMALLIN5
	6 SMALLIN6
	7 SMALLIN7
	8 SMALLIN8
	9 SMALLIN9
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49229
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

Something seems to be missing. Where's the Doom status bar's class definition? I can't find it.

Also, with this you should make SetMugshotState a virtual function in the base status bar class and remove the runtime class checks in p_acs.cpp.
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Whoops. Forgot that adding a file didn't include it in the diff.

Edit: The virtual function is not a bad idea. Do you want me to get rid of the doom_sbar.h then?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49229
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

I think it's best to revert doom_sbar.cpp to its old form and have the class locally defined.
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Assuming you haven't added the last patch here is a new one with the virtual function.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49229
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

I have added it but fortunately SVN has a revert option. ;)
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Here is a patch that should fix [r980] Mugshot oddities. Though it also includes anything I worked on since the last update.

Code: Select all

- Added: sigil image type to correctly draw the sigil's icon.
- Added: Strife inventory bar style.  This is the only style that is radically 
  different from the others.  First of all it changes the SELECTBO to be 
  INVCURS and draws it before the icons.  Each box is changed to have a width 
  of 35 pixels instead of 31 pixels.  And the INVCURS graphic is drawn at 
  (x-6, y-2).
- Added: whennnotzero flag to drawnumber which will cause it to draw nothing if 
  the value is 0.
- Fixed: New mugshot code would not leave the god state when it was supposed to 
  enter the rampage state.
- Fixed: The ouch state was mostly broken.
sniperchance
Posts: 68
Joined: Sun Apr 06, 2008 9:55 pm

Re: SBARINFO

Post by sniperchance »

I should mention that the Ouch face shows up every time you take damage when using the default hard coded Doom status bar, not a reproduction using SBARINFO.
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Has the patch on the mugshot oddities thread been seen?
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Code: Select all

- Fixed: Drawing the amount of an inventory item in the player's inventory did
  not work
- Added: PowerupTime to drawnumber and drawbar.  You must specify a 
  powerupgiver.  Although drawnumber goes in seconds the powerup has left
  drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag.  If an unknown 
  game mode is provided for sbarinfo's gamemode command it will ignore it and
  continue.
User avatar
Nash
 
 
Posts: 17489
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: SBARINFO

Post by Nash »

Blzut, do you think it would be possible to modify the globalarray command to "offset" the reference for mods that actually give the players a TID?
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: SBARINFO

Post by Jimmy »

I see the "powerup time" bars being useful for air counters after submerging in water. :D
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: SBARINFO

Post by Blzut3 »

Nash wrote:Blzut, do you think it would be possible to modify the globalarray command to "offset" the reference for mods that actually give the players a TID?
Why would this be useful?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”