// PSX Doom status bar recreation by Dragonsbrethren, edited to work in Zandronum by Forrest Mark X
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;
	}
}