1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +08:00

More portions of the SDK compile (and link!) on Mac OS X (bug 4392, r=dvander).

SourceMod compiles and links now. Hurray! Most plugins may also but there may be more work to do.
This commit is contained in:
Scott Ehlert
2010-05-13 04:08:37 -05:00
parent 7daeca53eb
commit b06949c4cc
29 changed files with 92 additions and 85 deletions

View File

@ -15,7 +15,7 @@
#include <mathlib/vector.h>
#include <mathlib/mathlib.h>
#if defined(_LINUX)
#if defined(_LINUX) || defined(__APPLE__)
#define USE_STDC_FOR_SIMD 0
#else
#define USE_STDC_FOR_SIMD 0
@ -1813,7 +1813,7 @@ FORCEINLINE fltx4 ReplicateX4( float flValue )
FORCEINLINE float SubFloat( const fltx4 & a, int idx )
{
// NOTE: if the output goes into a register, this causes a Load-Hit-Store stall (don't mix fpu/vpu math!)
#ifndef _LINUX
#if !defined _LINUX && !defined __APPLE__
return a.m128_f32[ idx ];
#else
return (reinterpret_cast<float const *>(&a))[idx];
@ -1822,7 +1822,7 @@ FORCEINLINE float SubFloat( const fltx4 & a, int idx )
FORCEINLINE float & SubFloat( fltx4 & a, int idx )
{
#ifndef _LINUX
#if !defined _LINUX && !defined __APPLE__
return a.m128_f32[ idx ];
#else
return (reinterpret_cast<float *>(&a))[idx];
@ -1836,7 +1836,7 @@ FORCEINLINE uint32 SubFloatConvertToInt( const fltx4 & a, int idx )
FORCEINLINE uint32 SubInt( const fltx4 & a, int idx )
{
#ifndef _LINUX
#if !defined _LINUX && !defined __APPLE__
return a.m128_u32[idx];
#else
return (reinterpret_cast<uint32 const *>(&a))[idx];
@ -1845,7 +1845,7 @@ FORCEINLINE uint32 SubInt( const fltx4 & a, int idx )
FORCEINLINE uint32 & SubInt( fltx4 & a, int idx )
{
#ifndef _LINUX
#if !defined _LINUX && !defined __APPLE__
return a.m128_u32[idx];
#else
return (reinterpret_cast<uint32 *>(&a))[idx];