-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use MFC base classes for MxPoint32, MxSize32
- Loading branch information
Showing
3 changed files
with
14 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |