diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 1e587e2b..7555ddd6 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -688,7 +688,7 @@ GetTexSize = .text:0x8001D820; // type:function size:0x8 fn_8001D830 = .text:0x8001D830; // type:function size:0x8 fn_8001D840 = .text:0x8001D840; // type:function size:0x38 fn_8001D880 = .text:0x8001D880; // type:function size:0x8C -__dt__8LytVec2fFv = .text:0x8001D910; // type:function size:0x40 +__dt__7mVec2_cFv = .text:0x8001D910; // type:function size:0x40 fn_8001D950 = .text:0x8001D950; // type:function size:0x22C fn_8001DB80 = .text:0x8001DB80; // type:function size:0x74 fn_8001DC00 = .text:0x8001DC00; // type:function size:0x764 @@ -2902,7 +2902,7 @@ lzSafeDecompress = .text:0x80066FB0; // type:function size:0x64 matrixCreateFromPosRotYScale__FR6mMtx_cRC7mVec3_c4mAngRC7mVec3_cP6mMtx_cf = .text:0x80067020; // type:function size:0x138 checkIfVec3fInMatrix__FRC6mMtx_cRC7mVec3_c = .text:0x80067160; // type:function size:0x88 fn_800671F0 = .text:0x800671F0; // type:function size:0x84 -__ct__8LytVec2fFv = .text:0x80067280; // type:function size:0x4 +__ct__7mVec2_cFv = .text:0x80067280; // type:function size:0x4 fn_80067290 = .text:0x80067290; // type:function size:0xA8 fn_80067340 = .text:0x80067340; // type:function size:0xC0 fn_80067400 = .text:0x80067400; // type:function size:0x80 @@ -3897,7 +3897,7 @@ reset__13TextWindowUnkFv = .text:0x800B2B90; // type:function size:0xD8 fn_800B2C70 = .text:0x800B2C70; // type:function size:0x340 fn_800B2FB0 = .text:0x800B2FB0; // type:function size:0x324 build__20MsgWindowBlurRelatedFv = .text:0x800B32E0; // type:function size:0x84 -drawTextBlur__20MsgWindowBlurRelatedFP13dLytTextLight8LytVec2fUc = .text:0x800B3370; // type:function size:0x138 +drawTextBlur__20MsgWindowBlurRelatedFP13dLytTextLight7mVec2_cUc = .text:0x800B3370; // type:function size:0x138 __dt__13TextWindowUnkFv = .text:0x800B34B0; // type:function size:0x40 fn_800B34F0 = .text:0x800B34F0; // type:function size:0xD0 __ct__15dTagProcessor_cFv = .text:0x800B35C0; // type:function size:0x260 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 diff --git a/src/d/d_textwindow_unk.cpp b/src/d/d_textwindow_unk.cpp index 913f3371..b6b6b004 100644 --- a/src/d/d_textwindow_unk.cpp +++ b/src/d/d_textwindow_unk.cpp @@ -75,7 +75,7 @@ void MsgWindowBlurRelated::build() { } } -void MsgWindowBlurRelated::drawTextBlur(dLytTextLight *thing, LytVec2f size, u8 alpha) { +void MsgWindowBlurRelated::drawTextBlur(dLytTextLight *thing, mVec2_c size, u8 alpha) { s8 t = -1; for (int i = 0; i < 1023; i++) { if (mData[i].displayTimerMaybe >= 0) {