PrintBold is the same as Print

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.
Post Reply
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

PrintBold is the same as Print

Post by Ichor »

After wracking my head on a problem for the past several days, I believe I have finally discovered the cause: a bug...a very old bug from the looks of things. Using PrintBold will print out the text in white as opposed to yellow in Hexen and Heretic, and yellow as opposed to whatever it is in Doom and Doom 2 (never actually tried it) and last for a much shorter time. I thought this was recent like that DONTTRANSLATE crash, but I've tried numerous versions, even as far back as ZDoom 2.1.0, and this is still present even back then. Here is a test map, made with Hexen textures, but it will function in Doom 2 (if you don't mind the checkerboard and !'s). Another way to test it is to play the Hexen wad and go to map 2. Then use puke 32 or puke 33 to print out what should be a yellow message ("A DOOR OPENED ON THE GUARDIAN OF ICE") , but it's white and disappears quickly like it used Print.
Attachments
texttest.zip
(1.33 KiB) Downloaded 23 times
Last edited by Ichor on Fri Jul 21, 2017 3:54 am, edited 1 time in total.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: PrintBold is the same as Print

Post by Caligari87 »

[wiki]PrintBold[/wiki]
The Wiki wrote:This is exactly the same as Print, except all players will see the printed text on the screen instead of just the activator of the script. It also uses a different default color. For a detailed description of the syntax, refer to Print.
8-)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PrintBold is the same as Print

Post by Graf Zahl »

It's definitely missing the proper colorization and the longer duration. Considering, however, that there's probably 18 years of mods depending on this quirk I'm not sure what to do here. Reinstating the original behavior may cause some unforeseen problems with ZDoom based user mods that take the current behavior for granted.
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: PrintBold is the same as Print

Post by Ichor »

I don't think anyone has even noticed this, or someone might have mentioned it long ago, even in passing. Even I didn't notice until I started messing with FontDefs (emptied a container of Advil over that one). PrintBold does display to everyone like it should, but the color and duration are what's off. I'm guessing if anything, the mods and Hexen wads are more likely to depend on the original behavior, and for those mods that would "break", the damage would be minimal.
XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: PrintBold is the same as Print

Post by XxMiltenXx »

Couldn't you just add a new function like "PrintBoldEx"? Even though it doesn't really "extend" the use, it can be used as a fixed version while the normal PrintBold stays "buggy" for compatibility.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: PrintBold is the same as Print

Post by Gez »

From a cursory look at the code it should work. PrintBold does use PRINTLEVEL+1 color, which is the PrintBold color. I don't know where the bug is; but imo it should be fixed.

As for backward compatibility, the worst thing that happens is a cosmetic difference for messages that haven't used custom colors. Not worth worrying about. Besides, it'd make it fit the documented behavior.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PrintBold is the same as Print

Post by Graf Zahl »

The problem is that ACS does not call C_MidPrintBold:

Code: Select all

				if (pcd == PCD_ENDPRINTBOLD || screen == NULL ||
					screen->CheckLocalView (consoleplayer))
				{
					C_MidPrint (activefont, work);
				}
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: PrintBold is the same as Print

Post by Ichor »

Oh nice. I wonder when this thing started. I could only go back to 2.1.0 for testing, as anything further than that crashed because Windows 7.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PrintBold is the same as Print

Post by Graf Zahl »

This bug has been present ever since ACS support got added - long before the Hexen source was released.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PrintBold is the same as Print

Post by Graf Zahl »

As I feared, even a casual check for maps that might be affected here yields sufficient evidence that there's no way to fix this without causing a mess.
I'll enable proper behavior for native Hexen maps and through a MAPINFO option but that's the best I can do here without making things worse.
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: PrintBold is the same as Print

Post by Ichor »

Graf Zahl wrote:As I feared, even a casual check for maps that might be affected here yields sufficient evidence that there's no way to fix this without causing a mess.
I'll enable proper behavior for native Hexen maps and through a MAPINFO option but that's the best I can do here without making things worse.
What is the name of the option for this?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PrintBold is the same as Print

Post by Graf Zahl »

'correctprintbold' in the 'gameinfo' section.
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: PrintBold is the same as Print

Post by Ichor »

Oh ok. Thank you.

I must have missed that in the wiki.
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: PrintBold is the same as Print

Post by Ichor »

I noticed that the text delay for PrintBold is still the same as Print. It prints yellow now, but it still lasts for 4 seconds instead of 20 (5*MESSAGETICS).
Post Reply

Return to “Closed Bugs [GZDoom]”