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:
@ -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];
|
||||
|
Reference in New Issue
Block a user