removed the useless myftol macro

This commit is contained in:
myT 2022-06-17 03:38:39 +02:00
parent 9895f3b895
commit 1b74aed8b9
4 changed files with 5 additions and 13 deletions

View file

@ -297,9 +297,9 @@ void R_SetupEntityLighting( const trRefdef_t *refdef, trRefEntity_t *ent ) {
}
// save out the byte-packed version
((byte *)&ent->ambientLightInt)[0] = myftol( ent->ambientLight[0] );
((byte *)&ent->ambientLightInt)[1] = myftol( ent->ambientLight[1] );
((byte *)&ent->ambientLightInt)[2] = myftol( ent->ambientLight[2] );
((byte *)&ent->ambientLightInt)[0] = (byte)( ent->ambientLight[0] );
((byte *)&ent->ambientLightInt)[1] = (byte)( ent->ambientLight[1] );
((byte *)&ent->ambientLightInt)[2] = (byte)( ent->ambientLight[2] );
((byte *)&ent->ambientLightInt)[3] = 0xff;
// transform the direction to local space

View file

@ -43,14 +43,6 @@ typedef struct {
#pragma pack(pop)
// fast float to int conversion
//if id386 && !defined(__GNUC__)
//long myftol( float f );
//else
#define myftol(x) ((int)(x))
//endif
// a trRefEntity_t has all the information passed in by the cgame
// as well as some locally derived info

View file

@ -185,7 +185,7 @@ static int R_ComputeLOD( const trRefEntity_t* ent )
}
flod *= tr.currentModel->numLods;
lod = myftol( flod );
lod = (int)flod;
if ( lod < 0 )
{

View file

@ -627,7 +627,7 @@ static void RB_CalcWaveColor( const waveForm_t *wf, unsigned char *dstColors, in
glow = 1;
}
v = myftol( 255 * glow );
v = (int)( 255 * glow );
color[0] = color[1] = color[2] = v;
color[3] = 255;
v = *(int *)color;