diff --git a/src/math/Vector.cpp b/src/math/Vector.cpp index 309da539..aa5b9854 100644 --- a/src/math/Vector.cpp +++ b/src/math/Vector.cpp @@ -27,7 +27,7 @@ CrossProduct(const CVector &v1, const CVector &v2) CVector Multiply3x3(const CMatrix &mat, const CVector &vec) { -#ifdef DC_SH4 +#if defined(DC_SH4) && 0 register float __x __asm__("fr12") = vec.x; register float __y __asm__("fr13") = vec.y; register float __z __asm__("fr14") = vec.z; @@ -58,7 +58,7 @@ Multiply3x3(const CVector &vec, const CMatrix &mat) CVector operator*(const CMatrix &mat, const CVector &vec) { -#ifdef DC_SH4 +#if defined(DC_SH4) && 0 CVector out; mat_load(reinterpret_cast(const_cast(&mat))); mat_trans_single3_nodiv_nomod(vec.x, vec.y, vec.z, out.x, out.y, out.z); diff --git a/src/math/Vector.h b/src/math/Vector.h index 724c4571..ccc62d98 100644 --- a/src/math/Vector.h +++ b/src/math/Vector.h @@ -20,7 +20,7 @@ public: // (0,1,0) means no rotation. So get right vector and its atan __always_inline float Heading(void) const { return Atan2(-x, y); } __always_inline float Magnitude(void) const { -#ifdef DC_SH4 +#if defined(DC_SH4) && 0 float w; vec3f_length(x, y, z, w); return w; @@ -29,7 +29,7 @@ public: #endif } __always_inline float MagnitudeSqr(void) const { -#ifdef DC_SH4 +#if defined(DC_SH4) && 0 return fipr_magnitude_sqr(x, y,z, 0.0f); #else return x*x + y*y + z*z; @@ -118,7 +118,7 @@ inline CVector operator/(const CVector &left, float right) __always_inline float DotProduct(const CVector &v1, const CVector &v2) { -#ifdef DC_SH4 +#if defined(DC_SH4) && 0 return fipr(v1.x, v1.y, v1.z, 0.0f, v2.x, v2.y, v2.z, 0.0f); #else return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z; @@ -131,7 +131,7 @@ inline float Distance(const CVector &v1, const CVector &v2) { float w; -#ifdef DC_SH4 +#if defined(DC_SH4) && 0 vec3f_distance(v1.x, v1.y, v1.z, v2.x, v2.y, v2.z, w); return w; #else diff --git a/src/math/VuVector.h b/src/math/VuVector.h index 3ee84702..b6071ac9 100644 --- a/src/math/VuVector.h +++ b/src/math/VuVector.h @@ -43,7 +43,7 @@ __always_inline void TransformPoint(CVuVector &out, const CMatrix &mat, const CV vmaddw.xyz vf06,vf05,vf00\n\ sqc2 vf06,0x0(%0)\n\ ": : "r" (&out) , "r" (&mat) ,"r" (&in): "memory"); -#elif defined(DC_SH4) +#elif defined(DC_SH4) && 0 mat_load(reinterpret_cast(const_cast(&mat))); mat_trans_nodiv_nomod(in.x, in.y, in.z, out.x, out.y, out.z, out.y); #else @@ -70,7 +70,7 @@ __always_inline void TransformPoint(CVuVector &out, const CMatrix &mat, const Rw vmaddw.xyz vf06,vf05,vf00\n\ sqc2 vf06,0x0(%0)\n\ ": : "r" (&out) , "r" (&mat) ,"r" (&in): "memory"); -#elif defined(DC_SH4) +#elif defined(DC_SH4) && 0 mat_load(reinterpret_cast(const_cast(&mat))); mat_trans_nodiv_nomod(in.x, in.y, in.z, out.x, out.y, out.z, out.y); #else @@ -108,7 +108,7 @@ __always_inline void TransformPoints(CVuVector *out, int n, const CMatrix &mat, sqc2 vf06,-0x10(%0)\n\ bnez %1,1b\n\ ": : "r" (out) , "r" (n), "r" (&mat), "r" (in), "r" (stride): "memory"); -#elif defined(DC_SH4) +#elif defined(DC_SH4) && 0 mat_load(reinterpret_cast(const_cast(&mat))); mat_transform(reinterpret_cast(const_cast(in)), reinterpret_cast(out),