Bring back the minimap feature. Will be more useful in the future. Still some work left on it.

This commit is contained in:
q3rally 2016-04-14 12:01:56 +00:00
parent df7d45e5f6
commit bb4313cead
7 changed files with 22 additions and 18 deletions

View file

@ -3355,7 +3355,7 @@ void CG_DrawActive( stereoFrame_t stereoView ) {
if ( !cg.scoreBoardShowing ) if ( !cg.scoreBoardShowing )
CG_DrawRearviewMirror( 170, 10, 300, 75); 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 // Q3Rally Code END

View file

@ -1,7 +1,7 @@
/* /*
=========================================================================== ===========================================================================
Copyright (C) 1999-2005 Id Software, Inc. 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. This file is part of q3rally source code.
@ -664,7 +664,7 @@ typedef struct {
refdef_t refdef; refdef_t refdef;
// Q3Rally Code Start // Q3Rally Code Start
refdef_t mirrorRefdef; refdef_t mirrorRefdef;
// refdef_t mmapRefdef; //TBB minimap rendering refdef_t mmapRefdef; //TBB minimap rendering
// Q3Rally Code END // Q3Rally Code END
vec3_t refdefViewAngles; // will be converted to refdef.viewaxis vec3_t refdefViewAngles; // will be converted to refdef.viewaxis
@ -1107,7 +1107,7 @@ typedef struct {
qhandle_t rearviewMirrorShader; qhandle_t rearviewMirrorShader;
//TBB - minimap handling //TBB - minimap handling
// qhandle_t MMapShader; qhandle_t MMapShader;
//TBB FIN //TBB FIN
qhandle_t turboModel; qhandle_t turboModel;
// Q3Rally Code END // Q3Rally Code END
@ -1516,7 +1516,7 @@ extern vmCvar_t cg_minSkidLength;
extern vmCvar_t cg_controlMode; extern vmCvar_t cg_controlMode;
extern vmCvar_t cg_manualShift; extern vmCvar_t cg_manualShift;
extern vmCvar_t cg_drawRearView; 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_checkpointArrowMode;
extern vmCvar_t cg_atmosphericLevel; 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 trying to get this to work like the minimap from UrT
from scratch. must try to make it 2d bitmap 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 //TBB FIN
// //

View file

@ -1,7 +1,7 @@
/* /*
=========================================================================== ===========================================================================
Copyright (C) 1999-2005 Id Software, Inc. 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. This file is part of q3rally source code.
@ -242,7 +242,7 @@ vmCvar_t cg_manualShift;
vmCvar_t cg_minSkidLength; vmCvar_t cg_minSkidLength;
vmCvar_t cg_drawRearView; vmCvar_t cg_drawRearView;
vmCvar_t cg_checkpointArrowMode; vmCvar_t cg_checkpointArrowMode;
// vmCvar_t cg_drawMMap; //TBB - minimap cvar vmCvar_t cg_drawMMap; //TBB - minimap cvar
vmCvar_t cg_developer; vmCvar_t cg_developer;
@ -344,7 +344,7 @@ static cvarTable_t cvarTable[] = {
{ &cg_metricUnits, "cg_metricUnits", "0", CVAR_ARCHIVE }, { &cg_metricUnits, "cg_metricUnits", "0", CVAR_ARCHIVE },
{ &cg_minSkidLength, "cg_minSkidLength", "12", CVAR_ARCHIVE }, { &cg_minSkidLength, "cg_minSkidLength", "12", CVAR_ARCHIVE },
{ &cg_drawRearView, "cg_drawRearView", "0", 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_controlMode, "cg_controlMode", "0", CVAR_ARCHIVE | CVAR_USERINFO },
{ &cg_manualShift, "cg_manualShift", "0", CVAR_ARCHIVE | CVAR_USERINFO }, { &cg_manualShift, "cg_manualShift", "0", CVAR_ARCHIVE | CVAR_USERINFO },
{ &cg_checkpointArrowMode, "cg_checkpointArrowMode", "1", CVAR_ARCHIVE }, { &cg_checkpointArrowMode, "cg_checkpointArrowMode", "1", CVAR_ARCHIVE },
@ -1053,7 +1053,7 @@ static void CG_RegisterGraphics( void ) {
// Q3Rally Code Start // Q3Rally Code Start
cgs.media.rearviewMirrorShader = trap_R_RegisterShaderNoMip("gfx/rearview/frame" ); 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 // skid shaders
cgs.media.SMAsphaltShader = trap_R_RegisterShader("gfx/skidmarks/asphalt" ); cgs.media.SMAsphaltShader = trap_R_RegisterShader("gfx/skidmarks/asphalt" );

View file

@ -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 trying to get this to work like the minimap from UrT
from scratch. must try to make it 2d bitmap 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 ) {
int i; int i;
@ -152,7 +152,7 @@ void CG_DrawMMap( float x, float y, float w, float h ) {
return; return;
if ( (cgs.gametype != GT_RACING) || (cgs.gametype != GT_TEAM_RACING) ) if ( (cgs.gametype != GT_RACING) || (cgs.gametype != GT_TEAM_RACING) )
return; return; */
mx = x ; mx = x ;
my = y ; my = y ;
@ -183,7 +183,7 @@ void CG_DrawMMap( float x, float y, float w, float h ) {
//TBB //TBB
/*only add players to minimap scene /*only add players to minimap scene
add ctf flag entities later add ctf flag entities later*/
if (cg_rearViewRenderLevel.integer & RL_MARKS){ if (cg_rearViewRenderLevel.integer & RL_MARKS){
CG_AddMarks(); CG_AddMarks();
} }

View file

@ -1,7 +1,7 @@
/* /*
=========================================================================== ===========================================================================
Copyright (C) 1999-2005 Id Software, Inc. 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. This file is part of q3rally source code.
@ -762,7 +762,7 @@ static int CG_CalcViewValues( void ) {
and not following player movement and not following player movement
may have to set new standard in level design may have to set new standard in level design
(center the entire map to origin) (center the entire map to origin)
*/
if( cg_drawMMap.integer ) if( cg_drawMMap.integer )
{ {
vec3_t angles; vec3_t angles;
@ -818,7 +818,7 @@ static int CG_CalcViewValues( void ) {
cg.mmapRefdef.vieworg[0] = 0; // + : forward cg.mmapRefdef.vieworg[0] = 0; // + : forward
cg.mmapRefdef.vieworg[1] = 0; // + : left cg.mmapRefdef.vieworg[1] = 0; // + : left
cg.mmapRefdef.vieworg[2] = 512; // + : up cg.mmapRefdef.vieworg[2] = 512; // + : up
*/
VectorCopy( ps->origin, cg.mmapRefdef.vieworg ); VectorCopy( ps->origin, cg.mmapRefdef.vieworg );

View file

@ -55,7 +55,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define BASETA "missionpack" #define BASETA "missionpack"
#ifndef PRODUCT_VERSION #ifndef PRODUCT_VERSION
#define PRODUCT_VERSION "v0.0.0.4 r131" #define PRODUCT_VERSION "v0.0.0.4 r132"
#endif #endif
#define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION #define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION

View file

@ -94,7 +94,7 @@ q3rallycode
engine\code\botlib\l_utils.h engine\code\botlib\l_utils.h
engine\code\botlib\lcc.mak engine\code\botlib\lcc.mak
engine\code\botlib\linux-i386.mak engine\code\botlib\linux-i386.mak
-cgame +cgame
engine\code\cgame\cg_atmospheric.c engine\code\cgame\cg_atmospheric.c
engine\code\cgame\cg_consolecmds.c engine\code\cgame\cg_consolecmds.c
engine\code\cgame\cg_draw.c engine\code\cgame\cg_draw.c
@ -857,9 +857,13 @@ q3rallycode
engine\resync_svn.sh engine\resync_svn.sh
[Open project files] [Open project files]
0=engine\code\qcommon\q_shared.h 0=engine\code\qcommon\q_shared.h
1=engine\code\cgame\cg_draw.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\qcommon\q_shared.h
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=42 TopLine=42
Caret=39,58 Caret=39,58
[engine\code\cgame\cg_draw.c]
TopLine=1
Caret=1,1