SBARINFO

Moderator: GZDoom Developers

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

Re: SBARINFO

Post by Blzut3 »

It doesn't have conditional statements so no. You can however do everything besides the numbers with this and combine it with ACS status bars.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: SBARINFO

Post by Nash »

Nice work, Blzut! In its current state, there is more than enough to completely replicate my RPG's custom HUD. Finally I can get rid of that huge-ass ACS HUD loop of mine and save some cycles...
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

I did some further testing with this. Apparently I fail memory allocation as ZDoom is crashing if I don't write SBarInfo in a certain way (which is strange because I put no effort in the ordering of the Doom Statusbar). So I guess I need to find a way to make sure that the proper memory is allocated to the SBarInfoCommand struct.

Edit: No it can't be the SBarInfoCommand struct as it gets though the parsing without crashing just fine.

Edit 2: Yay, crash fixed. Apparently what was causing it was I forgot to allocate 4 bytes to lastPrefix in FSBarInfo. I attached the updates to sbarinfo.cpp and sbarinfo.h (I doubt you will need a new diff for that but I can make a new one on request). Hopefully this covers the errors. I suppose I'll find out shortly.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: SBARINFO

Post by Nash »

How will you handle the chain for Heretic and Hexen's status bar? That would probably require an expression because the X coordinate of the graphic will constantly change...

Also some misc stuff to consider.

Heretic:
- Gargoyle's eyes light up when player is invulnerable.
- Health chain shakes up and down when player is damaged.
- Shadow is applied to the chain as it gets closer into the gargoyle's mouth.

Hexen:
- Health chain doesn't shake.
- Health number turns red when it's low.
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

The chains will be handled with their own command, which would take a argument for a gem image and a chain image. I never noticed the shaking before but that will just be a flag (kind of like reverse on drawbar).

The gargoyle's eyes I plan on just adding a new identifier to drawswitchableimage. I'm not sure how I'm going to do the shadows on the Heretic status bar yet.

When it comes time to do the hexen statusbar support I'll figure out what to do with the numbers. I'll probably also consider Boom's statusbar while doing them so it can be done without ACS also.

In the mean time I trying to resist adding anything until Graf or Randy approves of the code.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: SBARINFO

Post by Nash »

Good to hear. I'm having a lot of fun with this.

Can you teach me how to merge your source into the SVN trunk? I'd like to compile my own EXE without using your compiled EXE...
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

Nash wrote:Can you teach me how to merge your source into the SVN trunk? I'd like to compile my own EXE without using your compiled EXE...
If you are using TortoiseSVN like myself go to the directory that references /zdoom/trunk/ and than right click->TortoiseSVN->Apply Patch. Then find the diff in my source release (see page 2). And it should merge the changes. Than download my update on this page.

If you are not using TortoiseSVN then the best way would probably be to open the .diff with a text editor. They're pretty easy to read, for example:

Code: Select all

Index: src/g_level.cpp
===================================================================
--- src/g_level.cpp	(revision 592)
+++ src/g_level.cpp	(working copy)
@@ -72,6 +72,7 @@
 #include "m_menu.h"
 #include "statnums.h"
 #include "vectors.h"
+#include "sbarinfo.h"
 
 #include "gi.h"
Means find:

Code: Select all

#include "m_menu.h"
#include "statnums.h"
#include "vectors.h"
In g_level.cpp and then after add:

Code: Select all

#include "sbarinfo.h"
Repeat until you get to the sbarinfo.* stuff in which case just download the update on this page and put the files in /src/g_shared/.
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: SBARINFO

Post by Cutmanmike »

I hope there's some way you can disable custom HUDs if this gets in :|
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49225
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

If a WAD needs a custom status bar, logically the associated HUD overlay will be used - even if you don't like it.
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: SBARINFO

Post by Cutmanmike »

Aww crud. Even if they DON'T need one and they're just trying to be fancy? The custom one in Simplicity drove me insane, and attempting to turn it off gave me a lovely pink blob of a line across the bottom of the screen :(
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49225
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

Understandable. But with the new code it's different because it'd behave like a regular status bar/fullscreen HUD so all the hacky side effects won't be there.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: SBARINFO

Post by Nash »

Cutty, you know you can just delete the SBARINFO lump from the WAD if the new HUD really annoys you...
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: SBARINFO

Post by Cutmanmike »

Good point :wink:
User avatar
Lazureus
Posts: 60
Joined: Sun Jul 08, 2007 7:35 am

Re: SBARINFO

Post by Lazureus »

Also, cutman, you have to keep in mind, wads that do not use the clip/shells/rockets/cells ammo types will have useless and unnecessary information displayed on the status bar, in which a custom status bar would be more ideal. I'm not sure why you would still want to use the doom status bar in this case, as it does not even display alternate ammo or support arms for 8 9 or 0 or custom ammo type display on the right-hand side... and various other things. :)
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: SBARINFO

Post by Cutmanmike »

Well I wasn't specificly talking about the doom one. With simplicity you couldn't even hide the custom hud because you were given a ugly mess of pink if you tried.

Return to “Closed Feature Suggestions [GZDoom]”