summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2013-03-18 19:02:29 +0000
committerTim Angus <tim@ngus.net>2013-03-19 16:41:20 +0000
commitfda5b3cf61097ce300f6bd700c192a6acb44a905 (patch)
treea7b63855c2935a87701d37fa08faa830f8409e98 /src
parentd848901749d5d3a73a7111bdbdd34b6c7ef85f67 (diff)
Remove RAVENMD4 #define
Diffstat (limited to 'src')
-rw-r--r--src/qcommon/qfiles.h7
-rw-r--r--src/renderergl1/tr_animation.c3
-rw-r--r--src/renderergl1/tr_local.h8
-rw-r--r--src/renderergl1/tr_main.c2
-rw-r--r--src/renderergl1/tr_mesh.c4
-rw-r--r--src/renderergl1/tr_model.c19
-rw-r--r--src/renderergl1/tr_surface.c2
-rw-r--r--src/renderergl2/tr_animation.c2
-rw-r--r--src/renderergl2/tr_local.h8
-rw-r--r--src/renderergl2/tr_main.c4
-rw-r--r--src/renderergl2/tr_mesh.c4
-rw-r--r--src/renderergl2/tr_model.c19
-rw-r--r--src/renderergl2/tr_surface.c2
13 files changed, 2 insertions, 82 deletions
diff --git a/src/qcommon/qfiles.h b/src/qcommon/qfiles.h
index 47dc75eb..72189261 100644
--- a/src/qcommon/qfiles.h
+++ b/src/qcommon/qfiles.h
@@ -282,12 +282,6 @@ typedef struct {
* - Thilo Schulz (arny@ats.s.bawue.de)
*/
-// If you want to enable support for Raven's .mdr / md4 format, uncomment the next
-// line.
-//#define RAVENMD4
-
-#ifdef RAVENMD4
-
#define MDR_IDENT (('5'<<24)+('M'<<16)+('D'<<8)+'R')
#define MDR_VERSION 2
#define MDR_MAX_BONES 128
@@ -390,7 +384,6 @@ typedef struct {
int ofsEnd; // end of file
} mdrHeader_t;
-#endif
/*
==============================================================================
diff --git a/src/renderergl1/tr_animation.c b/src/renderergl1/tr_animation.c
index b983ef32..53d2f4c6 100644
--- a/src/renderergl1/tr_animation.c
+++ b/src/renderergl1/tr_animation.c
@@ -169,8 +169,6 @@ void RB_SurfaceAnim( md4Surface_t *surface ) {
}
-#ifdef RAVENMD4
-
// copied and adapted from tr_mesh.c
/*
@@ -656,4 +654,3 @@ void MC_UnCompress(float mat[3][4],const unsigned char * comp)
val-=1<<(MC_BITS_VECT-1);
mat[2][2]=((float)(val))*MC_SCALE_VECT;
}
-#endif
diff --git a/src/renderergl1/tr_local.h b/src/renderergl1/tr_local.h
index 14dfa6d5..045cf36f 100644
--- a/src/renderergl1/tr_local.h
+++ b/src/renderergl1/tr_local.h
@@ -496,9 +496,7 @@ typedef enum {
SF_POLY,
SF_MD3,
SF_MD4,
-#ifdef RAVENMD4
SF_MDR,
-#endif
SF_IQM,
SF_FLARE,
SF_ENTITY, // beams, rails, lightning, etc that can be determined by entity
@@ -748,9 +746,7 @@ typedef enum {
MOD_BRUSH,
MOD_MESH,
MOD_MD4,
-#ifdef RAVENMD4
MOD_MDR,
-#endif
MOD_IQM
} modtype_t;
@@ -1381,7 +1377,6 @@ void RE_AddLightToScene( const vec3_t org, float intensity, float r, float g, fl
void RE_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b );
void RE_RenderScene( const refdef_t *fd );
-#ifdef RAVENMD4
/*
=============================================================
@@ -1400,7 +1395,6 @@ UNCOMPRESSING BONES
#define MC_SCALE_Z (1.0f/64)
void MC_UnCompress(float mat[3][4],const unsigned char * comp);
-#endif
/*
=============================================================
@@ -1413,10 +1407,8 @@ ANIMATED MODELS
// void R_MakeAnimModel( model_t *model ); haven't seen this one really, so not needed I guess.
void R_AddAnimSurfaces( trRefEntity_t *ent );
void RB_SurfaceAnim( md4Surface_t *surfType );
-#ifdef RAVENMD4
void R_MDRAddAnimSurfaces( trRefEntity_t *ent );
void RB_MDRSurfaceAnim( md4Surface_t *surface );
-#endif
qboolean R_LoadIQM (model_t *mod, void *buffer, int filesize, const char *name );
void R_AddIQMSurfaces( trRefEntity_t *ent );
void RB_IQMSurfaceAnim( surfaceType_t *surface );
diff --git a/src/renderergl1/tr_main.c b/src/renderergl1/tr_main.c
index 76ed1244..2b6ce52f 100644
--- a/src/renderergl1/tr_main.c
+++ b/src/renderergl1/tr_main.c
@@ -1250,11 +1250,9 @@ void R_AddEntitySurfaces (void) {
case MOD_MD4:
R_AddAnimSurfaces( ent );
break;
-#ifdef RAVENMD4
case MOD_MDR:
R_MDRAddAnimSurfaces( ent );
break;
-#endif
case MOD_IQM:
R_AddIQMSurfaces( ent );
break;
diff --git a/src/renderergl1/tr_mesh.c b/src/renderergl1/tr_mesh.c
index cb7707e7..6ce897e6 100644
--- a/src/renderergl1/tr_mesh.c
+++ b/src/renderergl1/tr_mesh.c
@@ -169,10 +169,8 @@ int R_ComputeLOD( trRefEntity_t *ent ) {
float flod, lodscale;
float projectedRadius;
md3Frame_t *frame;
-#ifdef RAVENMD4
mdrHeader_t *mdr;
mdrFrame_t *mdrframe;
-#endif
int lod;
if ( tr.currentModel->numLods < 2 )
@@ -185,7 +183,6 @@ int R_ComputeLOD( trRefEntity_t *ent ) {
// multiple LODs exist, so compute projected bounding sphere
// and use that as a criteria for selecting LOD
-#ifdef RAVENMD4
if(tr.currentModel->type == MOD_MDR)
{
int frameSize;
@@ -197,7 +194,6 @@ int R_ComputeLOD( trRefEntity_t *ent ) {
radius = RadiusFromBounds(mdrframe->bounds[0], mdrframe->bounds[1]);
}
else
-#endif
{
frame = ( md3Frame_t * ) ( ( ( unsigned char * ) tr.currentModel->md3[0] ) + tr.currentModel->md3[0]->ofsFrames );
diff --git a/src/renderergl1/tr_model.c b/src/renderergl1/tr_model.c
index c4c66005..770d0066 100644
--- a/src/renderergl1/tr_model.c
+++ b/src/renderergl1/tr_model.c
@@ -28,9 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
static qboolean R_LoadMD3(model_t *mod, int lod, void *buffer, const char *name );
static qboolean R_LoadMD4(model_t *mod, void *buffer, const char *name );
-#ifdef RAVENMD4
static qboolean R_LoadMDR(model_t *mod, void *buffer, int filesize, const char *name );
-#endif
/*
====================
@@ -117,7 +115,6 @@ qhandle_t R_RegisterMD3(const char *name, model_t *mod)
return 0;
}
-#ifdef RAVENMD4
/*
====================
R_RegisterMDR
@@ -155,7 +152,6 @@ qhandle_t R_RegisterMDR(const char *name, model_t *mod)
return mod->index;
}
-#endif
/*
====================
@@ -204,9 +200,7 @@ typedef struct
static modelExtToLoaderMap_t modelLoaders[ ] =
{
{ "iqm", R_RegisterIQM },
-#ifdef RAVENMD4
{ "mdr", R_RegisterMDR },
-#endif
{ "md4", R_RegisterMD3 },
{ "md3", R_RegisterMD3 }
};
@@ -537,7 +531,6 @@ static qboolean R_LoadMD3 (model_t *mod, int lod, void *buffer, const char *mod_
}
-#ifdef RAVENMD4
/*
=================
@@ -876,7 +869,6 @@ static qboolean R_LoadMDR( model_t *mod, void *buffer, int filesize, const char
return qtrue;
}
-#endif
/*
=================
@@ -1137,7 +1129,6 @@ static md3Tag_t *R_GetTag( md3Header_t *mod, int frame, const char *tagName ) {
return NULL;
}
-#ifdef RAVENMD4
void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, md3Tag_t * dest)
{
int i, j, k;
@@ -1181,7 +1172,6 @@ void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, md3Tag_t
VectorClear( dest->origin );
strcpy(dest->name,"");
}
-#endif
/*
================
@@ -1191,9 +1181,7 @@ R_LerpTag
int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFrame,
float frac, const char *tagName ) {
md3Tag_t *start, *end;
-#ifdef RAVENMD4
md3Tag_t start_space, end_space;
-#endif
int i;
float frontLerp, backLerp;
model_t *model;
@@ -1201,7 +1189,6 @@ int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFram
model = R_GetModelByHandle( handle );
if ( !model->md3[0] )
{
-#ifdef RAVENMD4
if(model->type == MOD_MDR)
{
start = &start_space;
@@ -1209,9 +1196,7 @@ int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFram
R_GetAnimTag((mdrHeader_t *) model->modelData, startFrame, tagName, start);
R_GetAnimTag((mdrHeader_t *) model->modelData, endFrame, tagName, end);
}
- else
-#endif
- if( model->type == MOD_IQM ) {
+ else if( model->type == MOD_IQM ) {
return R_IQMLerpTag( tag, model->modelData,
startFrame, endFrame,
frac, tagName );
@@ -1287,7 +1272,6 @@ void R_ModelBounds( qhandle_t handle, vec3_t mins, vec3_t maxs ) {
VectorCopy( frame->bounds[1], maxs );
return;
-#ifdef RAVENMD4
} else if (model->type == MOD_MDR) {
mdrHeader_t *header;
mdrFrame_t *frame;
@@ -1299,7 +1283,6 @@ void R_ModelBounds( qhandle_t handle, vec3_t mins, vec3_t maxs ) {
VectorCopy( frame->bounds[1], maxs );
return;
-#endif
} else if(model->type == MOD_IQM) {
iqmData_t *iqmData;
diff --git a/src/renderergl1/tr_surface.c b/src/renderergl1/tr_surface.c
index 26c4eb75..4b8944cd 100644
--- a/src/renderergl1/tr_surface.c
+++ b/src/renderergl1/tr_surface.c
@@ -1235,9 +1235,7 @@ void (*rb_surfaceTable[SF_NUM_SURFACE_TYPES])( void *) = {
(void(*)(void*))RB_SurfacePolychain, // SF_POLY,
(void(*)(void*))RB_SurfaceMesh, // SF_MD3,
(void(*)(void*))RB_SurfaceAnim, // SF_MD4,
-#ifdef RAVENMD4
(void(*)(void*))RB_MDRSurfaceAnim, // SF_MDR,
-#endif
(void(*)(void*))RB_IQMSurfaceAnim, // SF_IQM,
(void(*)(void*))RB_SurfaceFlare, // SF_FLARE,
(void(*)(void*))RB_SurfaceEntity, // SF_ENTITY
diff --git a/src/renderergl2/tr_animation.c b/src/renderergl2/tr_animation.c
index 66074e1d..7a6092de 100644
--- a/src/renderergl2/tr_animation.c
+++ b/src/renderergl2/tr_animation.c
@@ -169,7 +169,6 @@ void RB_SurfaceAnim( md4Surface_t *surface ) {
}
-#ifdef RAVENMD4
// copied and adapted from tr_mesh.c
@@ -656,4 +655,3 @@ void MC_UnCompress(float mat[3][4],const unsigned char * comp)
val-=1<<(MC_BITS_VECT-1);
mat[2][2]=((float)(val))*MC_SCALE_VECT;
}
-#endif
diff --git a/src/renderergl2/tr_local.h b/src/renderergl2/tr_local.h
index bb6d79d1..77adcc38 100644
--- a/src/renderergl2/tr_local.h
+++ b/src/renderergl2/tr_local.h
@@ -1001,9 +1001,7 @@ typedef enum {
SF_POLY,
SF_MDV,
SF_MD4,
-#ifdef RAVENMD4
SF_MDR,
-#endif
SF_IQM,
SF_FLARE,
SF_ENTITY, // beams, rails, lightning, etc that can be determined by entity
@@ -1506,9 +1504,7 @@ typedef enum {
MOD_BRUSH,
MOD_MESH,
MOD_MD4,
-#ifdef RAVENMD4
MOD_MDR,
-#endif
MOD_IQM
} modtype_t;
@@ -2470,7 +2466,6 @@ void RE_AddLightToScene( const vec3_t org, float intensity, float r, float g, fl
void RE_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b );
void RE_RenderScene( const refdef_t *fd );
-#ifdef RAVENMD4
/*
=============================================================
@@ -2489,7 +2484,6 @@ UNCOMPRESSING BONES
#define MC_SCALE_Z (1.0f/64)
void MC_UnCompress(float mat[3][4],const unsigned char * comp);
-#endif
/*
=============================================================
@@ -2502,10 +2496,8 @@ ANIMATED MODELS
// void R_MakeAnimModel( model_t *model ); haven't seen this one really, so not needed I guess.
void R_AddAnimSurfaces( trRefEntity_t *ent );
void RB_SurfaceAnim( md4Surface_t *surfType );
-#ifdef RAVENMD4
void R_MDRAddAnimSurfaces( trRefEntity_t *ent );
void RB_MDRSurfaceAnim( md4Surface_t *surface );
-#endif
qboolean R_LoadIQM (model_t *mod, void *buffer, int filesize, const char *name );
void R_AddIQMSurfaces( trRefEntity_t *ent );
void RB_IQMSurfaceAnim( surfaceType_t *surface );
diff --git a/src/renderergl2/tr_main.c b/src/renderergl2/tr_main.c
index 94633bd1..2f528bb3 100644
--- a/src/renderergl2/tr_main.c
+++ b/src/renderergl2/tr_main.c
@@ -2002,11 +2002,9 @@ static void R_AddEntitySurface (int entityNum)
case MOD_MD4:
R_AddAnimSurfaces( ent );
break;
-#ifdef RAVENMD4
case MOD_MDR:
R_MDRAddAnimSurfaces( ent );
break;
-#endif
case MOD_IQM:
R_AddIQMSurfaces( ent );
break;
@@ -2296,7 +2294,6 @@ void R_RenderPshadowMaps(const refdef_t *fd)
radius = r_pshadowDist->value / 2.0f;
}
break;
-#ifdef RAVENMD4
case MOD_MDR:
{
// FIXME: never actually tested this
@@ -2307,7 +2304,6 @@ void R_RenderPshadowMaps(const refdef_t *fd)
radius = frame->radius;
}
break;
-#endif
case MOD_IQM:
{
// FIXME: never actually tested this
diff --git a/src/renderergl2/tr_mesh.c b/src/renderergl2/tr_mesh.c
index d9297a71..d1adba2c 100644
--- a/src/renderergl2/tr_mesh.c
+++ b/src/renderergl2/tr_mesh.c
@@ -169,10 +169,8 @@ int R_ComputeLOD( trRefEntity_t *ent ) {
float flod, lodscale;
float projectedRadius;
mdvFrame_t *frame;
-#ifdef RAVENMD4
mdrHeader_t *mdr;
mdrFrame_t *mdrframe;
-#endif
int lod;
if ( tr.currentModel->numLods < 2 )
@@ -185,7 +183,6 @@ int R_ComputeLOD( trRefEntity_t *ent ) {
// multiple LODs exist, so compute projected bounding sphere
// and use that as a criteria for selecting LOD
-#ifdef RAVENMD4
if(tr.currentModel->type == MOD_MDR)
{
int frameSize;
@@ -197,7 +194,6 @@ int R_ComputeLOD( trRefEntity_t *ent ) {
radius = RadiusFromBounds(mdrframe->bounds[0], mdrframe->bounds[1]);
}
else
-#endif
{
//frame = ( md3Frame_t * ) ( ( ( unsigned char * ) tr.currentModel->md3[0] ) + tr.currentModel->md3[0]->ofsFrames );
frame = tr.currentModel->mdv[0]->frames;
diff --git a/src/renderergl2/tr_model.c b/src/renderergl2/tr_model.c
index 0884619b..cad7bd24 100644
--- a/src/renderergl2/tr_model.c
+++ b/src/renderergl2/tr_model.c
@@ -28,9 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
static qboolean R_LoadMD3(model_t *mod, int lod, void *buffer, int bufferSize, const char *modName);
static qboolean R_LoadMD4(model_t *mod, void *buffer, const char *name );
-#ifdef RAVENMD4
static qboolean R_LoadMDR(model_t *mod, void *buffer, int filesize, const char *name );
-#endif
/*
====================
@@ -118,7 +116,6 @@ qhandle_t R_RegisterMD3(const char *name, model_t *mod)
return 0;
}
-#ifdef RAVENMD4
/*
====================
R_RegisterMDR
@@ -156,7 +153,6 @@ qhandle_t R_RegisterMDR(const char *name, model_t *mod)
return mod->index;
}
-#endif
/*
====================
@@ -205,9 +201,7 @@ typedef struct
static modelExtToLoaderMap_t modelLoaders[ ] =
{
{ "iqm", R_RegisterIQM },
-#ifdef RAVENMD4
{ "mdr", R_RegisterMDR },
-#endif
{ "md4", R_RegisterMD3 },
{ "md3", R_RegisterMD3 }
};
@@ -797,7 +791,6 @@ static qboolean R_LoadMD3(model_t * mod, int lod, void *buffer, int bufferSize,
}
-#ifdef RAVENMD4
/*
=================
@@ -1136,7 +1129,6 @@ static qboolean R_LoadMDR( model_t *mod, void *buffer, int filesize, const char
return qtrue;
}
-#endif
/*
=================
@@ -1403,7 +1395,6 @@ static mdvTag_t *R_GetTag( mdvModel_t *mod, int frame, const char *_tagName ) {
return NULL;
}
-#ifdef RAVENMD4
void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, mdvTag_t * dest)
{
int i, j, k;
@@ -1444,7 +1435,6 @@ void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, mdvTag_t
AxisClear( dest->axis );
VectorClear( dest->origin );
}
-#endif
/*
================
@@ -1454,9 +1444,7 @@ R_LerpTag
int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFrame,
float frac, const char *tagName ) {
mdvTag_t *start, *end;
-#ifdef RAVENMD4
mdvTag_t start_space, end_space;
-#endif
int i;
float frontLerp, backLerp;
model_t *model;
@@ -1464,7 +1452,6 @@ int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFram
model = R_GetModelByHandle( handle );
if ( !model->mdv[0] )
{
-#ifdef RAVENMD4
if(model->type == MOD_MDR)
{
start = &start_space;
@@ -1472,9 +1459,7 @@ int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFram
R_GetAnimTag((mdrHeader_t *) model->modelData, startFrame, tagName, start);
R_GetAnimTag((mdrHeader_t *) model->modelData, endFrame, tagName, end);
}
- else
-#endif
- if( model->type == MOD_IQM ) {
+ else if( model->type == MOD_IQM ) {
return R_IQMLerpTag( tag, model->modelData,
startFrame, endFrame,
frac, tagName );
@@ -1550,7 +1535,6 @@ void R_ModelBounds( qhandle_t handle, vec3_t mins, vec3_t maxs ) {
VectorCopy( frame->bounds[1], maxs );
return;
-#ifdef RAVENMD4
} else if (model->type == MOD_MDR) {
mdrHeader_t *header;
mdrFrame_t *frame;
@@ -1562,7 +1546,6 @@ void R_ModelBounds( qhandle_t handle, vec3_t mins, vec3_t maxs ) {
VectorCopy( frame->bounds[1], maxs );
return;
-#endif
} else if(model->type == MOD_IQM) {
iqmData_t *iqmData;
diff --git a/src/renderergl2/tr_surface.c b/src/renderergl2/tr_surface.c
index 9577018a..3629c9f8 100644
--- a/src/renderergl2/tr_surface.c
+++ b/src/renderergl2/tr_surface.c
@@ -1648,9 +1648,7 @@ void (*rb_surfaceTable[SF_NUM_SURFACE_TYPES])( void *) = {
(void(*)(void*))RB_SurfacePolychain, // SF_POLY,
(void(*)(void*))RB_SurfaceMesh, // SF_MDV,
(void(*)(void*))RB_SurfaceAnim, // SF_MD4,
-#ifdef RAVENMD4
(void(*)(void*))RB_MDRSurfaceAnim, // SF_MDR,
-#endif
(void(*)(void*))RB_IQMSurfaceAnim, // SF_IQM,
(void(*)(void*))RB_SurfaceFlare, // SF_FLARE,
(void(*)(void*))RB_SurfaceEntity, // SF_ENTITY