Bug: STFBANY offsets ignored without SBARINFO lump?
Posted: 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:

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
):

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?
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:
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
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?