mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-23 12:42:36 +00:00
ctb changes
This commit is contained in:
parent
138d6e4218
commit
5ba05f73f6
4 changed files with 91 additions and 51 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.61 2002/08/07 04:46:20 niceass
|
||||||
|
// ctb changes
|
||||||
|
//
|
||||||
// Revision 1.60 2002/07/22 06:31:32 niceass
|
// Revision 1.60 2002/07/22 06:31:32 niceass
|
||||||
// cleaned up the powerup code
|
// cleaned up the powerup code
|
||||||
//
|
//
|
||||||
|
@ -647,12 +650,15 @@ static float CG_DrawScore(float y)
|
||||||
// The other team:
|
// The other team:
|
||||||
if (team == TEAM_RED) {
|
if (team == TEAM_RED) {
|
||||||
s = va("%i", cgs.scores2); // Blue
|
s = va("%i", cgs.scores2); // Blue
|
||||||
MAKERGBA(BColor, 0.0f, 0.0f, 1.0f, 0.4f);
|
CG_TeamColor(TEAM_BLUE, BColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s = va("%i", cgs.scores1); // Red
|
s = va("%i", cgs.scores1); // Red
|
||||||
MAKERGBA(BColor, 1.0f, 0.0f, 0.0f, 0.4f);
|
CG_TeamColor(TEAM_RED, BColor);
|
||||||
}
|
}
|
||||||
|
BColor[3] = 0.4f;
|
||||||
|
|
||||||
|
//MAKERGBA(BColor, 0.0f, 0.0f, 1.0f, 0.4f);
|
||||||
|
|
||||||
w = CG_DrawStrlen(s) * SMALLCHAR_WIDTH;
|
w = CG_DrawStrlen(s) * SMALLCHAR_WIDTH;
|
||||||
x = w;
|
x = w;
|
||||||
|
@ -664,12 +670,13 @@ static float CG_DrawScore(float y)
|
||||||
// Your team:
|
// Your team:
|
||||||
if (team == TEAM_RED) {
|
if (team == TEAM_RED) {
|
||||||
s = va("%i", cgs.scores1); // Red
|
s = va("%i", cgs.scores1); // Red
|
||||||
MAKERGBA(BColor, 1.0f, 0.0f, 0.0f, 0.4f);
|
CG_TeamColor(TEAM_RED, BColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s = va("%i", cgs.scores2); // Blue
|
s = va("%i", cgs.scores2); // Blue
|
||||||
MAKERGBA(BColor, 0.0f, 0.0f, 1.0f, 0.4f);
|
CG_TeamColor(TEAM_BLUE, BColor);
|
||||||
}
|
}
|
||||||
|
BColor[3] = 0.4f;
|
||||||
|
|
||||||
w = CG_DrawStrlen(s) * SMALLCHAR_WIDTH;
|
w = CG_DrawStrlen(s) * SMALLCHAR_WIDTH;
|
||||||
x += w + 9;
|
x += w + 9;
|
||||||
|
@ -690,12 +697,14 @@ static float CG_DrawScore(float y)
|
||||||
else
|
else
|
||||||
x = w;
|
x = w;
|
||||||
|
|
||||||
MAKERGBA(BColor, 0.0f, 0.0f, 0.0f, 0.4f);
|
MAKERGBA(BColor, 1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
CG_FillRect(631 - x - 3, y - 1, w + 6, SMALLCHAR_HEIGHT + 6, BColor);
|
CG_FillRect(631 - x - 3, y - 1, w + 6, SMALLCHAR_HEIGHT + 6, BColor);
|
||||||
|
|
||||||
CG_DrawCleanRect(631 - x - 3, y - 1, w + 6, SMALLCHAR_HEIGHT + 6, 1, FColor);
|
CG_DrawCleanRect(631 - x - 3, y - 1, w + 6, SMALLCHAR_HEIGHT + 6, 1, FColor);
|
||||||
|
|
||||||
CG_DrawSmallString(631 - x, y + 2, s, 1.0F);
|
MAKERGBA(FColor, 0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
|
CG_DrawStringExt(631 - x, y + 2, s, FColor, qfalse, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 0);
|
||||||
|
//CG_DrawSmallString(631 - x, y + 2, s, 1.0F);
|
||||||
|
|
||||||
|
|
||||||
return y + SMALLCHAR_HEIGHT + 4;
|
return y + SMALLCHAR_HEIGHT + 4;
|
||||||
|
@ -927,17 +936,9 @@ static float CG_DrawTeamOverlay(float y, qboolean right, qboolean upper)
|
||||||
ret_y = y;
|
ret_y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
|
CG_TeamColor(cg.snap->ps.persistant[PERS_TEAM], hcolor);
|
||||||
hcolor[0] = 1.0f;
|
hcolor[3] = 0.33f;
|
||||||
hcolor[1] = 0.0f;
|
|
||||||
hcolor[2] = 0.0f;
|
|
||||||
hcolor[3] = 0.33f;
|
|
||||||
} else { // if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE )
|
|
||||||
hcolor[0] = 0.0f;
|
|
||||||
hcolor[1] = 0.0f;
|
|
||||||
hcolor[2] = 1.0f;
|
|
||||||
hcolor[3] = 0.33f;
|
|
||||||
}
|
|
||||||
trap_R_SetColor(hcolor);
|
trap_R_SetColor(hcolor);
|
||||||
CG_DrawPic(x, y, w, h, cgs.media.teamStatusBar);
|
CG_DrawPic(x, y, w, h, cgs.media.teamStatusBar);
|
||||||
trap_R_SetColor(NULL);
|
trap_R_SetColor(NULL);
|
||||||
|
@ -1267,14 +1268,10 @@ static void CG_DrawTeamInfo(void)
|
||||||
w += TINYCHAR_WIDTH * 2;
|
w += TINYCHAR_WIDTH * 2;
|
||||||
|
|
||||||
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
|
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
|
||||||
hcolor[0] = 1.0f;
|
CG_TeamColor(TEAM_RED, hcolor);
|
||||||
hcolor[1] = 0.0f;
|
|
||||||
hcolor[2] = 0.0f;
|
|
||||||
hcolor[3] = 0.33f;
|
hcolor[3] = 0.33f;
|
||||||
} else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) {
|
} else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) {
|
||||||
hcolor[0] = 0.0f;
|
CG_TeamColor(TEAM_RED, hcolor);
|
||||||
hcolor[1] = 0.0f;
|
|
||||||
hcolor[2] = 1.0f;
|
|
||||||
hcolor[3] = 0.33f;
|
hcolor[3] = 0.33f;
|
||||||
} else {
|
} else {
|
||||||
hcolor[0] = 0.0f;
|
hcolor[0] = 0.0f;
|
||||||
|
@ -1933,13 +1930,11 @@ static void CG_DrawSpectator(void)
|
||||||
MAKERGBA(Color, 0.0f, 0.0f, 0.0f, 0.4f);
|
MAKERGBA(Color, 0.0f, 0.0f, 0.0f, 0.4f);
|
||||||
|
|
||||||
if (cgs.gametype == GT_TEAMPLAY) {
|
if (cgs.gametype == GT_TEAMPLAY) {
|
||||||
if (cg.snap->ps.persistant[PERS_SAVEDTEAM] == TEAM_RED) {
|
CG_TeamColor(cg.snap->ps.persistant[PERS_SAVEDTEAM], Color);
|
||||||
MAKERGBA(Color, 0.7f, 0.0f, 0.0f, 0.3f);
|
Color[0] *= 0.7f;
|
||||||
}
|
Color[1] *= 0.7f;
|
||||||
|
Color[2] *= 0.7f;
|
||||||
if (cg.snap->ps.persistant[PERS_SAVEDTEAM] == TEAM_BLUE) {
|
Color[3] = 0.3f;
|
||||||
MAKERGBA(Color, 0.0f, 0.0f, 0.7f, 0.3f);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CG_FillRect(0, 420, 640, 60, Color);
|
CG_FillRect(0, 420, 640, 60, Color);
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.11 2002/08/07 04:45:46 niceass
|
||||||
|
// ctb changes
|
||||||
|
//
|
||||||
// Revision 1.10 2002/06/16 20:06:13 jbravo
|
// Revision 1.10 2002/06/16 20:06:13 jbravo
|
||||||
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
||||||
//
|
//
|
||||||
|
@ -407,22 +410,34 @@ float *CG_FadeColor(int startMsec, int totalMsec)
|
||||||
CG_TeamColor
|
CG_TeamColor
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
float *CG_TeamColor(int team)
|
void CG_TeamColor(int team, float *color)
|
||||||
{
|
{
|
||||||
static vec4_t red = { 1, 0.2f, 0.2f, 1 };
|
if ( cgs.gametype == GT_CTF ) {
|
||||||
static vec4_t blue = { 0.2f, 0.2f, 1, 1 };
|
switch (team) {
|
||||||
static vec4_t other = { 1, 1, 1, 1 };
|
case TEAM_RED:
|
||||||
static vec4_t spectator = { 0.7f, 0.7f, 0.7f, 1 };
|
MAKERGBA(color, 0.5f, 0.5f, 0.5f, 1);
|
||||||
|
break;
|
||||||
switch (team) {
|
case TEAM_BLUE:
|
||||||
case TEAM_RED:
|
MAKERGBA(color, 0, 0, 0, 1);
|
||||||
return red;
|
break;
|
||||||
case TEAM_BLUE:
|
default:
|
||||||
return blue;
|
MAKERGBA(color, 1, 1, 1, 1);
|
||||||
case TEAM_SPECTATOR:
|
break;
|
||||||
return spectator;
|
}
|
||||||
default:
|
}
|
||||||
return other;
|
else
|
||||||
|
{
|
||||||
|
switch (team) {
|
||||||
|
case TEAM_RED:
|
||||||
|
MAKERGBA(color, 1, 0, 0, 1);
|
||||||
|
break;
|
||||||
|
case TEAM_BLUE:
|
||||||
|
MAKERGBA(color, 0, 0, 1, 1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
MAKERGBA(color, 1, 1, 1, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.115 2002/08/07 04:45:07 niceass
|
||||||
|
// ctb changes
|
||||||
|
//
|
||||||
// Revision 1.114 2002/08/07 03:35:57 jbravo
|
// Revision 1.114 2002/08/07 03:35:57 jbravo
|
||||||
// Added dynamic radio and stopped all radio usage during lca
|
// Added dynamic radio and stopped all radio usage during lca
|
||||||
//
|
//
|
||||||
|
@ -1815,7 +1818,7 @@ void CG_DrawSmallStringColor(int x, int y, const char *s, vec4_t color);
|
||||||
int CG_DrawStrlen(const char *str);
|
int CG_DrawStrlen(const char *str);
|
||||||
|
|
||||||
float *CG_FadeColor(int startMsec, int totalMsec);
|
float *CG_FadeColor(int startMsec, int totalMsec);
|
||||||
float *CG_TeamColor(int team);
|
void CG_TeamColor(int team, float *color);
|
||||||
void CG_TileClear(void);
|
void CG_TileClear(void);
|
||||||
void CG_ColorForHealth(vec4_t hcolor);
|
void CG_ColorForHealth(vec4_t hcolor);
|
||||||
void CG_GetColorForHealth(int health, int armor, vec4_t hcolor);
|
void CG_GetColorForHealth(int health, int armor, vec4_t hcolor);
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.44 2002/08/07 04:44:23 niceass
|
||||||
|
// ctb changes
|
||||||
|
//
|
||||||
// Revision 1.43 2002/07/22 01:27:38 niceass
|
// Revision 1.43 2002/07/22 01:27:38 niceass
|
||||||
// spectator coloring fix
|
// spectator coloring fix
|
||||||
//
|
//
|
||||||
|
@ -371,11 +374,32 @@ static int CG_TeamplayScoreboard(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
MAKERGBA(BlackL, 0.0f, 0.0f, 0.0f, 0.8f * Alpha);
|
MAKERGBA(BlackL, 0.0f, 0.0f, 0.0f, 0.8f * Alpha);
|
||||||
MAKERGBA(RedD, 0.8f, 0.0f, 0.0f, 0.8f * Alpha);
|
|
||||||
MAKERGBA(BlueD, 0.0f, 0.0f, 0.8f, 0.8f * Alpha);
|
CG_TeamColor(TEAM_RED, RedD);
|
||||||
|
RedD[0] *= 0.8f;
|
||||||
|
RedD[1] *= 0.8f;
|
||||||
|
RedD[2] *= 0.8f;
|
||||||
|
RedD[3] *= (0.8f * Alpha);
|
||||||
|
//MAKERGBA(RedD, 0.8f, 0.0f, 0.0f, 0.8f * Alpha);
|
||||||
|
CG_TeamColor(TEAM_BLUE, BlueD);
|
||||||
|
BlueD[0] *= 0.8f;
|
||||||
|
BlueD[1] *= 0.8f;
|
||||||
|
BlueD[2] *= 0.8f;
|
||||||
|
BlueD[3] *= (0.8f * Alpha);
|
||||||
|
//MAKERGBA(BlueD, 0.0f, 0.0f, 0.8f, 0.8f * Alpha);
|
||||||
MAKERGBA(GreyD, 0.3f, 0.3f, 0.3f, 0.84f * Alpha);
|
MAKERGBA(GreyD, 0.3f, 0.3f, 0.3f, 0.84f * Alpha);
|
||||||
MAKERGBA(RedL, 0.8f, 0.0f, 0.0f, 0.4f * Alpha);
|
CG_TeamColor(TEAM_RED, RedL);
|
||||||
MAKERGBA(BlueL, 0.0f, 0.0f, 0.8f, 0.4f * Alpha);
|
RedL[0] *= 0.8f;
|
||||||
|
RedL[1] *= 0.8f;
|
||||||
|
RedL[2] *= 0.8f;
|
||||||
|
RedL[3] *= (0.8f * Alpha);
|
||||||
|
//MAKERGBA(RedL, 0.8f, 0.0f, 0.0f, 0.4f * Alpha);
|
||||||
|
CG_TeamColor(TEAM_BLUE, BlueL);
|
||||||
|
BlueL[0] *= 0.8f;
|
||||||
|
BlueL[1] *= 0.8f;
|
||||||
|
BlueL[2] *= 0.8f;
|
||||||
|
BlueL[3] *= (0.8f * Alpha);
|
||||||
|
//MAKERGBA(BlueL, 0.0f, 0.0f, 0.8f, 0.4f * Alpha);
|
||||||
MAKERGBA(GreyL, 0.3f, 0.3f, 0.3f, 0.4f * Alpha);
|
MAKERGBA(GreyL, 0.3f, 0.3f, 0.3f, 0.4f * Alpha);
|
||||||
|
|
||||||
Reds = Blues = Spectators = Refs = RedSubs = BlueSubs = 0;
|
Reds = Blues = Spectators = Refs = RedSubs = BlueSubs = 0;
|
||||||
|
@ -550,7 +574,10 @@ static int CG_TeamplayScoreboard(void)
|
||||||
// *************** BLUE TEAM ************
|
// *************** BLUE TEAM ************
|
||||||
y += SB_FONTSIZEH * 2;
|
y += SB_FONTSIZEH * 2;
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueD, colorBlack);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueD, colorBlack);
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, cg_RQ3_team2name.string, 100, colorBlack);
|
if (cgs.gametype == GT_CTF)
|
||||||
|
DrawLeftStripText(y, SB_FONTSIZEH, cg_RQ3_team2name.string, 100, colorWhite);
|
||||||
|
else
|
||||||
|
DrawLeftStripText(y, SB_FONTSIZEH, cg_RQ3_team2name.string, 100, colorBlack);
|
||||||
|
|
||||||
if (cg_RQ3_matchmode.integer)
|
if (cg_RQ3_matchmode.integer)
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, va("%d/%d - %s - Wins: %d", Blues, BlueSubs,
|
DrawRightStripText(y, SB_FONTSIZEH, va("%d/%d - %s - Wins: %d", Blues, BlueSubs,
|
||||||
|
|
Loading…
Reference in a new issue