o Reverted the endgame messages

o Made hivesight text less intrusive by making it more transparent the further away from the center of the screen it is
o Added cl_hidebliptext (default 0) which when set to 1 will turn off alien hivesight text

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@421 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2006-04-26 23:06:07 +00:00
parent a9eaa0715a
commit 9bbe11742d
6 changed files with 31 additions and 7 deletions

View file

@ -210,6 +210,7 @@ void CHud :: Init( void )
CVAR_CREATE( kvLabelMaps, "1", FCVAR_ARCHIVE);
CVAR_CREATE( kvGammaRamp, "1", FCVAR_ARCHIVE);
CVAR_CREATE( kvCustomCrosshair, "0", FCVAR_ARCHIVE);
CVAR_CREATE( kvHideBlipText, "0", FCVAR_ARCHIVE);
CVAR_CREATE( "cl_iconr", "0", FCVAR_ARCHIVE);
CVAR_CREATE( "cl_icong", "149", FCVAR_ARCHIVE);
CVAR_CREATE( "cl_iconb", "221", FCVAR_ARCHIVE);

View file

@ -40,6 +40,7 @@ extern cvar_t* cl_musicdir;
// :puzl
// tankefugl: 0001070 - enables forced gamma ramp loading
#define kvGammaRamp "cl_gammaramp"
#define kvHideBlipText "cl_hidebliptext"
#define kvCustomCrosshair "cl_customcrosshair"
// :tankefugl
#define kvCMHotKeys "cl_cmhotkeys"

View file

@ -351,7 +351,7 @@ public:
int GetCurrentWeaponID(void);
void DrawTopDownBG();
void DrawTranslatedString(int inX, int inY, const char* inStringToTranslate, bool inCentered = false, bool inIgnoreUpgrades = false, bool inTrimExtraInfo = false);
void DrawTranslatedString(int inX, int inY, const char* inStringToTranslate, bool inCentered = false, bool inIgnoreUpgrades = false, bool inTrimExtraInfo = false, float alpha = 1.0f);
void HandleFog();
void PostModelRender(char* inModelName);
void PreRenderFrame();

View file

@ -250,7 +250,7 @@ void ProjectPointFromViewOrigin(int inDistanceToProject, int inScreenX, int inSc
VectorMA(GetViewOrigin(), inDistanceToProject, theRay, outResult);
}
void AvHHud::DrawTranslatedString(int inX, int inY, const char* inStringToTranslate, bool inCentered, bool inIgnoreUpgrades, bool inTrimExtraInfo)
void AvHHud::DrawTranslatedString(int inX, int inY, const char* inStringToTranslate, bool inCentered, bool inIgnoreUpgrades, bool inTrimExtraInfo, float alpha)
{
// Translate
string theTranslatedText;
@ -274,6 +274,10 @@ void AvHHud::DrawTranslatedString(int inX, int inY, const char* inStringToTransl
char theCharBuffer[512];
sprintf(theCharBuffer, "%s", theTranslatedText.c_str());
theR *= alpha;
theB *= alpha;
theG *= alpha;
if(inCentered)
{
this->DrawHudStringCentered(inX, inY, ScreenWidth(), theCharBuffer, theR, theG, theB);
@ -4010,17 +4014,26 @@ void AvHHud::RenderAlienUI()
if(AvHCUWorldToScreen(theMessageWorldPos, (float*)&theScreenPos))
{
if((theBlipName != "") && (theBlipStatusText != "") && (theLocationName != ""))
if((theBlipName != "") && (theBlipStatusText != "") && (theLocationName != "") && (CVAR_GET_FLOAT(kvHideBlipText) == 0))
{
// Find alpha for the blip-text based on position on the screen
float screenWidth = ScreenWidth();
float screenHeight = ScreenHeight();
float xdiff = fabs(theScreenPos[0] - screenWidth/2);
float ydiff = fabs(theScreenPos[1] - screenHeight/2);
float quadrance = xdiff * xdiff + ydiff * ydiff;
float alpha = max(0.0f, 0.9f - quadrance / (screenHeight * screenHeight));
alpha *= alpha * alpha * alpha;
// "MonsieurEvil is under attack"
// "Resource tower is under attack"
char theFirstLine[512];
sprintf(theFirstLine, "%s %s\n", theBlipName.c_str(), theBlipStatusText.c_str());
this->DrawTranslatedString(theScreenPos[0], theScreenPos[1], theFirstLine, true, true);
this->DrawTranslatedString(theScreenPos[0], theScreenPos[1], theFirstLine, true, true, false, alpha);
char theLocationNameCStr[512];
strcpy(theLocationNameCStr, theLocationName.c_str());
this->DrawTranslatedString(theScreenPos[0], theScreenPos[1] + .022f*ScreenHeight(), theLocationNameCStr, true, true, true);
this->DrawTranslatedString(theScreenPos[0], theScreenPos[1] + .022f*ScreenHeight(), theLocationNameCStr, true, true, true, alpha);
}
}

View file

@ -1594,13 +1594,15 @@ There are too many webs nearby.
TeamOneWon
{
The TSA Marines have exterminated the alien infestation!
The marines has won the game!
}
// The TSA Marines have exterminated the alien infestation!
TeamTwoWon
{
The alien Kharaa have eradicated the human presence!
The aliens has won the game!
}
// The alien Kharaa have eradicated the human presence!
GameDraw
{

View file

@ -97,6 +97,13 @@ DESCRIPTION INFO_OPTIONS
{ "1" }
}
"cl_hidebliptext"
{
"Show alien hivesight text"
{ BOOL }
{ "0" }
}
"cl_dynamiclights"
{
"Dynamic lights"