PSX Doom HUD is a mess in my mod... why?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

PSX Doom HUD is a mess in my mod... why?

Post by Hidden Hands »

Look at the screenshot below. I'm making a DOOM mod and have used some elements from the PLAYSTATION Doom, including HUD and other things. But this is what's happening when I look at it. The status face is way off because it's using the original DOOM II face, and also the NUMBER FONT is WAY off. That's not the PSX number font... that's not even the DOOM II number font, so what is it and where is it coming from?

I have all the numbers in the wad, so why is it selecting this weird font instead?

Also, the right side where it shows how many weapon you have only ever shows "2". Even if you have every weapon. WTF?

Can someone help explain to me whats going on and how to fix it?

Code: Select all

Height 32;
MonospaceFonts true, "0";

MugShot "XDeath"
{
	EXP0 4;
	EXP1 4;
	EXP2 4;
	EXP3 4;
	EXP4 4;
	NULL -1;
}

StatusBar Normal
{
	DrawImage "PHUDBAR", 0, 168;
	
	DrawNumber 3, HUDFONT_PSXDOOM, Untranslated, Ammo1, 49, 172;
	DrawNumber 3, HUDFONT_PSXDOOM, Untranslated, Health, 103, 172;
	DrawNumber 3, HUDFONT_PSXDOOM, Untranslated, Armor, 224, 172;
	
	/* PSX Doom has "combined" key icons in multiplayer by displaying the skulls
		on top of the cards */
	DrawSwitchableImage keyslot 1, "", "PHUDKEY2", 125, 172;
	DrawSwitchableImage keyslot 2, "", "PHUDKEY0", 125, 180;
	DrawSwitchableImage keyslot 3, "", "PHUDKEY1", 125, 188;

	DrawSwitchableImage keyslot 4, "", "PHUDKEY5", 127, 172;
	DrawSwitchableImage keyslot 5, "", "PHUDKEY3", 127, 180;
	DrawSwitchableImage keyslot 6, "", "PHUDKEY4", 127, 188;
	
    DrawMugshot 5, XDeathFace, 148, 169;
	
	GameMode deathmatch, teamgame
	{
		/* Couldn't get the frags text to line up with the other text
		so I left this "as is" incase if someone fixes the graphic for this */
		DrawImage "PHUDFRAG", 260, 189;		
		DrawNumber 3, HUDFONT_PSXDOOM, Untranslated, Frags, 301, 172;
	}
	
	GameMode cooperative, singleplayer
	{
		DrawImage "PHUDARMS", 248, 173;
		
		/* Acquired weapons are drawn based on their inventory item rather than
			slots - this is so the slots don't need to be shifted from their PC
			defaults to replicate the PSX bar's numbering. */
		DrawSwitchableImage PSXShotgun,			"", "PHUDNUM3", 285, 175;
		DrawSwitchableImage PSXSuperShotgun,	"", "PHUDNUM4", 301, 175;
		DrawSwitchableImage PSXChaingun,		"", "PHUDNUM5", 253, 188;
		DrawSwitchableImage PSXRocketLauncher,	"", "PHUDNUM6", 270, 188;
		DrawSwitchableImage PSXPlasmaRifle,		"", "PHUDNUM7", 285, 188;
		DrawSwitchableImage PSXBFG9000,			"", "PHUDNUM8", 301, 188;
		
		// Handles drawing the box around the selected weapon.
		IsSelected PSXFist, PSXChainsaw
		{
			DrawImage "PHUWEAP", 247, 172;
		}
		IsSelected PSXPistol
		{
			DrawImage "PHUWEAP", 263, 172;
		}
		IsSelected PSXShotgun
		{
			DrawImage "PHUWEAP", 279, 172;
		}
		IsSelected PSXSuperShotgun
		{
			DrawImage "PHUWEAP", 295, 172;
		}
		IsSelected PSXChaingun
		{
			DrawImage "PHUWEAP", 247, 184;
		}
		IsSelected PSXRocketLauncher
		{
			DrawImage "PHUWEAP", 263, 184;
		}
		IsSelected PSXPlasmaRifle
		{
			DrawImage "PHUWEAP", 279, 184;
		}
		IsSelected PSXBFG9000
		{
			DrawImage "PHUWEAP", 295, 184;
		}
	}
}

// ZDoom's fullscreen HUD with the PSX font.
statusbar fullscreen, fullscreenoffsets
{
	drawimage "MEDIA0", 20, -2, centerbottom;
	drawnumber 2147483647, BIGFONT, untranslated, health, drawshadow, 73, -20;

	drawimage armoricon, 20, -24, centerbottom;
	drawnumber 2147483647, BIGFONT, untranslated, armor, drawshadow, whennotzero, 73, -39;

	drawimage ammoicon1, -14, -4, centerbottom;
	drawnumber 2147483647, BIGFONT, untranslated, ammo1, drawshadow, -25, -20;

	usesammo
	{
		usessecondaryammo
		{
			drawimage ammoicon2, -14, -22, centerbottom;
			drawnumber 2147483647, BIGFONT, untranslated, ammo2, drawshadow, -25, -38;
			inventorybarnotvisible
			{
				drawselectedinventory centerbottom, drawshadow, alwaysshowcounter, BIGFONT, -14, -39, -26, -56, untranslated;
			}
		}
		usessecondaryammo not
		{
			inventorybarnotvisible
			{
				drawselectedinventory centerbottom, drawshadow, alwaysshowcounter, BIGFONT, -14, -21, -26, -38, untranslated;
			}
		}
	}
	usesammo not
	{
		inventorybarnotvisible
		{
			drawselectedinventory centerbottom, drawshadow, alwaysshowcounter, BIGFONT, -14, -3, -26, -20, untranslated;
		}
	}

	gamemode deathmatch
	{
		drawnumber 2147483647, BIGFONT, untranslated, frags, drawshadow, -3, 1;
	}
	gamemode singleplayer, cooperative, teamgame
	{
		drawkeybar 100, vertical, reverserows, auto, -12, 2, 0, 3, 12;
	}
}
Hope someone can help ... thanks in advance.
Attachments
Screenshot_Doom_20161215_012833.png
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: PSX Doom HUD is a mess in my mod... why?

Post by wildweasel »

The issue is that the code responsible for drawing the weapon slot numbers and selection box is designed to look for the PlayStation Doom guns and nothing else. You'll need to rewrite that section to use the actual weapon slots instead.
Locked

Return to “Editing (Archive)”