diff --git a/public/mathlib/ssemath.h b/public/mathlib/ssemath.h index 834da75b..356714bc 100644 --- a/public/mathlib/ssemath.h +++ b/public/mathlib/ssemath.h @@ -3140,4 +3140,31 @@ FORCEINLINE int BoxOnPlaneSideSIMD( const fltx4& emins, const fltx4& emaxs, cons return sides[0]; } + +// Some convenience operator overloads, which are just aliasing the functions above. +// Unneccessary on 360, as you already have them from xboxmath.h +// Componentwise add +#ifndef COMPILER_GCC + +FORCEINLINE fltx4 operator+=( fltx4 &a, FLTX4 b ) +{ + a = AddSIMD( a, b ); + return a; +} + +FORCEINLINE fltx4 operator-=( fltx4 &a, FLTX4 b ) +{ + a = SubSIMD( a, b ); + return a; +} + + +FORCEINLINE fltx4 operator*=( fltx4 &a, FLTX4 b ) +{ + a = MulSIMD( a, b ); + return a; +} + +#endif + #endif // _ssemath_h diff --git a/vscript/vscript_bindings_base.cpp b/vscript/vscript_bindings_base.cpp index 33b644d1..06a0af74 100644 --- a/vscript/vscript_bindings_base.cpp +++ b/vscript/vscript_bindings_base.cpp @@ -330,7 +330,7 @@ void CScriptKeyValues::ScriptSetBool( bool bValue ) // constructors -CScriptKeyValues::CScriptKeyValues( KeyValues *pKeyValues = NULL ) +CScriptKeyValues::CScriptKeyValues( KeyValues *pKeyValues ) { if (pKeyValues == NULL) { diff --git a/vscript/vscript_bindings_base.h b/vscript/vscript_bindings_base.h index 2629aada..03862405 100644 --- a/vscript/vscript_bindings_base.h +++ b/vscript/vscript_bindings_base.h @@ -20,7 +20,7 @@ class CScriptKeyValues { public: - CScriptKeyValues( KeyValues *pKeyValues ); + CScriptKeyValues( KeyValues *pKeyValues = NULL ); ~CScriptKeyValues( ); HSCRIPT ScriptFindKey( const char *pszName );