mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Fix matches
This commit is contained in:
parent
f1ea99e440
commit
7efa698ab4
@ -12,6 +12,12 @@ class MxPoint32 {
|
||||
this->m_y = p_y;
|
||||
}
|
||||
|
||||
MxPoint32(const MxPoint32& p_point)
|
||||
{
|
||||
this->m_x = p_point.m_x;
|
||||
this->m_y = p_point.m_y;
|
||||
}
|
||||
|
||||
inline MxS32 GetX() const { return m_x; }
|
||||
inline MxS32 GetY() const { return m_y; }
|
||||
|
||||
|
||||
@ -40,14 +40,6 @@ 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);
|
||||
@ -107,6 +99,14 @@ 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; };
|
||||
|
||||
|
||||
@ -80,10 +80,8 @@ void MxSmkPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
||||
MxRect32* rect;
|
||||
|
||||
while (cursor.Next(rect)) {
|
||||
// This should probably be using the assignment operator,
|
||||
// but it's currently reducing the match significantly.
|
||||
invalidateRect.CopyFrom(*rect);
|
||||
invalidateRect.AddPoint(m_location);
|
||||
invalidateRect = *rect;
|
||||
invalidateRect.AddPoint(GetLocation());
|
||||
MVideoManager()->InvalidateRect(invalidateRect);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user