SBARINFO doesn't scale to resolution

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

I can't seem to get my hud addon for Hideous Destructor to scale across resolution like it should. I've already asked Wildweasel for help, but he can't seem to figure it out either.

By all means, it should be scaling, but it's not.

http://www.mediafire.com/download/cedlv ... udV4.1.pk3

I am using the latest dev build also. Of course, that's sort of mandatory with Hideous Destructor nowadays....

The proper resolution this was made for is 1400x900.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

Okay, this is interesting.

I could be wrong, but it LOOKS like it might have to do with GZDoom being unable to scale graphics that are already set to scale in SBARINFO. It seems to scale like it should if I don't have any scaling set up on the HUD, in SBARINFO.

That mean anything?
User avatar
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Re: SBARINFO doesn't scale to resolution

Post by Alekv »

Your file does not open .. no actors are used in sbarinfo
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

Uh....it does open on my end.

You don't use actors in SBARINFO. That's a DECORATE thing.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: SBARINFO doesn't scale to resolution

Post by wildweasel »

Alekv wrote:Your file does not open .. no actors are used in sbarinfo
If it's complaining about referencing actors that do not exist, you need to load DarkHud with Hideous Destructor.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

Okay, i'm 100% certain that something's a bit screwed up with hud_scale. And I mean the console command.

I've been toying around with things here, and it seems that if hud_scale is true, then the graphics don't properly scale to resolution like they ought to. But if it's FALSE, then it scales. Now granted, this means it's TINY, but....
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: SBARINFO doesn't scale to resolution

Post by MG_Man »

HUD scaling has been overhauled in a recent SVN version. Now there is a "uiscale" cvar that trumps the hud_scale cvar. I think this is what's going on here. uiscale works as a direct scale factor. Setting it to 1 does 1x pixel size, 2 does 2x pixel size, and so on. Set it to 0 to use the old method.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

MG_Man wrote:HUD scaling has been overhauled in a recent SVN version. Now there is a "uiscale" cvar that trumps the hud_scale cvar. I think this is what's going on here. uiscale works as a direct scale factor. Setting it to 1 does 1x pixel size, 2 does 2x pixel size, and so on. Set it to 0 to use the old method.
That's interesting, although no, that's not what's responsible here. I was having this problem long before uiscale was even implemented, MG_Man.

No matter what uiscale is set to, the placement and scaling of HUD elements seem to vary from resolution to resolution.
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 doesn't scale to resolution

Post by Graf Zahl »

The mod doesn't work and the SBARINFO is so huge that it's pointless to check for coding errors. Either post something that works or I'll close the report.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

Graf Zahl wrote:The mod doesn't work and the SBARINFO is so huge that it's pointless to check for coding errors. Either post something that works or I'll close the report.
Not sure what you mean by not working, Graf. It works just fine alongside Hideous Destructor on my end. It's just that the HUD scaling is nonfunctional.
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 doesn't scale to resolution

Post by Graf Zahl »

Ok, I missed the HD thing. Anyway, to me it looks like it scales perfectly but some coordinates are not correct so stuff is in the wrong place. I'm nearly convinced that the error is on your side somewhere, but don't expect me to sift through that huge thing to find your problem. Can you trim down the HUD to a smaller number of items so that someone has a chance to analyze the code?
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

Here is the basic code for just the background image and such:

Code: Select all

Height 0;
Resolution 320,200;
CompleteBorder True;
Statusbar Fullscreen,FullscreenOffsets
InInventory not gimmehud
{
DrawImage "VisorHud",0,0;
DrawString "DARKFNT1",untranslated,"VITALS",-163,5;
DrawImage "ECGBACK",165,16,none,25,25;
DrawString "DARKFNT1",untranslated,"INVENTORY",-287,5;
DrawString "DARKFNT1",untranslated,"WEAPON:",-304,170;
DrawString "DARKFNT1",untranslated,"ARMOR",-10,170;
DrawString "DARKFNT1",untranslated,"AMMO",-8,65;
(It drags on and on after this so I cut it off)
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 doesn't scale to resolution

Post by Graf Zahl »

Ok, that seems to explain it already. You have to understand how the SBARINFO alignment works, unfortunately it uses a somewhat obtuse specification:

- positive x-values get aligned to the left screen border
- negative x-values get aligned to the right screen border
- positive y-values get aligned to the top screen border
- negative y-values get aligned to the bottom screen border.

So all the stuff in your last post gets right aligned, and it looks like you try to overlay it with left-aligned things. And that cannot work.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: SBARINFO doesn't scale to resolution

Post by Silentdarkness12 »

A lot of my other image files have Center set for alignment. So in order to fix it, would I have to set all these graphics back to none, and then manually tweak the positions so they fit again?.....
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 doesn't scale to resolution

Post by Graf Zahl »

You have to use the same alignment rules for stuff that needs to be overlaid. So if a box is right aligned, so must be its content.
Post Reply

Return to “Closed Bugs [GZDoom]”