From 0c107470966641e7a904d9a2ff2169161de4c787 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 11:28:47 +0000 Subject: [PATCH] Decompile 12 functions in Source/UI/Quest/UIQuestDisplay.cpp, Source/UI/Quest/UIQuestDisplay.h, ... Batch #7711 by secret: 0 byte-identical, 12 confirmed by peer review. - fn_12846 UIAccountLimitedToolWnd::UIAccountLimitedToolWnd: logic confirmed by peer review - fn_12847 UIBalloonOpenBtn::UIBalloonOpenBtn: logic confirmed by peer review - fn_12848 UIDebuffRemoveWnd::UIDebuffRemoveWnd: logic confirmed by peer review - fn_12850 UIMileageWnd::UIMileageWnd: logic confirmed by peer review - fn_12852 UINoteWnd::UINoteWnd: logic confirmed by peer review - fn_12853 UIOpenMailBoxWnd::UIOpenMailBoxWnd: logic confirmed by peer review - fn_12854 UIOpenRoulletteWnd::UIOpenRoulletteWnd: logic confirmed by peer review - fn_12855 UIQuestDisplay::UIQuestDisplay: logic confirmed by peer review - fn_12856 UIRPImageWnd2::UIRPImageWnd2: logic confirmed by peer review - fn_12857 UISecondCostumeWnd::UISecondCostumeWnd: logic confirmed by peer review - fn_12858 UIShowWarpWnd::UIShowWarpWnd: logic confirmed by peer review - fn_12859 UITransMenuWnd::UITransMenuWnd: logic confirmed by peer review Peer-reviewed-by: eAthena, Yommy Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Quest/UIQuestDisplay.cpp | 5 +++++ Source/UI/Quest/UIQuestDisplay.h | 1 + Source/UI/Window/UIAccountLimitedToolWnd.cpp | 8 ++++++++ Source/UI/Window/UIAccountLimitedToolWnd.h | 4 ++++ Source/UI/Window/UIBalloonOpenBtn.cpp | 6 ++++++ Source/UI/Window/UIBalloonOpenBtn.h | 1 + Source/UI/Window/UIDebuffRemoveWnd.cpp | 6 ++++++ Source/UI/Window/UIDebuffRemoveWnd.h | 1 + Source/UI/Window/UIMileageWnd.cpp | 7 +++++++ Source/UI/Window/UIMileageWnd.h | 1 + Source/UI/Window/UINoteWnd.cpp | 6 ++++++ Source/UI/Window/UINoteWnd.h | 1 + Source/UI/Window/UIOpenMailBoxWnd.cpp | 6 ++++++ Source/UI/Window/UIOpenMailBoxWnd.h | 1 + Source/UI/Window/UIOpenRoulletteWnd.cpp | 6 ++++++ Source/UI/Window/UIOpenRoulletteWnd.h | 1 + Source/UI/Window/UIRPImageWnd2.cpp | 5 +++++ Source/UI/Window/UIRPImageWnd2.h | 1 + Source/UI/Window/UISecondCostumeWnd.cpp | 17 +++++++++++++++++ Source/UI/Window/UISecondCostumeWnd.h | 5 +++++ Source/UI/Window/UIShowWarpWnd.cpp | 6 ++++++ Source/UI/Window/UIShowWarpWnd.h | 1 + Source/UI/Window/UITransMenuWnd.cpp | 9 +++++++++ Source/UI/Window/UITransMenuWnd.h | 1 + 24 files changed, 106 insertions(+) diff --git a/Source/UI/Quest/UIQuestDisplay.cpp b/Source/UI/Quest/UIQuestDisplay.cpp index 9b9c3697a..9d8f61c0d 100644 --- a/Source/UI/Quest/UIQuestDisplay.cpp +++ b/Source/UI/Quest/UIQuestDisplay.cpp @@ -154,3 +154,8 @@ int UIQuestDisplay::SendMsg(UIWindow* sender, int message, std::intptr_t argumen return 0; } + +// OFFSET: 0x00946EA0 +// FUNCTION: fn_12855 +UIQuestDisplay::UIQuestDisplay(UIWindowContext& windows) : UIWindow(windows, 0) { +} diff --git a/Source/UI/Quest/UIQuestDisplay.h b/Source/UI/Quest/UIQuestDisplay.h index cd24ef6a7..113366a5e 100644 --- a/Source/UI/Quest/UIQuestDisplay.h +++ b/Source/UI/Quest/UIQuestDisplay.h @@ -14,6 +14,7 @@ struct QuestDisplayMenuItem { class UIQuestDisplay : public UIWindow { public: + UIQuestDisplay(UIWindowContext& windows); bool Slot08() override; void Slot11() override; void Slot33(int x, int y) override; diff --git a/Source/UI/Window/UIAccountLimitedToolWnd.cpp b/Source/UI/Window/UIAccountLimitedToolWnd.cpp index 034ee529f..799835075 100644 --- a/Source/UI/Window/UIAccountLimitedToolWnd.cpp +++ b/Source/UI/Window/UIAccountLimitedToolWnd.cpp @@ -364,3 +364,11 @@ int UIAccountLimitedToolWnd::SendMsg(UIWindow* sender, int message, std::intptr_ return 0; } + +// OFFSET: 0x00946800 +// FUNCTION: fn_12846 +UIAccountLimitedToolWnd::UIAccountLimitedToolWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls, UIEditContext& edits, UITextViewerContext& texts) + : UIFrameWnd(windows, frames, 0), m_accountIdText(nullptr), m_viewer(nullptr), m_controls(&controls), m_editContext(&edits), m_textContext(&texts) { + SecureZeroMemory(this->m_edits, sizeof(this->m_edits)); + SecureZeroMemory(this->m_buttons, sizeof(this->m_buttons)); +} diff --git a/Source/UI/Window/UIAccountLimitedToolWnd.h b/Source/UI/Window/UIAccountLimitedToolWnd.h index c0016d118..7c3ac8098 100644 --- a/Source/UI/Window/UIAccountLimitedToolWnd.h +++ b/Source/UI/Window/UIAccountLimitedToolWnd.h @@ -3,6 +3,8 @@ #include "UI/Window/UIFrameWnd.h" +#include + struct UIButtonContext; struct UIEditContext; struct UITextViewerContext; @@ -13,6 +15,7 @@ class UITextViewer; class UIAccountLimitedToolWnd : public UIFrameWnd { public: + UIAccountLimitedToolWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls, UIEditContext& edits, UITextViewerContext& texts); void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; @@ -21,6 +24,7 @@ public: /* 00B8 */ UITextViewer* m_viewer; /* 00BC */ UIEditCtrl* m_edits[15]; /* 00F8 */ UIBitmapButton* m_buttons[3]; + /* 0104 */ std::string unknown_0104; protected: UIButtonContext* m_controls; diff --git a/Source/UI/Window/UIBalloonOpenBtn.cpp b/Source/UI/Window/UIBalloonOpenBtn.cpp index a3437f976..6a400422c 100644 --- a/Source/UI/Window/UIBalloonOpenBtn.cpp +++ b/Source/UI/Window/UIBalloonOpenBtn.cpp @@ -20,3 +20,9 @@ void UIBalloonOpenBtn::Slot19() { } } } + +// OFFSET: 0x009468D0 +// FUNCTION: fn_12847 +UIBalloonOpenBtn::UIBalloonOpenBtn(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls) + : UIFrameWnd(windows, frames, 0), m_openTime(0), m_openDelay(4000), m_balloonId(0), m_balloon(nullptr), m_button(nullptr), m_controls(&controls) { +} diff --git a/Source/UI/Window/UIBalloonOpenBtn.h b/Source/UI/Window/UIBalloonOpenBtn.h index 81f0ef14a..ce24ac5e7 100644 --- a/Source/UI/Window/UIBalloonOpenBtn.h +++ b/Source/UI/Window/UIBalloonOpenBtn.h @@ -10,6 +10,7 @@ struct UIButtonContext; class UIBalloonOpenBtn : public UIFrameWnd { public: + UIBalloonOpenBtn(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); void Paint() override; void Slot15(int width, int height) override; void Slot19() override; diff --git a/Source/UI/Window/UIDebuffRemoveWnd.cpp b/Source/UI/Window/UIDebuffRemoveWnd.cpp index 53c9f0f7c..c47bbaa5d 100644 --- a/Source/UI/Window/UIDebuffRemoveWnd.cpp +++ b/Source/UI/Window/UIDebuffRemoveWnd.cpp @@ -53,3 +53,9 @@ int UIDebuffRemoveWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s return 0; } + +// OFFSET: 0x00946970 +// FUNCTION: fn_12848 +UIDebuffRemoveWnd::UIDebuffRemoveWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls) + : UIFrameWnd(windows, frames, 0), m_button(nullptr), m_controls(&controls) { +} diff --git a/Source/UI/Window/UIDebuffRemoveWnd.h b/Source/UI/Window/UIDebuffRemoveWnd.h index 68bb523b4..68ccc3c61 100644 --- a/Source/UI/Window/UIDebuffRemoveWnd.h +++ b/Source/UI/Window/UIDebuffRemoveWnd.h @@ -8,6 +8,7 @@ struct UIButtonContext; class UIDebuffRemoveWnd : public UIFrameWnd { public: + UIDebuffRemoveWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); void Slot15(int width, int height) override; void Paint() override; void Slot25(int x, int y) override; diff --git a/Source/UI/Window/UIMileageWnd.cpp b/Source/UI/Window/UIMileageWnd.cpp index eef3907c4..3ea0a622f 100644 --- a/Source/UI/Window/UIMileageWnd.cpp +++ b/Source/UI/Window/UIMileageWnd.cpp @@ -128,3 +128,10 @@ int UIMileageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i this->Invalidate(); return 0; } + +// OFFSET: 0x00946B50 +// FUNCTION: fn_12850 +UIMileageWnd::UIMileageWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls) + : UIFrameWnd(windows, frames, 0), m_startTime(0), m_point(0), m_remaining(0), m_bonus(1), m_controls(&controls) { + this->m_tooltip.clear(); +} diff --git a/Source/UI/Window/UIMileageWnd.h b/Source/UI/Window/UIMileageWnd.h index b1ec38db2..e391b4595 100644 --- a/Source/UI/Window/UIMileageWnd.h +++ b/Source/UI/Window/UIMileageWnd.h @@ -10,6 +10,7 @@ struct UIButtonContext; class UIMileageWnd : public UIFrameWnd { public: + UIMileageWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); void Slot19() override; void Slot25(int x, int y) override; void Slot27(int x, int y) override; diff --git a/Source/UI/Window/UINoteWnd.cpp b/Source/UI/Window/UINoteWnd.cpp index 20162c989..580ebb953 100644 --- a/Source/UI/Window/UINoteWnd.cpp +++ b/Source/UI/Window/UINoteWnd.cpp @@ -60,3 +60,9 @@ void UINoteWnd_Scroll::Slot35(int delta) { } } } + +// OFFSET: 0x00946D00 +// FUNCTION: fn_12852 +UINoteWnd::UINoteWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls) + : UIFrameWnd(windows, frames, 0), m_scroll(nullptr), m_controls(&controls) { +} diff --git a/Source/UI/Window/UINoteWnd.h b/Source/UI/Window/UINoteWnd.h index 0d279b5b4..1f7fddee9 100644 --- a/Source/UI/Window/UINoteWnd.h +++ b/Source/UI/Window/UINoteWnd.h @@ -22,6 +22,7 @@ public: class UINoteWnd : public UIFrameWnd { public: + UINoteWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); void Slot15(int width, int height) override; void Paint() override; diff --git a/Source/UI/Window/UIOpenMailBoxWnd.cpp b/Source/UI/Window/UIOpenMailBoxWnd.cpp index 0088d65cf..ac8c735b8 100644 --- a/Source/UI/Window/UIOpenMailBoxWnd.cpp +++ b/Source/UI/Window/UIOpenMailBoxWnd.cpp @@ -63,3 +63,9 @@ int UIOpenMailBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st return 0; } + +// OFFSET: 0x00946DE0 +// FUNCTION: fn_12853 +UIOpenMailBoxWnd::UIOpenMailBoxWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls) + : UIFrameWnd(windows, frames, 0), m_controls(&controls) { +} diff --git a/Source/UI/Window/UIOpenMailBoxWnd.h b/Source/UI/Window/UIOpenMailBoxWnd.h index 3efb8c10f..8126525b6 100644 --- a/Source/UI/Window/UIOpenMailBoxWnd.h +++ b/Source/UI/Window/UIOpenMailBoxWnd.h @@ -7,6 +7,7 @@ struct UIButtonContext; class UIOpenMailBoxWnd : public UIFrameWnd { public: + UIOpenMailBoxWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; diff --git a/Source/UI/Window/UIOpenRoulletteWnd.cpp b/Source/UI/Window/UIOpenRoulletteWnd.cpp index e4b58892c..c89ae7e07 100644 --- a/Source/UI/Window/UIOpenRoulletteWnd.cpp +++ b/Source/UI/Window/UIOpenRoulletteWnd.cpp @@ -53,3 +53,9 @@ int UIOpenRoulletteWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, return 0; } + +// OFFSET: 0x00946E40 +// FUNCTION: fn_12854 +UIOpenRoulletteWnd::UIOpenRoulletteWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls) + : UIFrameWnd(windows, frames, 0), m_controls(&controls) { +} diff --git a/Source/UI/Window/UIOpenRoulletteWnd.h b/Source/UI/Window/UIOpenRoulletteWnd.h index 55e758613..6f17ab49e 100644 --- a/Source/UI/Window/UIOpenRoulletteWnd.h +++ b/Source/UI/Window/UIOpenRoulletteWnd.h @@ -7,6 +7,7 @@ struct UIButtonContext; class UIOpenRoulletteWnd : public UIFrameWnd { public: + UIOpenRoulletteWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); void Slot19() override; void Slot15(int width, int height) override; void Paint() override; diff --git a/Source/UI/Window/UIRPImageWnd2.cpp b/Source/UI/Window/UIRPImageWnd2.cpp index 267c4ce96..dd55f1911 100644 --- a/Source/UI/Window/UIRPImageWnd2.cpp +++ b/Source/UI/Window/UIRPImageWnd2.cpp @@ -20,3 +20,8 @@ void UIRPImageWnd2::SetImage(std::string imageName, int imageCount) { this->m_imageCount = imageCount; this->m_drawImage = 1; } + +// OFFSET: 0x00946F20 +// FUNCTION: fn_12856 +UIRPImageWnd2::UIRPImageWnd2(UIWindowContext& windows, UIFrameContext& frames) : UIFrameWnd(windows, frames, 1), m_drawImage(0) { +} diff --git a/Source/UI/Window/UIRPImageWnd2.h b/Source/UI/Window/UIRPImageWnd2.h index 66f3a45fc..dcedf168c 100644 --- a/Source/UI/Window/UIRPImageWnd2.h +++ b/Source/UI/Window/UIRPImageWnd2.h @@ -7,6 +7,7 @@ class UIRPImageWnd2 : public UIFrameWnd { public: + UIRPImageWnd2(UIWindowContext& windows, UIFrameContext& frames); void Paint() override; void SetImage(std::string imageName, int imageCount); diff --git a/Source/UI/Window/UISecondCostumeWnd.cpp b/Source/UI/Window/UISecondCostumeWnd.cpp index 8ea40bcff..be2f87ee5 100644 --- a/Source/UI/Window/UISecondCostumeWnd.cpp +++ b/Source/UI/Window/UISecondCostumeWnd.cpp @@ -283,3 +283,20 @@ void UISecondCostumeWnd::RefreshList(int tab) { bool UISecondCostumeWnd::Slot03() { return true; } + +// OFFSET: 0x00946FB0 +// FUNCTION: fn_12857 +UISecondCostumeWnd::UISecondCostumeWnd( + UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls, UIListBoxContext& lists, UIComboBoxHeaderContext& combos +) + : UIFrameWnd(windows, frames, 0), m_controls(&controls), m_listContext(&lists), m_comboContext(&combos) { + this->m_typeCombo = nullptr; + this->m_list = nullptr; + this->m_tab = 0; + this->m_selected[0] = 0; + this->m_selected[1] = 0; + this->m_selected[2] = 0; + this->m_selected[3] = 0; + this->unknown_0100 = timeGetTime(); + this->m_page = 0; +} diff --git a/Source/UI/Window/UISecondCostumeWnd.h b/Source/UI/Window/UISecondCostumeWnd.h index 66c8e1100..e03c7c504 100644 --- a/Source/UI/Window/UISecondCostumeWnd.h +++ b/Source/UI/Window/UISecondCostumeWnd.h @@ -4,6 +4,8 @@ #include "UI/Window/UIFrameWnd.h" #include +#include +#include #include class UIComboBoxDefWnd; @@ -19,6 +21,7 @@ struct SecondCostumeEntry { class UISecondCostumeWnd : public UIFrameWnd { public: + UISecondCostumeWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls, UIListBoxContext& lists, UIComboBoxHeaderContext& combos); bool Slot03() override; void Slot15(int width, int height) override; void Paint() override; @@ -40,6 +43,8 @@ protected: UIButtonContext* m_controls; UIListBoxContext* m_listContext; UIComboBoxHeaderContext* m_comboContext; + /* 0108 */ std::string unknown_0108[7]; + /* 01B0 */ std::string unknown_01B0[7]; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Window/UIShowWarpWnd.cpp b/Source/UI/Window/UIShowWarpWnd.cpp index 756bb2868..ea95f78b8 100644 --- a/Source/UI/Window/UIShowWarpWnd.cpp +++ b/Source/UI/Window/UIShowWarpWnd.cpp @@ -80,3 +80,9 @@ int UIShowWarpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument return UIFrameWnd::SendMsg(sender, message, argument1, argument2, argument3, argument4); } } + +// OFFSET: 0x009470C0 +// FUNCTION: fn_12858 +UIShowWarpWnd::UIShowWarpWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls, UIListBoxContext& lists, WindowResponseRecorder& recorder) + : UIFrameWnd(windows, frames, 0), m_controls(&controls), m_listContext(&lists), m_recorder(&recorder) { +} diff --git a/Source/UI/Window/UIShowWarpWnd.h b/Source/UI/Window/UIShowWarpWnd.h index 990e27c0f..c70099d1c 100644 --- a/Source/UI/Window/UIShowWarpWnd.h +++ b/Source/UI/Window/UIShowWarpWnd.h @@ -10,6 +10,7 @@ class UIListBox; class UIShowWarpWnd : public UIFrameWnd { public: + UIShowWarpWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls, UIListBoxContext& lists, WindowResponseRecorder& recorder); void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; diff --git a/Source/UI/Window/UITransMenuWnd.cpp b/Source/UI/Window/UITransMenuWnd.cpp index 8d2b08e21..0c47c3b68 100644 --- a/Source/UI/Window/UITransMenuWnd.cpp +++ b/Source/UI/Window/UITransMenuWnd.cpp @@ -102,3 +102,12 @@ int UITransMenuWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: return 0; } + +// OFFSET: 0x009471E0 +// FUNCTION: fn_12859 +UITransMenuWnd::UITransMenuWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls) : UIFrameWnd(windows, frames, 0), m_controls(&controls) { + this->m_margin = 5; + this->m_lineHeight = 12; + this->m_selected = -1; + this->m_items.reserve(8); +} diff --git a/Source/UI/Window/UITransMenuWnd.h b/Source/UI/Window/UITransMenuWnd.h index d48882a6f..c78a6cd37 100644 --- a/Source/UI/Window/UITransMenuWnd.h +++ b/Source/UI/Window/UITransMenuWnd.h @@ -15,6 +15,7 @@ struct TransMenuItem { class UITransMenuWnd : public UIFrameWnd { public: + UITransMenuWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); void Resize(int width, int height) override; void Move(int x, int y) override; bool Slot07(void* output) override;