mirror of
https://github.com/TTimo/doom3.gpl.git
synced 2026-03-19 16:39:24 +01:00
pulling in some simple code fixes suggested towards XCode 4.2 support
This commit is contained in:
@@ -126,10 +126,6 @@ If you have questions concerning this license or the applicable additional terms
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ID_ALLOW_D3XP
|
#ifndef ID_ALLOW_D3XP
|
||||||
# if defined( MACOS_X )
|
|
||||||
# define ID_ALLOW_D3XP 0
|
|
||||||
# else
|
|
||||||
# define ID_ALLOW_D3XP 1
|
# define ID_ALLOW_D3XP 1
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ ID_INLINE int idVectorSet<type,dimension>::FindVector( const type &v, const floa
|
|||||||
}
|
}
|
||||||
|
|
||||||
hash.Add( hashKey, idList<type>::Num() );
|
hash.Add( hashKey, idList<type>::Num() );
|
||||||
Append( v );
|
this->Append( v );
|
||||||
return idList<type>::Num()-1;
|
return idList<type>::Num()-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ idCurve::SetConstantSpeed
|
|||||||
*/
|
*/
|
||||||
template< class type >
|
template< class type >
|
||||||
ID_INLINE void idCurve<type>::SetConstantSpeed( const float totalTime ) {
|
ID_INLINE void idCurve<type>::SetConstantSpeed( const float totalTime ) {
|
||||||
int i, j;
|
int i;
|
||||||
float *length, totalLength, scale, t;
|
float *length, totalLength, scale, t;
|
||||||
|
|
||||||
length = (float *) _alloca16( values.Num() * sizeof( float ) );
|
length = (float *) _alloca16( values.Num() * sizeof( float ) );
|
||||||
@@ -777,7 +777,7 @@ idCurve_QuadraticBezier::BasisSecondDerivative
|
|||||||
*/
|
*/
|
||||||
template< class type >
|
template< class type >
|
||||||
ID_INLINE void idCurve_QuadraticBezier<type>::BasisSecondDerivative( const float t, float *bvals ) const {
|
ID_INLINE void idCurve_QuadraticBezier<type>::BasisSecondDerivative( const float t, float *bvals ) const {
|
||||||
float s1 = (float) ( t - this->times[0] ) / ( this->times[2] - this->times[0] );
|
// float s1 = (float) ( t - this->times[0] ) / ( this->times[2] - this->times[0] );
|
||||||
bvals[0] = 2.0f;
|
bvals[0] = 2.0f;
|
||||||
bvals[1] = -4.0f;
|
bvals[1] = -4.0f;
|
||||||
bvals[2] = 2.0f;
|
bvals[2] = 2.0f;
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ If you have questions concerning this license or the applicable additional terms
|
|||||||
|
|
||||||
#ifdef MACOS_X
|
#ifdef MACOS_X
|
||||||
// for square root estimate instruction
|
// for square root estimate instruction
|
||||||
|
#ifdef PPC_INTRINSICS
|
||||||
#include <ppc_intrinsics.h>
|
#include <ppc_intrinsics.h>
|
||||||
|
#endif
|
||||||
// for FLT_MIN
|
// for FLT_MIN
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||||||
|
|
||||||
// This turns on support for PPC intrinsics in the SIMD_AltiVec.cpp file. Right now it's only used for frsqrte. GCC
|
// This turns on support for PPC intrinsics in the SIMD_AltiVec.cpp file. Right now it's only used for frsqrte. GCC
|
||||||
// supports these intrinsics but XLC does not.
|
// supports these intrinsics but XLC does not.
|
||||||
#define PPC_INTRINSICS
|
//#define PPC_INTRINSICS
|
||||||
|
|
||||||
// This assumes that the idDrawVert array that is used in DeriveUnsmoothedTangents is aligned. If its not aligned,
|
// This assumes that the idDrawVert array that is used in DeriveUnsmoothedTangents is aligned. If its not aligned,
|
||||||
// then we don't get any speedup
|
// then we don't get any speedup
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ void ListSounds_f( const idCmdArgs &args ) {
|
|||||||
common->Printf( "%8d total samples loaded\n", totalSamples );
|
common->Printf( "%8d total samples loaded\n", totalSamples );
|
||||||
common->Printf( "%8d kB total system memory used\n", totalMemory >> 10 );
|
common->Printf( "%8d kB total system memory used\n", totalMemory >> 10 );
|
||||||
#if ID_OPENAL
|
#if ID_OPENAL
|
||||||
common->Printf( "%8d kB total OpenAL audio memory used\n", ( alGetInteger( alGetEnumValue( (ALubyte*)"AL_EAX_RAM_SIZE" ) ) - alGetInteger( alGetEnumValue( (ALubyte*)"AL_EAX_RAM_FREE" ) ) ) >> 10 );
|
common->Printf( "%8d kB total OpenAL audio memory used\n", ( alGetInteger( alGetEnumValue( "AL_EAX_RAM_SIZE" ) ) - alGetInteger( alGetEnumValue( "AL_EAX_RAM_FREE" ) ) ) >> 10 );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||||||
#import "macosx_sys.h"
|
#import "macosx_sys.h"
|
||||||
|
|
||||||
#import <fenv.h>
|
#import <fenv.h>
|
||||||
#import <ucontext.h>
|
#import <sys/ucontext.h>
|
||||||
#import <mach/thread_status.h>
|
#import <mach/thread_status.h>
|
||||||
|
|
||||||
#define MAX_KEYS 256
|
#define MAX_KEYS 256
|
||||||
@@ -467,13 +467,13 @@ Sys_GetProcessorId
|
|||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
cpuid_t Sys_GetProcessorId( void ) {
|
cpuid_t Sys_GetProcessorId( void ) {
|
||||||
cpuid_t cpuid = CPUID_GENERIC;
|
int cpuid = CPUID_GENERIC;
|
||||||
#if defined(__ppc__)
|
#if defined(__ppc__)
|
||||||
cpuid |= CPUID_ALTIVEC;
|
cpuid |= CPUID_ALTIVEC;
|
||||||
#elif defined(__i386__)
|
#elif defined(__i386__)
|
||||||
cpuid |= CPUID_INTEL | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | CPUID_SSE3 | CPUID_HTT | CPUID_CMOV | CPUID_FTZ | CPUID_DAZ;
|
cpuid |= CPUID_INTEL | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | CPUID_SSE3 | CPUID_HTT | CPUID_CMOV | CPUID_FTZ | CPUID_DAZ;
|
||||||
#endif
|
#endif
|
||||||
return cpuid;
|
return static_cast<cpuid_t>(cpuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user