mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: cleanup unused functions
This commit is contained in:
@@ -24,7 +24,6 @@ float r_avertexnormals[NUMVERTEXNORMALS][3] = {
|
||||
};
|
||||
|
||||
|
||||
void R_AliasSetUpTransform( void );
|
||||
void R_AliasProjectAndClipTestFinalVert( finalvert_t *fv );
|
||||
|
||||
/*
|
||||
@@ -117,79 +116,6 @@ void R_SetUpWorldTransform( void )
|
||||
// aliasoldworldtransform[2][3] = RI.currententity->oldorigin[2];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
R_AliasSetUpTransform
|
||||
================
|
||||
*/
|
||||
void R_AliasSetUpTransform( void )
|
||||
{
|
||||
int i;
|
||||
static float viewmatrix[3][4];
|
||||
vec3_t angles;
|
||||
|
||||
// TODO: should really be stored with the entity instead of being reconstructed
|
||||
// TODO: should use a look-up table
|
||||
// TODO: could cache lazily, stored in the entity
|
||||
//
|
||||
|
||||
s_ziscale = (float)0x8000 * (float)0x10000;
|
||||
angles[ROLL] = RI.currententity->angles[ROLL];
|
||||
angles[PITCH] = RI.currententity->angles[PITCH];
|
||||
angles[YAW] = RI.currententity->angles[YAW];
|
||||
AngleVectors( angles, s_alias_forward, s_alias_right, s_alias_up );
|
||||
|
||||
// TODO: can do this with simple matrix rearrangement
|
||||
|
||||
memset( aliasworldtransform, 0, sizeof( aliasworldtransform ));
|
||||
memset( aliasoldworldtransform, 0, sizeof( aliasworldtransform ));
|
||||
|
||||
for( i = 0; i < 3; i++ )
|
||||
{
|
||||
aliasoldworldtransform[i][0] = aliasworldtransform[i][0] = s_alias_forward[i];
|
||||
aliasoldworldtransform[i][0] = aliasworldtransform[i][1] = -s_alias_right[i];
|
||||
aliasoldworldtransform[i][0] = aliasworldtransform[i][2] = s_alias_up[i];
|
||||
}
|
||||
|
||||
aliasworldtransform[0][3] = RI.currententity->origin[0] - RI.vieworg[0];
|
||||
aliasworldtransform[1][3] = RI.currententity->origin[1] - RI.vieworg[1];
|
||||
aliasworldtransform[2][3] = RI.currententity->origin[2] - RI.vieworg[2];
|
||||
|
||||
// aliasoldworldtransform[0][3] = RI.currententity->oldorigin[0]-r_origin[0];
|
||||
// aliasoldworldtransform[1][3] = RI.currententity->oldorigin[1]-r_origin[1];
|
||||
// aliasoldworldtransform[2][3] = RI.currententity->oldorigin[2]-r_origin[2];
|
||||
|
||||
// FIXME: can do more efficiently than full concatenation
|
||||
// memcpy( rotationmatrix, t2matrix, sizeof( rotationmatrix ) );
|
||||
|
||||
// R_ConcatTransforms (t2matrix, tmatrix, rotationmatrix);
|
||||
|
||||
// TODO: should be global, set when vright, etc., set
|
||||
VectorCopy( RI.vright, viewmatrix[0] );
|
||||
VectorCopy( RI.vup, viewmatrix[1] );
|
||||
VectorInverse( viewmatrix[1] );
|
||||
// VectorScale(viewmatrix[1], -1, viewmatrix[1]);
|
||||
VectorCopy( RI.vforward, viewmatrix[2] );
|
||||
|
||||
viewmatrix[0][3] = 0;
|
||||
viewmatrix[1][3] = 0;
|
||||
viewmatrix[2][3] = 0;
|
||||
|
||||
// memcpy( aliasworldtransform, rotationmatrix, sizeof( aliastransform ) );
|
||||
|
||||
// R_ConcatTransforms (viewmatrix, aliasworldtransform, aliastransform);
|
||||
Matrix3x4_ConcatTransforms( aliastransform, viewmatrix, aliasworldtransform );
|
||||
|
||||
aliasworldtransform[0][3] = RI.currententity->origin[0];
|
||||
aliasworldtransform[1][3] = RI.currententity->origin[1];
|
||||
aliasworldtransform[2][3] = RI.currententity->origin[2];
|
||||
|
||||
// aliasoldworldtransform[0][3] = RI.currententity->oldorigin[0];
|
||||
// aliasoldworldtransform[1][3] = RI.currententity->oldorigin[1];
|
||||
// aliasoldworldtransform[2][3] = RI.currententity->oldorigin[2];
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
R_AliasProjectAndClipTestFinalVert
|
||||
|
||||
Reference in New Issue
Block a user