mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
Changes
This commit is contained in:
parent
484f55448c
commit
70e5bcd937
@ -728,6 +728,7 @@ MxBool FUN_100b6e10(
|
||||
|
||||
if (!rect.IntersectsWith(videoParamRect))
|
||||
return FALSE;
|
||||
|
||||
rect.Intersect(videoParamRect);
|
||||
rect.SubtractPoint(bottomRight);
|
||||
|
||||
@ -737,7 +738,6 @@ MxBool FUN_100b6e10(
|
||||
*p_bottom += rect.GetTop();
|
||||
*p_width = rect.GetWidth();
|
||||
*p_height = rect.GetHeight();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@ -6,12 +6,7 @@
|
||||
class MxPoint32 {
|
||||
public:
|
||||
MxPoint32() {}
|
||||
MxPoint32(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
this->m_x = p_x;
|
||||
this->m_y = p_y;
|
||||
}
|
||||
|
||||
MxPoint32(MxS32 p_x, MxS32 p_y) { CopyFrom(p_x, p_y); }
|
||||
MxPoint32(const MxPoint32& p_point)
|
||||
{
|
||||
this->m_x = p_point.m_x;
|
||||
@ -25,8 +20,14 @@ class MxPoint32 {
|
||||
inline void SetY(MxS32 p_y) { m_y = p_y; }
|
||||
|
||||
private:
|
||||
MxS32 m_x;
|
||||
MxS32 m_y;
|
||||
inline void CopyFrom(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
this->m_x = p_x;
|
||||
this->m_y = p_y;
|
||||
}
|
||||
|
||||
MxS32 m_x; // 0x00
|
||||
MxS32 m_y; // 0x04
|
||||
};
|
||||
|
||||
#endif // MXPOINT32_H
|
||||
|
||||
@ -9,10 +9,7 @@ class MxRect32 {
|
||||
public:
|
||||
MxRect32() {}
|
||||
MxRect32(MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom) { CopyFrom(p_left, p_top, p_right, p_bottom); }
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6fc0
|
||||
MxRect32(const MxPoint32& p_point, const MxSize32& p_size) { CopyFrom(p_point, p_size); }
|
||||
|
||||
MxRect32(const MxRect32& p_a, const MxRect32& p_b)
|
||||
{
|
||||
m_left = Max(p_a.m_left, p_b.m_left);
|
||||
@ -106,12 +103,15 @@ class MxRect32 {
|
||||
this->m_bottom = p_rect.m_bottom;
|
||||
}
|
||||
|
||||
inline void CopyFrom(const MxPoint32& p_point, const MxSize32& p_size)
|
||||
// The address might also be the constructor that calls CopyFrom
|
||||
// FUNCTION: LEGO1 0x100b6fc0
|
||||
inline MxRect32* CopyFrom(const MxPoint32& p_point, const MxSize32& p_size)
|
||||
{
|
||||
this->m_left = p_point.GetX();
|
||||
this->m_top = p_point.GetY();
|
||||
this->m_right = p_size.GetWidth() + p_point.GetX() - 1;
|
||||
this->m_bottom = p_size.GetHeight() + p_point.GetY() - 1;
|
||||
return this;
|
||||
}
|
||||
|
||||
inline static MxS32 Min(MxS32 p_a, MxS32 p_b) { return p_a <= p_b ? p_a : p_b; };
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
class MxSize32 {
|
||||
public:
|
||||
MxSize32() {}
|
||||
MxSize32(MxS32 p_width, MxS32 p_height) { Assign(p_width, p_height); }
|
||||
MxSize32(MxS32 p_width, MxS32 p_height) { CopyFrom(p_width, p_height); }
|
||||
|
||||
inline MxS32 GetWidth() const { return m_width; }
|
||||
inline MxS32 GetHeight() const { return m_height; }
|
||||
|
||||
private:
|
||||
inline void Assign(MxS32 p_width, MxS32 p_height)
|
||||
inline void CopyFrom(MxS32 p_width, MxS32 p_height)
|
||||
{
|
||||
this->m_width = p_width;
|
||||
this->m_height = p_height;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user