From 477baba99fbea3f9dc67c6b307eb28f3d464b78e Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 01:46:34 +0000 Subject: [PATCH] Decompile 6 functions in Source/UI/Window/UIControl.cpp, Source/UI/Lists/UIVScrollBar.h, ... Batch #4146 by youko: 4 byte-identical, 2 confirmed by peer review. - fn_13965 CUIVScrollBar::~CUIVScrollBar: logic confirmed by peer review - fn_13987 CUIListBoxEx::ClearItems: byte-identical - fn_13988 CUIListBoxEx::ClearItems: byte-identical - fn_13989 CUIListBoxEx::ClearItems: byte-identical - fn_13990 CUIListBoxEx::ClearItems: byte-identical - fn_13991 CUIAdventureGuide::Slot53: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, superintelligence, tayoba, eAthena, Yommy, Millenium Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 59 +++++++++++++++++++ Source/UI/AdventureGuide/UIAdventureGuide.h | 6 ++ Source/UI/Lists/UIVScrollBar.h | 1 + Source/UI/Window/UIControl.cpp | 5 ++ 4 files changed, 71 insertions(+) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index 1e2bf70b..ff436d27 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -1,6 +1,7 @@ #include "Contents/AdventureGuideMgr.h" #include "UI/AdventureGuide/UIAdventureGuide.h" #include "UI/Lists/UIListBoxTemplate.h" +#include "Render/Renderer.h" #include "UI/Lists/UIVScrollBar.h" #include "UI/Text/UIStaticTextControl.h" @@ -8,6 +9,64 @@ template void CUIListBoxEx::UpdateScrollBar(); template void CUIListBox::UpdateScrollBar(); +// OFFSET: 0x009C12B0 +// FUNCTION: fn_13987 +template <> +void CUIListBoxEx::ClearItems() { + for (AdventureGuide::CUIItemInfo* item : this->items) { + this->RemoveChild(item, 1); + } + + this->items.clear(); + this->selected = static_cast(-1); +} + +// OFFSET: 0x009C1310 +// FUNCTION: fn_13988 +template <> +void CUIListBoxEx::ClearItems() { + for (AdventureGuide::CUIMonsterInfo* item : this->items) { + this->RemoveChild(item, 1); + } + + this->items.clear(); + this->selected = static_cast(-1); +} + +// OFFSET: 0x009C1370 +// FUNCTION: fn_13989 +template <> +void CUIListBoxEx::ClearItems() { + for (AdventureGuide::CUIQuestInfo* item : this->items) { + this->RemoveChild(item, 1); + } + + this->items.clear(); + this->selected = static_cast(-1); +} + +// OFFSET: 0x009C13D0 +// FUNCTION: fn_13990 +template <> +void CUIListBoxEx::ClearItems() { + for (AdventureGuide::CUITabInfo* item : this->items) { + this->RemoveChild(item, 1); + } + + this->items.clear(); + this->selected = static_cast(-1); +} + +// OFFSET: 0x009C14F0 +// FUNCTION: fn_13991 +void CUIAdventureGuide::Slot53() { + this->unknown_00B4 = 0; + this->Resize(750, 468); + this->Move((g_renderer->viewport.width - this->geometry.width) / 2, (g_renderer->viewport.height - this->geometry.height) / 2); + this->Slot15(this->geometry.width, this->geometry.height); + this->Slot16(); +} + namespace AdventureGuide { // OFFSET: 0x009DC8E0 diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.h b/Source/UI/AdventureGuide/UIAdventureGuide.h index 82a32283..15c88bf9 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.h +++ b/Source/UI/AdventureGuide/UIAdventureGuide.h @@ -1,11 +1,17 @@ #ifndef RAGNAROK_SOURCE_UI_ADVENTUREGUIDE_UIADVENTUREGUIDE_H #define RAGNAROK_SOURCE_UI_ADVENTUREGUIDE_UIADVENTUREGUIDE_H +#include "UI/FrameSkin.h" #include "UI/Lists/UIListBoxTemplate.h" #include "UI/Window/UIControl.h" #include +class CUIAdventureGuide : public CUIFrameWnd { +public: + virtual void Slot53(); +}; + namespace AdventureGuide { class CUIPage : public CUIControl { diff --git a/Source/UI/Lists/UIVScrollBar.h b/Source/UI/Lists/UIVScrollBar.h index 2b9c12f6..d1d02720 100644 --- a/Source/UI/Lists/UIVScrollBar.h +++ b/Source/UI/Lists/UIVScrollBar.h @@ -10,6 +10,7 @@ class CUIVScrollBar : public CUIControl { public: + ~CUIVScrollBar() override; void Resize(int width, int height) override; void Show(int visible) override; void Paint() override; diff --git a/Source/UI/Window/UIControl.cpp b/Source/UI/Window/UIControl.cpp index 59f7f059..51bfde80 100644 --- a/Source/UI/Window/UIControl.cpp +++ b/Source/UI/Window/UIControl.cpp @@ -163,6 +163,11 @@ void CUIControl::Slot52(int value) { void CUIControl::Slot53(int) { } +// OFFSET: 0x009C0220 +// FUNCTION: fn_13965 +CUIVScrollBar::~CUIVScrollBar() { +} + // OFFSET: 0x009F2B70 // FUNCTION: fn_14726 void CUIVScrollBar::SetTotal(int value) {