From de043b4d782877c4180b854ca7a855c567169c7b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 02:42:46 +0000 Subject: [PATCH] Decompile 4 functions in Source/UI/Buttons/UITextButton.cpp, Source/UI/Lists/UIScrollBar.cpp, ... Batch #4324 by eAthena: 0 byte-identical, 4 confirmed by peer review. - fn_11080 UIString::UIString: logic confirmed by peer review - fn_11083 UITabControl::UITabControl: logic confirmed by peer review - fn_11097 UIBarGraph3::`scalar deleting destructor': logic confirmed by peer review - fn_11098 UIBarGraphPlayer::`scalar deleting destructor': logic confirmed by peer review Peer-reviewed-by: youko, tayoba Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Buttons/UITextButton.cpp | 9 +++++++++ Source/UI/Lists/UIScrollBar.cpp | 9 +++++++++ Source/UI/Lists/UITabControl.h | 6 ++++++ Source/UI/Text/UIString.h | 8 +++++++- Source/UI/UIBarGraph.cpp | 8 ++++++++ Source/UI/UIBarGraph.h | 3 +++ 6 files changed, 42 insertions(+), 1 deletion(-) diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 7b6a5829..01daec1d 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -704,6 +704,15 @@ void UIString::ResetCursor(int, int) { } } +// OFFSET: 0x0086EA50 +// FUNCTION: fn_11080 +UIString::UIString(UIWindowContext& windows) : UIWindow(windows, 0), unknown_0080(1), unknown_009C(0), unknown_00A0(0), unknown_00A4(0) { + this->unknown_0084.clear(); + this->unknown_00AC.clear(); + this->unknown_00C4.clear(); + this->unknown_00DC.clear(); +} + // OFFSET: 0x008925D0 // FUNCTION: fn_11476 void UITVTextButton::ResetCursor(int x, int y) { diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index b822a28c..46363514 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -360,6 +360,15 @@ int UIImgMenu::ItemAt(int x, int y) { return std::min(offset / size, this->count - 1); } +// OFFSET: 0x0086ECF0 +// FUNCTION: fn_11083 +UITabControl::UITabControl(UIWindowContext& windows, UIButtonContext& controls) + : UIWindow(windows, 0), unknown_00E8(12), unknown_00EC(0), unknown_00F0(0), unknown_00F4(0), unknown_00F8(0), m_controls(&controls) { + this->unknown_007C = -1; + this->dragX = 0; + this->dragY = 0; +} + // OFFSET: 0x00880B20 // FUNCTION: fn_11283 int UITabControl::TabCount() { diff --git a/Source/UI/Lists/UITabControl.h b/Source/UI/Lists/UITabControl.h index d7857ee7..57ca5d39 100644 --- a/Source/UI/Lists/UITabControl.h +++ b/Source/UI/Lists/UITabControl.h @@ -11,6 +11,7 @@ class UIEditCtrl; class UITabControl : public UIWindow { public: + UITabControl(UIWindowContext& windows, UIButtonContext& controls); int TabCount(); int TabAt(int x, int y); void FillTab(int index, int x, int y, int width, int height, std::uint32_t color); @@ -30,6 +31,11 @@ public: /* 00D8 */ UIEditCtrl* edit; /* 00DC */ std::vector tooltips; /* 007C */ int unknown_007C; + /* 00E8 */ int unknown_00E8; + /* 00EC */ int unknown_00EC; + /* 00F0 */ int unknown_00F0; + /* 00F4 */ int unknown_00F4; + /* 00F8 */ int unknown_00F8; private: UIButtonContext* m_controls; diff --git a/Source/UI/Text/UIString.h b/Source/UI/Text/UIString.h index 0413bb88..d581cb35 100644 --- a/Source/UI/Text/UIString.h +++ b/Source/UI/Text/UIString.h @@ -7,13 +7,19 @@ class UIString : public UIWindow { public: + explicit UIString(UIWindowContext& windows); void ResetCursor(int x, int y) override; /* 007C */ int unknown_007C; /* 0080 */ int unknown_0080; /* 0084 */ std::string unknown_0084; - /* 009C */ unsigned char unknown_009C[0x10]; + /* 009C */ int unknown_009C; + /* 00A0 */ int unknown_00A0; + /* 00A4 */ int unknown_00A4; + /* 00A8 */ unsigned char unknown_00A8[0x4]; /* 00AC */ std::string unknown_00AC; + /* 00C4 */ std::string unknown_00C4; + /* 00DC */ std::string unknown_00DC; }; #endif diff --git a/Source/UI/UIBarGraph.cpp b/Source/UI/UIBarGraph.cpp index ec870fb3..db2c7e03 100644 --- a/Source/UI/UIBarGraph.cpp +++ b/Source/UI/UIBarGraph.cpp @@ -9,3 +9,11 @@ UIBarGraphHomun::UIBarGraphHomun(UIWindowContext& context) : UIWindow(context, 0 // FUNCTION: fn_11025 UIBarGraphPlayer::UIBarGraphPlayer(UIWindowContext& context) : UIWindow(context, 0) { } + +// OFFSET: 0x0086FFA0 +// FUNCTION: fn_11097 +UIBarGraph3::~UIBarGraph3() = default; + +// OFFSET: 0x008700F0 +// FUNCTION: fn_11098 +UIBarGraphPlayer::~UIBarGraphPlayer() = default; diff --git a/Source/UI/UIBarGraph.h b/Source/UI/UIBarGraph.h index c20e1ae0..71759df1 100644 --- a/Source/UI/UIBarGraph.h +++ b/Source/UI/UIBarGraph.h @@ -16,6 +16,8 @@ public: }; class UIBarGraph3 : public UIWindow { +public: + ~UIBarGraph3() override; }; class UIBarGraph4 : public UIBarGraph3 { @@ -62,6 +64,7 @@ protected: class UIBarGraphPlayer : public UIWindow { public: explicit UIBarGraphPlayer(UIWindowContext& context); + ~UIBarGraphPlayer() override; protected: /* 0080 */ std::function m_current;