mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Remove RAVENMD4 #define
This commit is contained in:
parent
e14a814ba2
commit
ecd50f01c2
14 changed files with 3 additions and 85 deletions
|
@ -16,9 +16,7 @@ fi
|
|||
|
||||
# Test additional options
|
||||
if [ $haveExternalLibs -eq 1 ]; then
|
||||
($MAKE clean release USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4) || failed=1;
|
||||
else
|
||||
($MAKE clean release CFLAGS=-DRAVENMD4) || failed=1;
|
||||
($MAKE clean release USE_CODEC_VORBIS=1 USE_FREETYPE=1) || failed=1;
|
||||
fi
|
||||
|
||||
if [ $failed -eq 1 ]; then
|
||||
|
|
|
@ -281,12 +281,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
|
||||
|
@ -389,7 +383,6 @@ typedef struct {
|
|||
int ofsEnd; // end of file
|
||||
} mdrHeader_t;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
|
|
@ -168,8 +168,6 @@ void RB_SurfaceAnim( md4Surface_t *surface ) {
|
|||
}
|
||||
|
||||
|
||||
#ifdef RAVENMD4
|
||||
|
||||
// copied and adapted from tr_mesh.c
|
||||
|
||||
/*
|
||||
|
@ -655,4 +653,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
|
||||
|
|
|
@ -495,9 +495,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
|
||||
|
@ -747,9 +745,7 @@ typedef enum {
|
|||
MOD_BRUSH,
|
||||
MOD_MESH,
|
||||
MOD_MD4,
|
||||
#ifdef RAVENMD4
|
||||
MOD_MDR,
|
||||
#endif
|
||||
MOD_IQM
|
||||
} modtype_t;
|
||||
|
||||
|
@ -1378,7 +1374,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
|
||||
/*
|
||||
=============================================================
|
||||
|
||||
|
@ -1397,7 +1392,6 @@ UNCOMPRESSING BONES
|
|||
#define MC_SCALE_Z (1.0f/64)
|
||||
|
||||
void MC_UnCompress(float mat[3][4],const unsigned char * comp);
|
||||
#endif
|
||||
|
||||
/*
|
||||
=============================================================
|
||||
|
@ -1410,10 +1404,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 );
|
||||
|
|
|
@ -1249,11 +1249,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;
|
||||
|
|
|
@ -168,10 +168,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 )
|
||||
|
@ -184,7 +182,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;
|
||||
|
@ -196,7 +193,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 );
|
||||
|
||||
|
|
|
@ -27,9 +27,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
|
||||
|
||||
/*
|
||||
====================
|
||||
|
@ -116,7 +114,6 @@ qhandle_t R_RegisterMD3(const char *name, model_t *mod)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef RAVENMD4
|
||||
/*
|
||||
====================
|
||||
R_RegisterMDR
|
||||
|
@ -154,7 +151,6 @@ qhandle_t R_RegisterMDR(const char *name, model_t *mod)
|
|||
|
||||
return mod->index;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
====================
|
||||
|
@ -203,9 +199,7 @@ typedef struct
|
|||
static modelExtToLoaderMap_t modelLoaders[ ] =
|
||||
{
|
||||
{ "iqm", R_RegisterIQM },
|
||||
#ifdef RAVENMD4
|
||||
{ "mdr", R_RegisterMDR },
|
||||
#endif
|
||||
{ "md4", R_RegisterMD3 },
|
||||
{ "md3", R_RegisterMD3 }
|
||||
};
|
||||
|
@ -536,7 +530,6 @@ static qboolean R_LoadMD3 (model_t *mod, int lod, void *buffer, const char *mod_
|
|||
}
|
||||
|
||||
|
||||
#ifdef RAVENMD4
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -875,7 +868,6 @@ static qboolean R_LoadMDR( model_t *mod, void *buffer, int filesize, const char
|
|||
|
||||
return qtrue;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -1136,7 +1128,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;
|
||||
|
@ -1180,7 +1171,6 @@ void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, md3Tag_t
|
|||
VectorClear( dest->origin );
|
||||
strcpy(dest->name,"");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -1190,9 +1180,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;
|
||||
|
@ -1200,7 +1188,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;
|
||||
|
@ -1208,9 +1195,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 );
|
||||
|
@ -1286,7 +1271,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;
|
||||
|
@ -1298,7 +1282,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;
|
||||
|
||||
|
|
|
@ -1234,9 +1234,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
|
||||
|
|
|
@ -168,7 +168,6 @@ void RB_SurfaceAnim( md4Surface_t *surface ) {
|
|||
}
|
||||
|
||||
|
||||
#ifdef RAVENMD4
|
||||
|
||||
// copied and adapted from tr_mesh.c
|
||||
|
||||
|
@ -655,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
|
||||
|
|
|
@ -1000,9 +1000,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
|
||||
|
@ -1505,9 +1503,7 @@ typedef enum {
|
|||
MOD_BRUSH,
|
||||
MOD_MESH,
|
||||
MOD_MD4,
|
||||
#ifdef RAVENMD4
|
||||
MOD_MDR,
|
||||
#endif
|
||||
MOD_IQM
|
||||
} modtype_t;
|
||||
|
||||
|
@ -2467,7 +2463,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
|
||||
/*
|
||||
=============================================================
|
||||
|
||||
|
@ -2486,7 +2481,6 @@ UNCOMPRESSING BONES
|
|||
#define MC_SCALE_Z (1.0f/64)
|
||||
|
||||
void MC_UnCompress(float mat[3][4],const unsigned char * comp);
|
||||
#endif
|
||||
|
||||
/*
|
||||
=============================================================
|
||||
|
@ -2499,10 +2493,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 );
|
||||
|
|
|
@ -2001,11 +2001,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;
|
||||
|
@ -2295,7 +2293,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
|
||||
|
@ -2306,7 +2303,6 @@ void R_RenderPshadowMaps(const refdef_t *fd)
|
|||
radius = frame->radius;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case MOD_IQM:
|
||||
{
|
||||
// FIXME: never actually tested this
|
||||
|
|
|
@ -168,10 +168,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 )
|
||||
|
@ -184,7 +182,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;
|
||||
|
@ -196,7 +193,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;
|
||||
|
|
|
@ -27,9 +27,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
|
||||
|
||||
/*
|
||||
====================
|
||||
|
@ -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 }
|
||||
};
|
||||
|
@ -796,7 +790,6 @@ static qboolean R_LoadMD3(model_t * mod, int lod, void *buffer, int bufferSize,
|
|||
}
|
||||
|
||||
|
||||
#ifdef RAVENMD4
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -1135,7 +1128,6 @@ static qboolean R_LoadMDR( model_t *mod, void *buffer, int filesize, const char
|
|||
|
||||
return qtrue;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -1402,7 +1394,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;
|
||||
|
@ -1443,7 +1434,6 @@ void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, mdvTag_t
|
|||
AxisClear( dest->axis );
|
||||
VectorClear( dest->origin );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -1453,9 +1443,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;
|
||||
|
@ -1463,7 +1451,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;
|
||||
|
@ -1471,9 +1458,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 );
|
||||
|
@ -1549,7 +1534,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;
|
||||
|
@ -1561,7 +1545,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;
|
||||
|
||||
|
|
|
@ -1647,9 +1647,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
|
||||
|
|
Loading…
Reference in a new issue