HOM effect with hud

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
ForrestMarkX
Forum Regular
Posts: 132
Joined: Sat Jun 16, 2012 2:04 am
Location: Texas

HOM effect with hud

#1

Post by ForrestMarkX » Wed May 08, 2013 2:32 am

I keep getting this weird HOM effect with the PSX Doom TC hud, no matter what I try it doesn't seem to load the texture unless I set it to the default doom's y coordinates it appears crushed up and small.

Original post of Doomworld Forums:
I got permission from the creator to port this mod over to Zandronum and I have seem to run into a problem with the hud, everything else works fine but the hud doesn't seem to load instead I get nothing but a hall of mirrors effect with it. It only seems to work when I set the y coordinates to the default hud's but this makes it look very small and squished up. I'm thinking it's cause Zandronum doesn't use the version of ZDoom that allows you to use "Resolution" in the SBARINFO file

Here is a pic of the problem:
Image

Here's the SBARINFO file:

Code: Select all

// PSX Doom status bar recreation by Dragonsbrethren
Height 32;
MonospaceFonts true, "0";

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

StatusBar Normal
{
	DrawImage "HUDBAR", 0, 208;
	
	DrawNumber 3, BIGFONT, Untranslated, Ammo1, 39, 212;
	DrawNumber 3, BIGFONT, Untranslated, Health, 82, 212;
	DrawNumber 3, BIGFONT, Untranslated, Armor, 179, 212;
	
	/* PSX Doom has "combined" key icons in multiplayer by displaying the skulls
		on top of the cards */
	DrawSwitchableImage keyslot 1, "", "HUDKEYS2", 100, 212;
	DrawSwitchableImage keyslot 2, "", "HUDKEYS0", 100, 220;
	DrawSwitchableImage keyslot 3, "", "HUDKEYS1", 100, 228;
	
	DrawSwitchableImage keyslot 4, "", "HUDKEYS5", 102, 212;
	DrawSwitchableImage keyslot 5, "", "HUDKEYS3", 102, 220;
	DrawSwitchableImage keyslot 6, "", "HUDKEYS4", 102, 228;
	
	DrawMugshot 5, XDeathFace, 118, 210;
	
	GameMode deathmatch, teamgame
	{
		/* Offsets guessed from YouTube video - the "FRAG" text is not lined up
			with the other status bar text for some reason */
		DrawImage "HUDFRAG", 208, 229;
		
		DrawNumber 3, BIGFONT, Untranslated, Frags, 234, 212;
	}
	
	GameMode cooperative, singleplayer
	{
		DrawImage "HUDARMS", 200, 213;
		
		/* 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,			"", "HUDNUM3", 230, 215;
		DrawSwitchableImage PSXSuperShotgun,	"", "HUDNUM4", 243, 215;
		DrawSwitchableImage PSXChaingun,		"", "HUDNUM5", 204, 227;
		DrawSwitchableImage PSXRocketLauncher,	"", "HUDNUM6", 217, 227;
		DrawSwitchableImage PSXPlasmaRifle,		"", "HUDNUM7", 230, 227;
		DrawSwitchableImage PSXBFG9000,			"", "HUDNUM8", 243, 227;
		
		// Handles drawing the box around the selected weapon.
		IsSelected PSXFist, PSXChainsaw
		{
			DrawImage "HUDWEAP", 199, 212;
		}
		IsSelected PSXPistol
		{
			DrawImage "HUDWEAP", 212, 212;
		}
		IsSelected PSXShotgun
		{
			DrawImage "HUDWEAP", 225, 212;
		}
		IsSelected PSXSuperShotgun
		{
			DrawImage "HUDWEAP", 238, 212;
		}
		IsSelected PSXChaingun
		{
			DrawImage "HUDWEAP", 199, 224;
		}
		IsSelected PSXRocketLauncher
		{
			DrawImage "HUDWEAP", 212, 224;
		}
		IsSelected PSXPlasmaRifle
		{
			DrawImage "HUDWEAP", 225, 224;
		}
		IsSelected PSXBFG9000
		{
			DrawImage "HUDWEAP", 238, 224;
		}
	}
}

// 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;
	}
}

User avatar
-Jes-
Frequent Poster Miles card holder
Posts: 975
Joined: Fri Aug 03, 2012 9:55 am
Location: Void Zone

RE: HOM effect with hud

#2

Post by -Jes- » Thu May 09, 2013 5:06 am

Zandronum does indeed not support setting a scaling resolution in sbarinfo - that function was only added to later versions of ZDoom than the one Zandro is based on. It's either scale to 320x or don't.

The HoM is caused by the "Height 32;" value - you should set this value to the height of pixels from the bottom of the screen that is fully covered by the hud. (in this case, apparently 0)
Last edited by -Jes- on Thu May 09, 2013 5:06 am, edited 1 time in total.

User avatar
ForrestMarkX
Forum Regular
Posts: 132
Joined: Sat Jun 16, 2012 2:04 am
Location: Texas

RE: HOM effect with hud

#3

Post by ForrestMarkX » Thu May 09, 2013 5:26 am

Hmm someone suggested I use texture to scale the hud, but so far that method hasn't worked. It will always either spawn that HOM effect or with what you said won't appear at all

User avatar
ForrestMarkX
Forum Regular
Posts: 132
Joined: Sat Jun 16, 2012 2:04 am
Location: Texas

RE: HOM effect with hud

#4

Post by ForrestMarkX » Thu May 09, 2013 9:59 am

Nvm apparently the max characters allowed in a texture name is 8 and I was going over that limit

Post Reply