From 1803dcc873df329282adab46e1d42baa4b6ee45b Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Wed, 29 Jul 2020 12:17:53 +0300 Subject: miami shadows --- src/math/Matrix.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/math/Matrix.h') diff --git a/src/math/Matrix.h b/src/math/Matrix.h index 2d721e93..da20ea18 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -29,6 +29,15 @@ public: if(m_hasRwMatrix && m_attachment) RwMatrixDestroy(m_attachment); } +#ifdef RWCORE_H + operator RwMatrix (void) const { + return m_matrix; + } + + operator RwMatrix *(void) { + return &m_matrix; + } +#endif void Attach(RwMatrix *matrix, bool owner = false){ #ifdef FIX_BUGS if(m_attachment && m_hasRwMatrix) @@ -240,6 +249,15 @@ public: void CopyOnlyMatrix(CMatrix *other){ m_matrix = other->m_matrix; } + void CopyRwMatrix(RwMatrix *matrix){ + m_matrix = *matrix; + } + + void CopyToRwMatrix(RwMatrix *matrix){ + *matrix = m_matrix; + RwMatrixUpdate(matrix); + } + void SetUnity(void) { m_matrix.right.x = 1.0f; m_matrix.right.y = 0.0f; -- cgit v1.2.3 From abb640c6b6b1c4c1b699d18509c8a344e2be2dd5 Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 3 Aug 2020 12:58:37 +0200 Subject: VU0 collision --- src/math/Matrix.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/math/Matrix.h') diff --git a/src/math/Matrix.h b/src/math/Matrix.h index c849a5c4..e2d6b0e0 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -81,6 +81,7 @@ public: m_matrix.pos.z += rhs.m_matrix.pos.z; return *this; } + CMatrix& operator*=(CMatrix const &rhs); CVector &GetPosition(void){ return *(CVector*)&m_matrix.pos; } CVector &GetRight(void) { return *(CVector*)&m_matrix.right; } -- cgit v1.2.3