Bug: STFBANY offsets ignored without SBARINFO lump?

Discuss all aspects related to modding Zandronum here.
Post Reply
Foxpup
New User
Posts: 2
Joined: Tue May 12, 2015 9:37 am

Bug: STFBANY offsets ignored without SBARINFO lump?

#1

Post by Foxpup » Tue May 12, 2015 9:54 am

Hi, all! I'm making a custom status bar for a vanilla WAD, but I'm testing it in various source ports just to see if there are any weird bugs that will prevent it from working properly, and I think I just found one. The offsets given for the STFBANY graphic are simply ignored, resulting in it being drawn totally out of position. (I know STFBANY isn't used by vanilla, but I want the status bar to look good in ZDoom, which incidentally doesn't have this bug.) This seems to be specific to STFBANY, as my STKEYS* graphics have non-zero offsets as well, but they're drawn correctly. All graphics are in Doom patch format.

I'm using Zandronum 2.0-r150329-1954, and the bug occurs in both hardware and software modes. Here's the WAD demonstrating the issue: freewebs.com/foxpup/SBARBUG.WAD (29,055 bytes) Load it up in multiplayer (or with bots) and observe the obviously out-of-position graphic:
Image

But wait, there's more! This is where it gets weird. The bug disappears if the WAD includes a SBARINFO lump that does nothing but load the default Doom status bar (which ought to already be loaded by, well, default). I discovered this by accident by copying zandronum.pk3/sbarinfo/doom.txt into my WAD and fiddling with the offsets to see if that might be a viable workaround, only to find that it somehow works correctly with the original offsets. Here's the same WAD with a SBARINFO lump that consists entirely of the text "base Doom;": freewebs.com/foxpup/SBARFIX.WAD (29,081 bytes) Notice that the status bar is now correctly aligned for no obvious reason (except for the 1 in 100%, which got deformed somehow without me even messing with it :hmm: ):
Image

This isn't really a good workaround as it unnecessarily blows away any custom status bar that people might want to use alongside my WAD, and I also don't generally like using workarounds without knowing why they work - that tends to just cause more problems later. So, what on Earth is going on here?
Last edited by Foxpup on Tue May 12, 2015 10:00 am, edited 1 time in total.

Oxyde
New User
Posts: 18
Joined: Fri Jun 22, 2012 12:41 am
Location: France
Contact:

RE: Bug: STFBANY offsets ignored without SBARINFO lump?

#2

Post by Oxyde » Tue May 12, 2015 2:31 pm

I just want to say this looks fantastic!
As for your issue; have you tried making the STFBANY graphica 320px wide image where the armor is in the center? I don't know if this could work but I've no other idea as I've never used SBARINFO!

Foxpup
New User
Posts: 2
Joined: Tue May 12, 2015 9:37 am

RE: Bug: STFBANY offsets ignored without SBARINFO lump?

#3

Post by Foxpup » Tue May 12, 2015 5:41 pm

Oxyde wrote: I just want to say this looks fantastic!
Thank you!
Oxyde wrote: As for your issue; have you tried making the STFBANY graphica 320px wide image where the armor is in the center?
There's absolutely no reason for that to work, but I went ahead and tried it anyway. As I expected, the extra width does nothing expect push the whole graphic halfway off the screen to the right. It is always drawn with the top-right corner at the same location as the original graphic without regard to the graphic's size or offsets.
Oxyde wrote: I don't know if this could work but I've no other idea as I've never used SBARINFO!
I've never used SBARINO either. I just know that it works for some reason, even though simply reloading the default status bar ought to have no effect whatsoever. (It must be reloaded; an empty SBARINFO lump doesn't solve anything.)

I can also confirm that this bug is not present in GZDoom 1.5.0 (r900).

Blzut3
Developer
Posts: 309
Joined: Thu May 24, 2012 9:37 pm

RE: Bug: STFBANY offsets ignored without SBARINFO lump?

#4

Post by Blzut3 » Tue May 12, 2015 8:35 pm

Zandronum still uses the hard coded status bar by default as a relic from Skulltag. Which reminds me, I really need to get around to looking into migrating us off of that.

So yes, despite it seeming like a hack (and I'm glad you're questioning the behavior), your SBARINFO lump is a valid solution to your problem since what you're effectively doing is opting into the current ZDoom behavior.

Post Reply