mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-21 11:31:21 +00:00
added live stats (still have to refine)
kicked out sdk message version upcount
This commit is contained in:
parent
78814c0846
commit
211c5e546c
5 changed files with 78 additions and 65 deletions
|
@ -1951,16 +1951,9 @@ void CG_DrawRearviewMirror( float x, float y, float w, float h);
|
|||
float CG_DrawUpperRightHUD( float y );
|
||||
float CG_DrawLowerRightHUD( float y );
|
||||
float CG_DrawLowerLeftHUD( float y );
|
||||
/*TBB - minimap EXPERIMENTAL -
|
||||
modified rearview but only render stuff from +8192(Z) from
|
||||
center of bsp, pitched downward, and render only players (flags for ctf).
|
||||
this will probably drop fps, hopefully not too much and ,
|
||||
might have to make a cvar for displaying it plus opacity
|
||||
trying to get this to work like the minimap from UrT
|
||||
from scratch. must try to make it 2d bitmap
|
||||
*/
|
||||
void CG_DrawMMap( float x, float y, float w, float h );
|
||||
//TBB FIN
|
||||
void CG_DrawHUD_DerbyList(float x, float y);
|
||||
|
||||
|
||||
//
|
||||
// cg_rally_hud2.c
|
||||
|
|
|
@ -389,7 +389,6 @@ code:
|
|||
/*
|
||||
================
|
||||
CG_DrawTimes
|
||||
|
||||
================
|
||||
*/
|
||||
static float CG_DrawTimes( float y ) {
|
||||
|
@ -427,9 +426,9 @@ static float CG_DrawTimes( float y ) {
|
|||
|
||||
Com_sprintf(s, sizeof(s), "B: %s", time);
|
||||
// x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH;
|
||||
x = 636 - 96;
|
||||
CG_FillRect ( x, y, 96, 18, bgColor );
|
||||
x+= 8;
|
||||
x = 636 - 120;
|
||||
CG_FillRect ( x, y, 120, 18, bgColor );
|
||||
x+= 25;
|
||||
|
||||
y+= 4;
|
||||
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
|
||||
|
@ -447,9 +446,9 @@ static float CG_DrawTimes( float y ) {
|
|||
|
||||
Com_sprintf(s, sizeof(s), "L: %s", time);
|
||||
// x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH;
|
||||
x = 636 - 96;
|
||||
CG_FillRect( x, y, 96, 18, bgColor );
|
||||
x+= 8;
|
||||
x = 636 - 120;
|
||||
CG_FillRect( x, y, 120, 18, bgColor );
|
||||
x+= 25;
|
||||
|
||||
y+= 4;
|
||||
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
|
||||
|
@ -474,9 +473,9 @@ static float CG_DrawTimes( float y ) {
|
|||
|
||||
Com_sprintf(s, sizeof(s), "T: %s", time);
|
||||
|
||||
x = 636 - 96;
|
||||
CG_FillRect( x, y, 96, 18, bgColor );
|
||||
x += 8;
|
||||
x = 636 - 120;
|
||||
CG_FillRect( x, y, 120, 18, bgColor );
|
||||
x += 25;
|
||||
|
||||
y += 4;
|
||||
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
|
||||
|
@ -491,7 +490,6 @@ static float CG_DrawTimes( float y ) {
|
|||
/*
|
||||
================
|
||||
CG_DrawLaps
|
||||
|
||||
================
|
||||
*/
|
||||
static float CG_DrawLaps( float y ) {
|
||||
|
@ -510,9 +508,9 @@ static float CG_DrawLaps( float y ) {
|
|||
|
||||
Com_sprintf(s, sizeof(s), "LAP: %i/%i", curLap, numLaps);
|
||||
|
||||
x = 636 - 96;
|
||||
CG_FillRect( x, y, 96, 18, bgColor );
|
||||
x += 8;
|
||||
x = 636 - 120;
|
||||
CG_FillRect( x, y, 120, 18, bgColor );
|
||||
x += 25;
|
||||
|
||||
y += 4;
|
||||
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
|
||||
|
@ -543,13 +541,13 @@ static float CG_DrawCurrentPosition( float y ) {
|
|||
|
||||
Com_sprintf(s, sizeof(s), "POS: ");
|
||||
|
||||
x = 636 - 96;
|
||||
width = 96;
|
||||
x = 636 - 120;
|
||||
width = 120;
|
||||
height = 18;
|
||||
|
||||
CG_FillRect( x, y, width, height, bgColor );
|
||||
|
||||
x += 8;
|
||||
x += 25;
|
||||
y += 4;
|
||||
|
||||
CG_DrawTinyDigitalStringColor( x, y, s, colorWhite);
|
||||
|
@ -587,8 +585,8 @@ static float CG_DrawCarAheadAndBehind( float y ) {
|
|||
endPos = startPos + 8 > cgs.numRacers ? cgs.numRacers : startPos + 8;
|
||||
startPos = endPos - 8 < 1 ? 1 : endPos - 8;
|
||||
|
||||
x = 636 - 96;
|
||||
width = 96;
|
||||
x = 636 - 120;
|
||||
width = 120;
|
||||
height = TINYCHAR_HEIGHT;
|
||||
|
||||
for (i = startPos; i <= endPos; i++){
|
||||
|
@ -625,9 +623,8 @@ static float CG_DrawCarAheadAndBehind( float y ) {
|
|||
/*
|
||||
=================
|
||||
CG_DrawHUD_DerbyList
|
||||
|
||||
=================
|
||||
*/
|
||||
|
||||
void CG_DrawHUD_DerbyList(float x, float y){
|
||||
int i;
|
||||
vec4_t color;
|
||||
|
@ -639,16 +636,16 @@ void CG_DrawHUD_DerbyList(float x, float y){
|
|||
CG_FillRect(x, y, 536, 18, bgColor);
|
||||
|
||||
// name
|
||||
CG_DrawTinyDigitalStringColor( x + 42, y, "PLAYER:", colorWhite);
|
||||
CG_DrawTinyStringColor( x + 42, y, "PLAYER:", colorWhite);
|
||||
|
||||
// time
|
||||
CG_DrawTinyDigitalStringColor( x + 206, y, "TIME:", colorWhite);
|
||||
CG_DrawTinyStringColor( x + 206, y, "TIME:", colorWhite);
|
||||
|
||||
// dmg dealt
|
||||
CG_DrawTinyDigitalStringColor( x + 294, y, "DMG DEALT:", colorWhite);
|
||||
CG_DrawTinyStringColor( x + 294, y, "DMG DEALT:", colorWhite);
|
||||
|
||||
// dmg taken
|
||||
CG_DrawTinyDigitalStringColor( x + 442, y, "DMG TAKEN:", colorWhite);
|
||||
CG_DrawTinyStringColor( x + 442, y, "DMG TAKEN:", colorWhite);
|
||||
|
||||
y += 20;
|
||||
|
||||
|
@ -680,23 +677,24 @@ void CG_DrawHUD_DerbyList(float x, float y){
|
|||
time = getStringForTime(playTime);
|
||||
|
||||
// num
|
||||
CG_DrawTinyDigitalStringColor( x + 6, y, va("0%i", (i+1)), color);
|
||||
CG_DrawTinyStringColor( x + 6, y, va("0%i", (i+1)), color);
|
||||
|
||||
// name
|
||||
CG_DrawTinyDigitalStringColor( x + 42, y, cgs.clientinfo[cg.scores[i].client].name, color);
|
||||
CG_DrawTinyStringColor( x + 42, y, cgs.clientinfo[cg.scores[i].client].name, color);
|
||||
|
||||
// time
|
||||
CG_DrawTinyDigitalStringColor( x + 192, y, time, color);
|
||||
CG_DrawTinyStringColor( x + 192, y, time, color);
|
||||
|
||||
// dmg dealt
|
||||
CG_DrawTinyDigitalStringColor( x + 326, y, va("%i", cg.scores[i].damageDealt), color);
|
||||
CG_DrawTinyStringColor( x + 326, y, va("%i", cg.scores[i].damageDealt), color);
|
||||
|
||||
// dmg taken
|
||||
CG_DrawTinyDigitalStringColor( x + 474, y, va("%i", cg.scores[i].damageTaken), color);
|
||||
CG_DrawTinyStringColor( x + 474, y, va("%i", cg.scores[i].damageTaken), color);
|
||||
|
||||
y += 20;
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -914,7 +912,7 @@ float CG_DrawUpperRightHUD( float y ) {
|
|||
}
|
||||
else if (cgs.gametype == GT_DERBY)
|
||||
y = CG_DrawTimes( y );
|
||||
// CG_DrawHUD_DerbyList(44, 130);
|
||||
CG_DrawHUD_DerbyList(44, 130);
|
||||
|
||||
}
|
||||
|
||||
|
@ -952,7 +950,7 @@ float CG_DrawLowerLeftHUD( float y ) {
|
|||
|
||||
// Comment this out in the full release Version
|
||||
|
||||
y = CG_DrawSDKMessage( y );
|
||||
// y = CG_DrawSDKMessage( y );
|
||||
|
||||
return y;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ void CG_DrawHUD_Scores(float x, float y){
|
|||
CG_DrawHUD_DerbyList
|
||||
|
||||
=================
|
||||
|
||||
*/
|
||||
void CG_DrawHUD_DerbyList(float x, float y){
|
||||
int i;
|
||||
vec4_t color;
|
||||
|
@ -358,19 +358,20 @@ void CG_DrawHUD_DerbyList(float x, float y){
|
|||
float playTime;
|
||||
|
||||
// draw heading
|
||||
CG_FillRect(x, y, 536, 18, bgColor);
|
||||
x = 636 - 120;
|
||||
CG_FillRect(x, y, 120, 18, bgColor);
|
||||
|
||||
// name
|
||||
CG_DrawSmallDigitalStringColor( x + 42, y, "PLAYER:", colorWhite);
|
||||
CG_DrawTinyDigitalStringColor( x + 16, y, "P:", colorWhite);
|
||||
|
||||
// time
|
||||
CG_DrawSmallDigitalStringColor( x + 206, y, "TIME:", colorWhite);
|
||||
// CG_DrawTinyStringColor( x + 70, y, "TIME:", colorWhite);
|
||||
|
||||
// dmg dealt
|
||||
CG_DrawSmallDigitalStringColor( x + 294, y, "DMG DEALT:", colorWhite);
|
||||
CG_DrawTinyDigitalStringColor( x + 70, y, "DD:", colorWhite);
|
||||
|
||||
// dmg taken
|
||||
CG_DrawSmallDigitalStringColor( x + 442, y, "DMG TAKEN:", colorWhite);
|
||||
CG_DrawTinyDigitalStringColor( x + 100, y, "DT:", colorWhite);
|
||||
|
||||
y += 20;
|
||||
|
||||
|
@ -381,7 +382,7 @@ void CG_DrawHUD_DerbyList(float x, float y){
|
|||
cent = &cg_entities[cg.scores[i].client];
|
||||
if (!cent) continue;
|
||||
|
||||
CG_FillRect(x, y, 536, 18, bgColor);
|
||||
CG_FillRect(x, y, 120, 18, bgColor);
|
||||
|
||||
Vector4Copy(colorWhite, color);
|
||||
if (cg.scores[i].client == cg.snap->ps.clientNum){
|
||||
|
@ -402,24 +403,24 @@ void CG_DrawHUD_DerbyList(float x, float y){
|
|||
time = getStringForTime(playTime);
|
||||
|
||||
// num
|
||||
CG_DrawSmallDigitalStringColor( x + 6, y, va("0%i", (i+1)), color);
|
||||
CG_DrawTinyDigitalStringColor( x + 2, y, va("%i", (i+1)), color);
|
||||
|
||||
// name
|
||||
CG_DrawSmallDigitalStringColor( x + 42, y, cgs.clientinfo[cg.scores[i].client].name, color);
|
||||
CG_DrawTinyDigitalStringColor( x + 16, y, cgs.clientinfo[cg.scores[i].client].name, color);
|
||||
|
||||
// time
|
||||
CG_DrawSmallDigitalStringColor( x + 192, y, time, color);
|
||||
// CG_DrawTinyStringColor( x + 70, y, time, color);
|
||||
|
||||
// dmg dealt
|
||||
CG_DrawSmallDigitalStringColor( x + 326, y, va("%i", cg.scores[i].damageDealt), color);
|
||||
CG_DrawTinyDigitalStringColor( x + 75, y, va("%i", cg.scores[i].damageDealt), color);
|
||||
|
||||
// dmg taken
|
||||
CG_DrawSmallDigitalStringColor( x + 474, y, va("%i", cg.scores[i].damageTaken), color);
|
||||
CG_DrawTinyDigitalStringColor( x + 105, y, va("%i", cg.scores[i].damageTaken), color);
|
||||
|
||||
y += 20;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -468,12 +469,13 @@ qboolean CG_DrawHUD( void ) {
|
|||
case GT_DEATHMATCH:
|
||||
case GT_TEAM:
|
||||
case GT_CTF:
|
||||
case GT_DOMINATION:
|
||||
CG_DrawHUD_Scores(264, 130);
|
||||
|
||||
break;
|
||||
|
||||
case GT_DERBY:
|
||||
// CG_DrawHUD_DerbyList(44, 130);
|
||||
CG_DrawHUD_DerbyList(44, 130);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define BASETA "missionpack"
|
||||
|
||||
#ifndef PRODUCT_VERSION
|
||||
#define PRODUCT_VERSION "v0.0.3.0_r372"
|
||||
#define PRODUCT_VERSION "v0.0.3.0_r378"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -531,7 +531,7 @@ q3rallycode
|
|||
engine\code\qcommon\vm_x86.c
|
||||
engine\code\qcommon\vm_x86_64.c
|
||||
engine\code\qcommon\vm_x86_64_assembler.c
|
||||
+renderer
|
||||
-renderer
|
||||
engine\code\renderer\qgl.h
|
||||
engine\code\renderer\tr_animation.c
|
||||
engine\code\renderer\tr_backend.c
|
||||
|
@ -859,17 +859,37 @@ q3rallycode
|
|||
engine\cross-make-mingw64.sh
|
||||
[Open project files]
|
||||
0=engine\code\qcommon\q_shared.h
|
||||
1=engine\code\qcommon\surfaceflags.h
|
||||
2=engine\code\cgame\cg_draw.c
|
||||
1=engine\code\q3_ui\ui_qmenu.c
|
||||
2=engine\code\q3_ui\ui_menu.c
|
||||
3=engine\code\cgame\cg_ents.c
|
||||
4=engine\code\cgame\cg_rally_hud.c
|
||||
5=engine\code\cgame\cg_rally_hud2.c
|
||||
6=engine\code\cgame\cg_draw.c
|
||||
7=engine\code\cgame\cg_local.h
|
||||
[Selected Project Files]
|
||||
Main=
|
||||
Selected=engine\code\qcommon\q_shared.h
|
||||
[engine\code\qcommon\q_shared.h]
|
||||
TopLine=53
|
||||
Caret=39,70
|
||||
[engine\code\qcommon\surfaceflags.h]
|
||||
TopLine=59
|
||||
Caret=19,59
|
||||
[engine\code\q3_ui\ui_qmenu.c]
|
||||
TopLine=2273
|
||||
Caret=1,2287
|
||||
[engine\code\q3_ui\ui_menu.c]
|
||||
TopLine=477
|
||||
Caret=1,492
|
||||
[engine\code\cgame\cg_ents.c]
|
||||
TopLine=1390
|
||||
Caret=1,1405
|
||||
[engine\code\cgame\cg_rally_hud.c]
|
||||
TopLine=930
|
||||
Caret=1,955
|
||||
[engine\code\cgame\cg_rally_hud2.c]
|
||||
TopLine=436
|
||||
Caret=19,361
|
||||
[engine\code\cgame\cg_draw.c]
|
||||
TopLine=2696
|
||||
Caret=67,2713
|
||||
TopLine=1280
|
||||
Caret=1,1295
|
||||
[engine\code\cgame\cg_local.h]
|
||||
TopLine=1885
|
||||
Caret=1,1900
|
||||
|
|
Loading…
Reference in a new issue