SBARINFO

Moderator: GZDoom Developers

Post Reply
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

Never mind. I replaced one with a TArray and the other one with an FString.

Compiles now.
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 »

Yeah I use GCC since VC++ takes a year and a half to start, and I prefer my text editor over any other IDE I have used. Though can I ask what it was complaining about? I don't recall assuming anything should ever expand.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SBARINFO

Post by Graf Zahl »

Standard C++ wants indices of array declarations to be constant. In 2 places you used a variable expression to declare an array. I had to replace both with either a dynamic array or a string object to make it work. There was also another problem: Your calls to the pow function were ambiguous and needed some minor alteration.

(Yeah, the compiler differences really suck...)
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: SBARINFO

Post by Nash »

Very very nice! So is the Heretic/Hexen health gem implemented?
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 »

Not yet, but heretics interpolated health value is, so it is half there.
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 »

Update! Below is a list of changes. I implemented the drawgem (complete with wiggling). Of course I would like to know how heretic gets the chain to wrap around. I currently have it drawing the chain twice and placing the gem on the chains. The only problem I noticed with my approach is it looks ugly for widescreen users like myself.

Code: Select all

- Fixed: The user could have supplied an invalid accuracy for drawmugshot in 
  SBARINFO.
- Fixed: If ammo1 or ammo2 was used with bars it would not draw at all if the 
  weapon didn't supply the said ammo.  It should draw nothing if such is the 
  case.
- Added drawgem to SBARINFO.
- Added the ability to draw inventory.icon from any inventory item.  Just name 
  the item instead of putting a sprite name.
Attached is the diff.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: SBARINFO

Post by Nash »

Regarding the chain wrapping... can't you wrap it infinitely, like a horizontal floodfill?

(I know nothing about programming so please forgive me :))
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 »

I could add another two calls to draw the chain on the ends so it would look better. The problem is this would cause ZDoom to render (even if unnoticeably) slower. Additionally although I think my chain drawing is accurate it could vary well be off. Ideally I would want to get the image to wrap as it does in Heretic.

I have a question to Randy or Graf. Are there any proper ways to get the translations for the status bar image? I'm referring to the translations for the player color. (STFBANNY for example.) My current method only works in Doom (though I'm guessing it would work in Heretic if you used the same shades of green). In the worst case I could just figure out what game is running and adjust the translation table used.
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 »

I re-read the Heretic statusbar code at least 10 times looking for how the wrapping was done. I finally realized that the answer was it never does wrap it simply moves the chain at a maximum of 16 pixels to the right. So I figure it is best to break SBARINFOs using drawgem now while it has only been in for a day.

Here is the changelog:

Code: Select all

- SBARINFO should adjust the translationtables according to the game type.
- Changed drawgem to be more like the methods used for Heretic and Hexen, 
  although this will break any existing definitions it is worth it.
The new syntax is: drawgem [flags, ..., ] <chainimage>, <gemimage>, <leftpadding>, <rightpadding>, <chainsize>, x, y; Chain size represents the amount of pixels that the chain image should shift.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: SBARINFO

Post by Nash »

Can you update the documentation?
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 »

Lemonzest
Posts: 327
Joined: Tue Oct 12, 2004 3:19 pm
Location: On your boards, trolling your threads!!!

Re: SBARINFO

Post by Lemonzest »

Any demo wad of what can be done with this?
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 »

I do not have an demo since everything I made with it is just test cases with the original statusbars. Nash could probably provide an demo if he wanted.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: SBARINFO

Post by Nash »

Yeah, I'm working on it. It'll be a recreation of this ACS-based HUD:

Image
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: SBARINFO

Post by Kinsie »

Holy crap, it's a christmas miracle!

Thanks Bluzt and Graf!
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”