From bb4313ceade2e6f1312f044aabd684782442b2bb Mon Sep 17 00:00:00 2001 From: q3rally Date: Thu, 14 Apr 2016 12:01:56 +0000 Subject: [PATCH] Bring back the minimap feature. Will be more useful in the future. Still some work left on it. --- engine/code/cgame/cg_draw.c | 2 +- engine/code/cgame/cg_local.h | 10 +++++----- engine/code/cgame/cg_main.c | 8 ++++---- engine/code/cgame/cg_rally_hud.c | 6 +++--- engine/code/cgame/cg_view.c | 6 +++--- engine/code/qcommon/q_shared.h | 2 +- q3rallycode.ppr | 6 +++++- 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/engine/code/cgame/cg_draw.c b/engine/code/cgame/cg_draw.c index 21fd8b01..99265758 100644 --- a/engine/code/cgame/cg_draw.c +++ b/engine/code/cgame/cg_draw.c @@ -3355,7 +3355,7 @@ void CG_DrawActive( stereoFrame_t stereoView ) { if ( !cg.scoreBoardShowing ) CG_DrawRearviewMirror( 170, 10, 300, 75); -// CG_DrawMMap( 0, 50, 160, 120); //TBB draw minimap function + CG_DrawMMap( 0, 50, 160, 120); //TBB draw minimap function // Q3Rally Code END diff --git a/engine/code/cgame/cg_local.h b/engine/code/cgame/cg_local.h index bd334916..1458a107 100644 --- a/engine/code/cgame/cg_local.h +++ b/engine/code/cgame/cg_local.h @@ -1,7 +1,7 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. -Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com) +Copyright (C) 2002-2009 Q3Rally Team (Per Thormann - perle@q3rally.com) This file is part of q3rally source code. @@ -664,7 +664,7 @@ typedef struct { refdef_t refdef; // Q3Rally Code Start refdef_t mirrorRefdef; -// refdef_t mmapRefdef; //TBB minimap rendering + refdef_t mmapRefdef; //TBB minimap rendering // Q3Rally Code END vec3_t refdefViewAngles; // will be converted to refdef.viewaxis @@ -1107,7 +1107,7 @@ typedef struct { qhandle_t rearviewMirrorShader; //TBB - minimap handling -// qhandle_t MMapShader; + qhandle_t MMapShader; //TBB FIN qhandle_t turboModel; // Q3Rally Code END @@ -1516,7 +1516,7 @@ extern vmCvar_t cg_minSkidLength; extern vmCvar_t cg_controlMode; extern vmCvar_t cg_manualShift; extern vmCvar_t cg_drawRearView; -// extern vmCvar_t cg_drawMMap; //TBB - minimap +extern vmCvar_t cg_drawMMap; //TBB - minimap extern vmCvar_t cg_checkpointArrowMode; extern vmCvar_t cg_atmosphericLevel; @@ -1950,7 +1950,7 @@ 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 ); +void CG_DrawMMap( float x, float y, float w, float h ); //TBB FIN // diff --git a/engine/code/cgame/cg_main.c b/engine/code/cgame/cg_main.c index e777ec07..b955a018 100644 --- a/engine/code/cgame/cg_main.c +++ b/engine/code/cgame/cg_main.c @@ -1,7 +1,7 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. -Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com) +Copyright (C) 2002-2009 Q3Rally Team (Per Thormann - perle@q3rally.com) This file is part of q3rally source code. @@ -242,7 +242,7 @@ vmCvar_t cg_manualShift; vmCvar_t cg_minSkidLength; vmCvar_t cg_drawRearView; vmCvar_t cg_checkpointArrowMode; -// vmCvar_t cg_drawMMap; //TBB - minimap cvar +vmCvar_t cg_drawMMap; //TBB - minimap cvar vmCvar_t cg_developer; @@ -344,7 +344,7 @@ static cvarTable_t cvarTable[] = { { &cg_metricUnits, "cg_metricUnits", "0", CVAR_ARCHIVE }, { &cg_minSkidLength, "cg_minSkidLength", "12", CVAR_ARCHIVE }, { &cg_drawRearView, "cg_drawRearView", "0", CVAR_ARCHIVE }, -// { &cg_drawMMap, "cg_drawMMap", "1", CVAR_ARCHIVE }, //TBB minimap - default on + { &cg_drawMMap, "cg_drawMMap", "1", CVAR_ARCHIVE }, //TBB minimap - default on { &cg_controlMode, "cg_controlMode", "0", CVAR_ARCHIVE | CVAR_USERINFO }, { &cg_manualShift, "cg_manualShift", "0", CVAR_ARCHIVE | CVAR_USERINFO }, { &cg_checkpointArrowMode, "cg_checkpointArrowMode", "1", CVAR_ARCHIVE }, @@ -1053,7 +1053,7 @@ static void CG_RegisterGraphics( void ) { // Q3Rally Code Start cgs.media.rearviewMirrorShader = trap_R_RegisterShaderNoMip("gfx/rearview/frame" ); -// cgs.media.MMapShader = trap_R_RegisterShaderNoMip("gfx/hud/minimap" ); //TBB mmap + cgs.media.MMapShader = trap_R_RegisterShaderNoMip("gfx/hud/minimap" ); //TBB mmap // skid shaders cgs.media.SMAsphaltShader = trap_R_RegisterShader("gfx/skidmarks/asphalt" ); diff --git a/engine/code/cgame/cg_rally_hud.c b/engine/code/cgame/cg_rally_hud.c index 1be90f8d..fb13ba5b 100644 --- a/engine/code/cgame/cg_rally_hud.c +++ b/engine/code/cgame/cg_rally_hud.c @@ -131,7 +131,7 @@ 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 ) { int i; @@ -152,7 +152,7 @@ void CG_DrawMMap( float x, float y, float w, float h ) { return; if ( (cgs.gametype != GT_RACING) || (cgs.gametype != GT_TEAM_RACING) ) - return; + return; */ mx = x ; my = y ; @@ -183,7 +183,7 @@ void CG_DrawMMap( float x, float y, float w, float h ) { //TBB /*only add players to minimap scene - add ctf flag entities later + add ctf flag entities later*/ if (cg_rearViewRenderLevel.integer & RL_MARKS){ CG_AddMarks(); } diff --git a/engine/code/cgame/cg_view.c b/engine/code/cgame/cg_view.c index 3599891a..060557c8 100644 --- a/engine/code/cgame/cg_view.c +++ b/engine/code/cgame/cg_view.c @@ -1,7 +1,7 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. -Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com) +Copyright (C) 2002-2009 Q3Rally Team (Per Thormann - perle@q3rally.com) This file is part of q3rally source code. @@ -762,7 +762,7 @@ static int CG_CalcViewValues( void ) { and not following player movement may have to set new standard in level design (center the entire map to origin) - + */ if( cg_drawMMap.integer ) { vec3_t angles; @@ -818,7 +818,7 @@ static int CG_CalcViewValues( void ) { cg.mmapRefdef.vieworg[0] = 0; // + : forward cg.mmapRefdef.vieworg[1] = 0; // + : left cg.mmapRefdef.vieworg[2] = 512; // + : up - + */ VectorCopy( ps->origin, cg.mmapRefdef.vieworg ); diff --git a/engine/code/qcommon/q_shared.h b/engine/code/qcommon/q_shared.h index 2f8d14a0..acb613ea 100644 --- a/engine/code/qcommon/q_shared.h +++ b/engine/code/qcommon/q_shared.h @@ -55,7 +55,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define BASETA "missionpack" #ifndef PRODUCT_VERSION -#define PRODUCT_VERSION "v0.0.0.4 r131" +#define PRODUCT_VERSION "v0.0.0.4 r132" #endif #define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION diff --git a/q3rallycode.ppr b/q3rallycode.ppr index 32a381e4..7dbb0d6b 100644 --- a/q3rallycode.ppr +++ b/q3rallycode.ppr @@ -94,7 +94,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 @@ -857,9 +857,13 @@ q3rallycode engine\resync_svn.sh [Open project files] 0=engine\code\qcommon\q_shared.h +1=engine\code\cgame\cg_draw.c [Selected Project Files] Main= Selected=engine\code\qcommon\q_shared.h [engine\code\qcommon\q_shared.h] TopLine=42 Caret=39,58 +[engine\code\cgame\cg_draw.c] +TopLine=1 +Caret=1,1