Add TODO comments

This commit is contained in:
Christian Semmler 2024-12-26 09:36:26 -07:00
parent 0b51291674
commit 3f72725541
3 changed files with 33 additions and 20 deletions

View File

@ -4,6 +4,10 @@
#include "mfc.h" #include "mfc.h"
#include "mxtypes.h" #include "mxtypes.h"
// TODO: We recently added the MFC base class.
// We have to check all usage sites of MxPoint32 and verify with the help of the BETA
// whether MxPoint32 or CRect has been used.
class MxPoint32 : public CPoint { class MxPoint32 : public CPoint {
public: public:
MxPoint32() {} MxPoint32() {}

View File

@ -5,6 +5,11 @@
#include "mxpoint32.h" #include "mxpoint32.h"
#include "mxsize32.h" #include "mxsize32.h"
// TODO: We recently added the MFC base class.
// We have to check all usage sites of MxRect32 and verify with the help of the BETA
// whether MxRect32 or CRect has been used.
// Functions like CopyFrom or the other utility functions may take different types.
// SIZE 0x10 // SIZE 0x10
class MxRect32 : public CRect { class MxRect32 : public CRect {
public: public:
@ -37,24 +42,24 @@ class MxRect32 : public CRect {
void SetPoint(const MxPoint32& p_point) void SetPoint(const MxPoint32& p_point)
{ {
this->left = p_point.GetX(); left = p_point.GetX();
this->top = p_point.GetY(); top = p_point.GetY();
} }
void AddPoint(const MxPoint32& p_point) void AddPoint(const MxPoint32& p_point)
{ {
this->left += p_point.GetX(); left += p_point.GetX();
this->top += p_point.GetY(); top += p_point.GetY();
this->right += p_point.GetX(); right += p_point.GetX();
this->bottom += p_point.GetY(); bottom += p_point.GetY();
} }
void SubtractPoint(const MxPoint32& p_point) void SubtractPoint(const MxPoint32& p_point)
{ {
this->left -= p_point.GetX(); left -= p_point.GetX();
this->top -= p_point.GetY(); top -= p_point.GetY();
this->right -= p_point.GetX(); right -= p_point.GetX();
this->bottom -= p_point.GetY(); bottom -= p_point.GetY();
} }
void UpdateBounds(const MxRect32& p_rect) void UpdateBounds(const MxRect32& p_rect)
@ -75,8 +80,8 @@ class MxRect32 : public CRect {
MxS32 GetWidth() const { return (right - left) + 1; } MxS32 GetWidth() const { return (right - left) + 1; }
MxS32 GetHeight() const { return (bottom - top) + 1; } MxS32 GetHeight() const { return (bottom - top) + 1; }
MxPoint32 GetPoint() const { return MxPoint32(this->left, this->top); } MxPoint32 GetPoint() const { return MxPoint32(left, top); }
MxSize32 GetSize() const { return MxSize32(this->right, this->bottom); } MxSize32 GetSize() const { return MxSize32(right, bottom); }
MxS32 GetLeft() const { return left; } MxS32 GetLeft() const { return left; }
MxS32 GetTop() const { return top; } MxS32 GetTop() const { return top; }
@ -91,20 +96,20 @@ class MxRect32 : public CRect {
private: private:
void CopyFrom(const MxRect32& p_rect) void CopyFrom(const MxRect32& p_rect)
{ {
this->left = p_rect.left; left = p_rect.left;
this->top = p_rect.top; top = p_rect.top;
this->right = p_rect.right; right = p_rect.right;
this->bottom = p_rect.bottom; bottom = p_rect.bottom;
} }
// The address might also be the constructor that calls CopyFrom // The address might also be the constructor that calls CopyFrom
// FUNCTION: LEGO1 0x100b6fc0 // FUNCTION: LEGO1 0x100b6fc0
MxRect32* CopyFrom(const MxPoint32& p_point, const MxSize32& p_size) MxRect32* CopyFrom(const MxPoint32& p_point, const MxSize32& p_size)
{ {
this->left = p_point.GetX(); left = p_point.GetX();
this->top = p_point.GetY(); top = p_point.GetY();
this->right = p_size.GetWidth() + p_point.GetX() - 1; right = p_size.GetWidth() + p_point.GetX() - 1;
this->bottom = p_size.GetHeight() + p_point.GetY() - 1; bottom = p_size.GetHeight() + p_point.GetY() - 1;
return this; return this;
} }

View File

@ -4,6 +4,10 @@
#include "mfc.h" #include "mfc.h"
#include "mxtypes.h" #include "mxtypes.h"
// TODO: We recently added the MFC base class.
// We have to check all usage sites of MxSize32 and verify with the help of the BETA
// whether MxSize32 or CRect has been used.
class MxSize32 : public CSize { class MxSize32 : public CSize {
public: public:
MxSize32() {} MxSize32() {}