This is a quick Hack ehhhmmm Modification, to enable the Red HUD warnings that shipped with GTEST. In case your not sure what Im talking about open up your GFX Folder under Genesis then open Sbar in your favorite resolution...You will notice there are 4 .gfx files for each section of the HUD I.e. Sbar0-0.gfx is the "grayed" out version of Health. WARNING: I have only been using C++ for about 2 weeks so before you send me many nasty e-mails I know there must be a better way. But Hell this works, And I am learning :-). (Its my first tutorial, so bear with me...)
ok, here it is...remember line numbers may vary depending if you have all ready made mods or not...
Goto client.c, line 240. modify the following line :
GTEST only loaded 3 of the 4 textures available for each HUD Item. Now we tell it to load the 4th. The 4th texture is the Red Warning Texture.
Now that we can access all 4 textures lets enable the warning
Still in client.c, . Go to Line 416 or so : You should see the following code
{
geTextLib_Texture *Texture;
Client_StatusElement *Element;
Element = &Client->StatusBar.Elements[i];
//if (Val[i] <50 ) // Texture="Element-">Textures[STATE_Warning];
//else
Texture = Element->Textures[STATE_Normal];
Ok now what is happening is the first 2 HUD items (Health and armor) are never really checked to see if the are "Low" or not... What we are gonna do is make them get checked and set an arbitrary value of 50. If the value of Health or Armor is below 50 then the Red HUD Warning will be displayed for that item. When the value goes back up over 50 the HUD changes back to the normal display.
{
geTextLib_Texture *Texture;
Client_StatusElement *Element;
Element = &Client->StatusBar.Elements[i];
//RSH Uncommented to enable Warnings
if (Val[i] <50 ) // RSH Total Hack setting value to 50 ,setting Element->Low) should be better
Texture = Element->Textures[STATE_Warning];
else
Texture = Element->Textures[STATE_Normal];
Ok now that Health and Armor are done lets handle the weapons themselves. Cruise down to line 460 and make the following changes
else if (i == Client->CurrentWeapon)
{
if ((int32)Ammo <6)//element->Low)RSH More hackage
State = STATE_Warning;
else
State = STATE_Selected;
}
else
{
if ((int32)Ammo <6) // Element->Low)RSH again hacked out
State = STATE_Warning;
else
State = STATE_Normal;
Ok now in this section several things are happening. If you read a few lines up you will
see that first the Player is checked to see if he "has" the weapon. if he doesn't have the weapon the
state goes to disabled. The grayed out gfx is then displayed. Next it is checked to see if it is the current weapon.
With our change if the weapon is the current weapon the Ammo is then checked. In this case if it is lower than
the value 6 the Red Warning is displayed.
If the Player has the weapon but it isnt current it is checked to see if he has enough Ammo for the weapon. In
this case again the value is 6. If the player has the weapon but the ammo count is under 6 then the Red Hud Warning
is displayed for the weapon.If the ammo count is ok the normal display appears
For changes I think the Element->Low is the way to go. But that is above my ability to figure out how to get
the values in there. So if one of you C++ Guru's make some improvements on this please send me a copy :-) Rob. Also include some notes if possible telling me what changed
and why. It is the only way I can learn and get better at this:-)