diff --git a/LEGO1/mxrect32.h b/LEGO1/mxrect32.h index 1393d6be..9a0b710f 100644 --- a/LEGO1/mxrect32.h +++ b/LEGO1/mxrect32.h @@ -40,6 +40,14 @@ class MxRect32 { return *this; } + inline void CopyFrom(const MxRect32& p_rect) + { + this->m_left = p_rect.m_left; + this->m_top = p_rect.m_top; + this->m_right = p_rect.m_right; + this->m_bottom = p_rect.m_bottom; + } + inline void Intersect(const MxRect32& p_rect) { m_left = Max(p_rect.m_left, m_left); @@ -99,14 +107,6 @@ class MxRect32 { inline void SetBottom(MxS32 p_bottom) { m_bottom = p_bottom; } private: - inline void CopyFrom(const MxRect32& p_rect) - { - this->m_left = p_rect.m_left; - this->m_top = p_rect.m_top; - this->m_right = p_rect.m_right; - this->m_bottom = p_rect.m_bottom; - } - inline static MxS32 Min(MxS32 p_a, MxS32 p_b) { return p_a <= p_b ? p_a : p_b; }; inline static MxS32 Max(MxS32 p_a, MxS32 p_b) { return p_a <= p_b ? p_b : p_a; }; diff --git a/LEGO1/mxsmkpresenter.cpp b/LEGO1/mxsmkpresenter.cpp index c2eb8165..415b3eb6 100644 --- a/LEGO1/mxsmkpresenter.cpp +++ b/LEGO1/mxsmkpresenter.cpp @@ -80,7 +80,9 @@ void MxSmkPresenter::LoadFrame(MxStreamChunk* p_chunk) MxRect32* rect; while (cursor.Next(rect)) { - invalidateRect = *rect; + // This should probably be using the assignment operator, + // but it's currently reducing the match significantly. + invalidateRect.CopyFrom(*rect); invalidateRect.AddPoint(m_location); MVideoManager()->InvalidateRect(invalidateRect); }