From 221e699e09b150ea9dfd0828cb9667e0203aa01f Mon Sep 17 00:00:00 2001 From: q3rally Date: Tue, 30 Nov 2021 19:57:37 +0000 Subject: [PATCH] fixed upper right hud positions --- engine/code/cgame/cg_rally_hud.c | 38 +++++++++---------- engine/code/qcommon/q_shared.h | 2 +- q3rallycode.ppr | 64 +++++--------------------------- 3 files changed, 30 insertions(+), 74 deletions(-) diff --git a/engine/code/cgame/cg_rally_hud.c b/engine/code/cgame/cg_rally_hud.c index 0ce2a36a..10d4a844 100644 --- a/engine/code/cgame/cg_rally_hud.c +++ b/engine/code/cgame/cg_rally_hud.c @@ -422,9 +422,9 @@ static float CG_DrawTimes( float y ) { Com_sprintf(s, sizeof(s), "B: %s", time); // x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH; - x = 636 - 120; - CG_FillRect ( x + cg_wideoffset.integer, y, 120, 18, bgColor ); - x+= 25; + x = 636 - 80; + CG_FillRect ( x + cg_wideoffset.integer, y, 90, 18, bgColor ); + x+= 10; y+= 4; CG_DrawTinyDigitalStringColor( x + cg_wideoffset.integer, y, s, colorWhite); @@ -442,9 +442,9 @@ static float CG_DrawTimes( float y ) { Com_sprintf(s, sizeof(s), "L: %s", time); // x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH; - x = 636 - 120; - CG_FillRect( x + cg_wideoffset.integer, y, 120, 18, bgColor ); - x+= 25; + x = 636 - 80; + CG_FillRect( x + cg_wideoffset.integer, y, 90, 18, bgColor ); + x+= 10; y+= 4; CG_DrawTinyDigitalStringColor( x + cg_wideoffset.integer, y, s, colorWhite); @@ -469,9 +469,9 @@ static float CG_DrawTimes( float y ) { Com_sprintf(s, sizeof(s), "T: %s", time); - x = 636 - 120; - CG_FillRect( x + cg_wideoffset.integer, y, 120, 18, bgColor ); - x += 25; + x = 636 - 80; + CG_FillRect( x + cg_wideoffset.integer, y, 90, 18, bgColor ); + x += 10; y += 4; CG_DrawTinyDigitalStringColor( x + cg_wideoffset.integer, y, s, colorWhite); @@ -504,9 +504,9 @@ static float CG_DrawLaps( float y ) { Com_sprintf(s, sizeof(s), "LAP: %i/%i", curLap, numLaps); - x = 636 - 120; - CG_FillRect( x + cg_wideoffset.integer, y, 120, 18, bgColor ); - x += 25; + x = 636 - 80; + CG_FillRect( x + cg_wideoffset.integer, y, 90, 18, bgColor ); + x += 10; y += 4; CG_DrawTinyDigitalStringColor( x + cg_wideoffset.integer, y, s, colorWhite); @@ -536,13 +536,13 @@ static float CG_DrawCurrentPosition( float y ) { Com_sprintf(s, sizeof(s), "POS: "); - x = 636 - 120; - width = 120; + x = 636 - 80; + width = 90; height = 18; CG_FillRect( x + cg_wideoffset.integer, y, width, height, bgColor ); - x += 25; + x += 10; y += 4; CG_DrawTinyDigitalStringColor( x + cg_wideoffset.integer, y, s, colorWhite); @@ -550,8 +550,8 @@ static float CG_DrawCurrentPosition( float y ) { x += TINYCHAR_WIDTH * 5; CG_DrawTinyDigitalStringColor( x + cg_wideoffset.integer, y, va("%i/%i", pos, cgs.numRacers), colorWhite); - - y += 10 + 4; + + y += 20; return y; } @@ -579,8 +579,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 - 120; - width = 120; + x = 636 - 80; + width = 90; height = TINYCHAR_HEIGHT; for (i = startPos; i <= endPos; i++){ diff --git a/engine/code/qcommon/q_shared.h b/engine/code/qcommon/q_shared.h index 5b5c890d..3b45aeb8 100644 --- a/engine/code/qcommon/q_shared.h +++ b/engine/code/qcommon/q_shared.h @@ -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.3c_r457" +#define PRODUCT_VERSION "v0.3c_r458" #endif diff --git a/q3rallycode.ppr b/q3rallycode.ppr index a8bd8a74..b6d63c10 100644 --- a/q3rallycode.ppr +++ b/q3rallycode.ppr @@ -122,7 +122,7 @@ q3rallycode engine\code\botlib\l_utils.h engine\code\botlib\lcc.mak engine\code\botlib\linux-i386.mak - -cgame + +cgame engine\code\cgame\cg_atmospheric.c engine\code\cgame\cg_consolecmds.c engine\code\cgame\cg_draw.c @@ -454,7 +454,7 @@ q3rallycode engine\code\null\null_main.c engine\code\null\null_net.c engine\code\null\null_snddma.c - +q3_ui + -q3_ui engine\code\q3_ui\ui.def engine\code\q3_ui\ui_addbots.c engine\code\q3_ui\ui_atoms.c @@ -886,61 +886,17 @@ q3rallycode engine\cross-make-mingw64.sh [Open project files] 0=engine\code\qcommon\q_shared.h -1=engine\code\game\g_session.c -2=engine\code\cgame\cg_info.c -3=engine\code\cgame\cg_rally_hud2.c -4=engine\code\cgame\cg_rally_tools.c -5=engine\code\game\ai_dmnet.c -6=engine\code\game\ai_dmq3.c -7=engine\code\game\bg_public.h -8=engine\code\game\g_rally_tools.c -9=engine\code\q3_ui\ui_rally_servers.c -10=engine\code\q3_ui\ui_rally_startserver.c -11=engine\code\q3_ui\ui_servers2.c -12=engine\code\q3_ui\ui_team.c -13=engine\code\game\g_spawn.c +1=engine\code\cgame\cg_rally_hud.c +2=engine\code\cgame\cg_rally_hud2.c [Selected Project Files] Main= -Selected=engine\code\game\bg_public.h +Selected=engine\code\qcommon\q_shared.h [engine\code\qcommon\q_shared.h] TopLine=57 Caret=36,70 -[engine\code\game\g_session.c] -TopLine=130 -Caret=1,146 -[engine\code\cgame\cg_info.c] -TopLine=271 -Caret=25,288 +[engine\code\cgame\cg_rally_hud.c] +TopLine=533 +Caret=5,553 [engine\code\cgame\cg_rally_hud2.c] -TopLine=110 -Caret=51,123 -[engine\code\cgame\cg_rally_tools.c] -TopLine=769 -Caret=1,785 -[engine\code\game\ai_dmnet.c] -TopLine=2347 -Caret=1,2435 -[engine\code\game\ai_dmq3.c] -TopLine=2971 -Caret=1,2991 -[engine\code\game\bg_public.h] -TopLine=47 -Caret=36,63 -[engine\code\game\g_rally_tools.c] -TopLine=206 -Caret=1,212 -[engine\code\q3_ui\ui_rally_servers.c] -TopLine=478 -Caret=1,494 -[engine\code\q3_ui\ui_rally_startserver.c] -TopLine=2179 -Caret=1,2195 -[engine\code\q3_ui\ui_servers2.c] -TopLine=1154 -Caret=31,1171 -[engine\code\q3_ui\ui_team.c] -TopLine=188 -Caret=1,210 -[engine\code\game\g_spawn.c] -TopLine=467 -Caret=1,483 +TopLine=160 +Caret=40,204