mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Use MFC base classes for MxPoint32, MxSize32
This commit is contained in:
parent
026bc23d01
commit
0b51291674
@ -1,36 +1,27 @@
|
||||
#ifndef MXPOINT32_H
|
||||
#define MXPOINT32_H
|
||||
|
||||
#include "mfc.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class MxPoint32 {
|
||||
class MxPoint32 : public CPoint {
|
||||
public:
|
||||
MxPoint32() {}
|
||||
|
||||
// FUNCTION: LEGO1 0x10012170
|
||||
MxPoint32(MxS32 p_x, MxS32 p_y) { CopyFrom(p_x, p_y); }
|
||||
MxPoint32(MxS32 p_x, MxS32 p_y) : CPoint(p_x, p_y) {}
|
||||
|
||||
MxPoint32(const MxPoint32& p_point)
|
||||
{
|
||||
this->m_x = p_point.m_x;
|
||||
this->m_y = p_point.m_y;
|
||||
x = p_point.x;
|
||||
y = p_point.y;
|
||||
}
|
||||
|
||||
MxS32 GetX() const { return m_x; }
|
||||
MxS32 GetY() const { return m_y; }
|
||||
MxS32 GetX() const { return x; }
|
||||
MxS32 GetY() const { return y; }
|
||||
|
||||
void SetX(MxS32 p_x) { m_x = p_x; }
|
||||
void SetY(MxS32 p_y) { m_y = p_y; }
|
||||
|
||||
private:
|
||||
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
|
||||
void SetX(MxS32 p_x) { x = p_x; }
|
||||
void SetY(MxS32 p_y) { y = p_y; }
|
||||
};
|
||||
|
||||
#endif // MXPOINT32_H
|
||||
|
||||
@ -89,14 +89,6 @@ class MxRect32 : public CRect {
|
||||
void SetBottom(MxS32 p_bottom) { bottom = p_bottom; }
|
||||
|
||||
private:
|
||||
void CopyFrom(MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom)
|
||||
{
|
||||
this->left = p_left;
|
||||
this->top = p_top;
|
||||
this->right = p_right;
|
||||
this->bottom = p_bottom;
|
||||
}
|
||||
|
||||
void CopyFrom(const MxRect32& p_rect)
|
||||
{
|
||||
this->left = p_rect.left;
|
||||
|
||||
@ -1,25 +1,16 @@
|
||||
#ifndef MXSIZE32_H
|
||||
#define MXSIZE32_H
|
||||
|
||||
#include "mfc.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class MxSize32 {
|
||||
class MxSize32 : public CSize {
|
||||
public:
|
||||
MxSize32() {}
|
||||
MxSize32(MxS32 p_width, MxS32 p_height) { CopyFrom(p_width, p_height); }
|
||||
MxSize32(MxS32 p_width, MxS32 p_height) : CSize(p_width, p_height) {}
|
||||
|
||||
MxS32 GetWidth() const { return m_width; }
|
||||
MxS32 GetHeight() const { return m_height; }
|
||||
|
||||
private:
|
||||
void CopyFrom(MxS32 p_width, MxS32 p_height)
|
||||
{
|
||||
this->m_width = p_width;
|
||||
this->m_height = p_height;
|
||||
}
|
||||
|
||||
MxS32 m_width;
|
||||
MxS32 m_height;
|
||||
MxS32 GetWidth() const { return cx; }
|
||||
MxS32 GetHeight() const { return cy; }
|
||||
};
|
||||
|
||||
#endif // MXSIZE32_H
|
||||
|
||||
Loading…
Reference in New Issue
Block a user