SBARINFO

Moderator: GZDoom Developers

User avatar
Nash
 
 
Posts: 17513
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: SBARINFO

Post by Nash »

Although hacky, image scaling (to simulate high resolution for example) for the status bar by replacing your low-res alternatives using the HIRESTEX lump.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: SBARINFO

Post by Kate »

A useful property would be Anchor Location, which would specify which corner of the screen the specified graphic should float towards when scaling is off. Valid locations would be topleft, bottomleft, topright, bottomright, topedge, bottomedge, leftedge, rightedge, and center.
User avatar
wildweasel
Posts: 21707
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: SBARINFO

Post by wildweasel »

That reminds me, there needs to be a third option for status bar scaling. Currently we can have it unscaled, or scaled to 320x200 - so why not allow a "double" mode like with the messages?
Blzut3
 
 
Posts: 3219
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

I'm not sure a double mode is easily possible since the status bar code seems to want a 320x200 field. The easiest thing to do would be to implement the mode the full screen status bars use however I would need a way to pick up negative numbers.

Graf/Randy, is there any reason TK_IntConst doesn't pick up negative numbers?
User avatar
randi
Site Admin
Posts: 7750
Joined: Wed Jul 09, 2003 10:30 pm

Re: SBARINFO

Post by randi »

Because it was meant to be fed into a parser that can distinguish between e.g. 200-300 and -300, where in the first case - is subtraction and in the second case it's negation. It shouldn't be handling negative numbers directly in the scanner, because then it would misread the first case as 200, -300 instead of as 200, -, 300.
Blzut3
 
 
Posts: 3219
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

I see. I guess I need to just add a CheckToken for '-' to read negatives, will do later.

I've prepared update #7. I haven't been able to directly test everything that has been added but it should all work.

Code: Select all

- Added drawstring to SBARINFO.
- Added animatedgodmode flag to drawmugshot, also changed the flags to use the 
  standard named arguments instead of numbers.  The old way is considered 
  deprecated.
- Added kills, monsters, items, totalitems, secrets, and totalsecrets to
  drawnumber.  Drawbar can also use kills, items, and secrets.
- Added weaponicon to drawimage which will display the inventory.icon of the 
  currently selected weapon.
- Fixed: I apparently forgot to add the "rampage" face to drawmugshot.
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: SBARINFO

Post by Ghastly »

Heh, now I need an inventory.icon for all 13 weapons in my mod XD.

Looking great thus far! I just need a graphic for the bar, then I'll start on my own custom status bar :D.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA

Re: SBARINFO

Post by Project Shadowcat »

- Added animatedgodmode flag to drawmugshot, also changed the flags to use the standard named arguments instead of numbers. The old way is considered deprecated.
How do you take advantage of this new feature?
Blzut3
 
 
Posts: 3219
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

Project Dark Fox wrote:
- Added animatedgodmode flag to drawmugshot, also changed the flags to use the standard named arguments instead of numbers. The old way is considered deprecated.
How do you take advantage of this new feature?
I'll have the needed information in the wiki in a few minutes.

In the meantime here is my really small update #8 to SBarInfo the only thing it does is fix the memory leaks in draw bar that were apparently causing crashing on systems with 3x the amount of memory that I have. :lol:

Code: Select all

- Fixed: Drawbar had a few memory leaks.
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm

Re: SBARINFO

Post by MG_Man »

Wow! This hcas come a ling way since it first started! Keep it up! 8D

EDIT: Hey, I just thought of something that could make vertical item columns work out for next and prev. A flag that reverses which way goes where.

However, I can imagine this being harder to code than a 1-way only kinda thing.

I also have a small feature suggestion, is it possible to code in that forcescaled works on the fullscreen HUD? Thanks.
Blzut3
 
 
Posts: 3219
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

Update #9 (A WIP update was committed to the SVN so the changelog is a tad smaller then it should have been.)

Code: Select all

- Fixed: When using even length values in drawnumber it would cap to a 98 value 
  instead of a 99 as intended.
- The SBarInfo parser can now accept negatives for coordinates.  This doesn't 
  allow much right now, but later I plan to add better fullscreen hud support 
  in which the negatives will be more useful.  This also cleans up the source 
  a bit since all calls for (x, y) coordinates are with the fucntion 
  getCoordinates().
Hopefully all the crashing has been fixed. The version I sent to Project Dark Fox was incompatible with Randy's changes, but the WIP code it was based on should have already fixed the crashing.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA

Re: SBARINFO

Post by Project Shadowcat »

Blzut3 wrote:The version I sent to Project Dark Fox was incompatible with Randy's changes, but the WIP code it was based on should have already fixed the crashing.
I feel so special. ^_^ *shot*
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ

Re: SBARINFO

Post by DoomRater »

I can't believe this was created without me ever knowing about it until I saw it implenented in a GZDoom release.

Digesting syntax info now, hopefully will have something to show later.
Blzut3
 
 
Posts: 3219
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

New update! I'm getting pretty close to completing the Hexen status bar stuff. Mostly armor stuff.

Code: Select all

- Fixed: drawmugshot now adjust to the player's max health like it should.
- drawgem can now accept negative paddings.
- Added: You can now specify a border on drawbar which will reserve x amount of 
  pixels on each side of the fg image.
- Added: weaponammo command which allows for determining what kind of ammo the 
  current weapon uses.
- Added: Drawkeybar to SBarInfo
Blzut3
 
 
Posts: 3219
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: SBARINFO

Post by Blzut3 »

Here is update #11. The only real addition is "completeborder" which will continue the border instead of drawing a HOM.

Code: Select all

- SBarInfo will also accept a '|' between flags for those who are really 
  bothered by the indefinite "arguments" in the middle of the statement.
- Added: completeBorder.  When set to true SBarInfo will draw the border where 
  the status bar normally goes.
- Fixed: I forgot to accept TK_None on "base" and "statusbar".
- Fixed: "base" was apparently broken when the SBarInfo init code was moved to 
  d_main.cpp.  Also, if "base Strife" was used then it would not use the 
  default log message of "find help".

Return to “Closed Feature Suggestions [GZDoom]”