diff options
| author | robojumper <robojumper@gmail.com> | 2025-04-05 23:36:55 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-04-07 22:12:40 +0200 |
| commit | cd5fd322f87ee57526f2be706e668418c435258b (patch) | |
| tree | d8dd36c838232b36dfe19e4e8de8e20c54e279b9 /include | |
| parent | a5b91ef55dbad74c82ffdfee028ff77b8355fe29 (diff) | |
Introduce mVec2_c
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/d_textwindow_unk.h | 4 | ||||
| -rw-r--r-- | include/d/lyt/msg_window/d_lyt_msg_window_demo.h | 4 | ||||
| -rw-r--r-- | include/d/lyt/msg_window/d_lyt_msg_window_get.h | 4 | ||||
| -rw-r--r-- | include/egg/math/eggVector.h | 5 | ||||
| -rw-r--r-- | include/m/m_vec.h | 10 | ||||
| -rw-r--r-- | include/toBeSorted/lyt_vec2f.h | 23 |
6 files changed, 21 insertions, 29 deletions
diff --git a/include/d/d_textwindow_unk.h b/include/d/d_textwindow_unk.h index f7143fb4..a599b2d0 100644 --- a/include/d/d_textwindow_unk.h +++ b/include/d/d_textwindow_unk.h @@ -4,8 +4,8 @@ #include "d/d_tag_processor.h" #include "d/lyt/d_textbox.h" #include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "m/m_vec.h" #include "sized_string.h" -#include "toBeSorted/lyt_vec2f.h" struct dLytMsgWindowCharData { /* 0x00 */ f32 posX; @@ -82,7 +82,7 @@ public: void build(); void remove(); - void drawTextBlur(dLytTextLight *thing, LytVec2f size, u8 alpha); + void drawTextBlur(dLytTextLight *thing, mVec2_c size, u8 alpha); void reset(); dLytMsgWindowCharData *getCharData() { diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_demo.h b/include/d/lyt/msg_window/d_lyt_msg_window_demo.h index 3b930056..dad4d332 100644 --- a/include/d/lyt/msg_window/d_lyt_msg_window_demo.h +++ b/include/d/lyt/msg_window/d_lyt_msg_window_demo.h @@ -6,10 +6,10 @@ #include "d/lyt/d2d.h" #include "d/lyt/d_textbox.h" #include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "m/m_vec.h" #include "nw4r/lyt/lyt_pane.h" #include "s/s_State.hpp" #include "sized_string.h" -#include "toBeSorted/lyt_vec2f.h" class dLytMsgWindowDemo_c : public dLytMsgWindowSubtype { public: @@ -50,7 +50,7 @@ private: /* 0x4CC */ nw4r::lyt::Pane *mpPane; /* 0x4D0 */ dTextBox_c *mpTextboxes[2]; /* 0x4D8 */ dTagProcessor_c *mpTagProcessor; - /* 0x4DC */ LytVec2f mOffsets[2]; + /* 0x4DC */ mVec2_c mOffsets[2]; /* 0x4EC */ dLytTextLight mText; /* 0x5C8 */ MsgWindowBlurRelated mBlurRelated; diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_get.h b/include/d/lyt/msg_window/d_lyt_msg_window_get.h index c9109841..7aabba08 100644 --- a/include/d/lyt/msg_window/d_lyt_msg_window_get.h +++ b/include/d/lyt/msg_window/d_lyt_msg_window_get.h @@ -7,8 +7,8 @@ #include "d/lyt/d_lyt_common_a_btn.h" #include "d/lyt/d_textbox.h" #include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "m/m_vec.h" #include "s/s_State.hpp" -#include "toBeSorted/lyt_vec2f.h" class dLytMsgWindowGet_c : public dLytMsgWindowSubtype { public: @@ -57,7 +57,7 @@ private: /* 0x0528 */ dTextBox_c *mpTextboxes[2]; /* 0x0530 */ nw4r::lyt::Pane *mpPanes[6]; /* 0x0548 */ dTagProcessor_c *mpTagProcessor; - /* 0x054C */ LytVec2f mOffset; + /* 0x054C */ mVec2_c mOffset; /* 0x0554 */ dLytCommonABtn_c mBtn; /* 0x06E0 */ dLytTextLight mText; /* 0x07C4 */ MsgWindowBlurRelated mBlurRelated; diff --git a/include/egg/math/eggVector.h b/include/egg/math/eggVector.h index 2d030d45..f509ad85 100644 --- a/include/egg/math/eggVector.h +++ b/include/egg/math/eggVector.h @@ -136,6 +136,11 @@ public: static const Vector2f ex; static const Vector2f ey; + void set(f32 fx, f32 fy) { + x = fx; + y = fy; + } + Vector2f operator-(const Vector2f &v) { return Vector2f(x - v.x, y - v.y); } diff --git a/include/m/m_vec.h b/include/m/m_vec.h index 011679b0..0ec12fd4 100644 --- a/include/m/m_vec.h +++ b/include/m/m_vec.h @@ -254,4 +254,14 @@ public: static mVec3_c Ez; }; +class mVec2_c : public EGG::Vector2f { +public: + mVec2_c() {} + ~mVec2_c() {} + + mVec2_c(const mVec2_c &other) { + set(other.x, other.y); + } +}; + #endif diff --git a/include/toBeSorted/lyt_vec2f.h b/include/toBeSorted/lyt_vec2f.h deleted file mode 100644 index cdab4f91..00000000 --- a/include/toBeSorted/lyt_vec2f.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef D_LYT_VEC2F_H -#define D_LYT_VEC2F_H - -#include "common.h" - -// This better not be mVec2_c or something stupid -struct LytVec2f { - LytVec2f() {} - ~LytVec2f() {} - - LytVec2f(const LytVec2f &other) { - set(other.x, other.y); - } - void set(f32 fx, f32 fy) { - x = fx; - y = fy; - } - - f32 x; - f32 y; -}; - -#endif |
