From 18d38810bcc4ac7d44fffe0fd9f5711205f07674 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 01:07:23 +0000 Subject: [PATCH] Decompile fn_14331 (AdventureGuide::CUIIntro::Slot16) Batch #4121 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_14331 AdventureGuide::CUIIntro::Slot16: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, superintelligence, tayoba Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 18 ++++++++++++++++++ Source/UI/AdventureGuide/UIAdventureGuide.h | 4 +++- Source/UI/Lists/UIListBoxTemplate.h | 8 +++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index be542f16..1e2bf70b 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -34,6 +34,24 @@ void CUIQuest::Paint() { this->ClearSurface(0xFFFF00FF); } +// OFFSET: 0x009DCFF0 +// FUNCTION: fn_14331 +void CUIIntro::Slot16() { + const std::string& title = g_adventureGuideMgr->unknown_0014; + const std::map& texts = g_adventureGuideMgr->unknown_002C; + if (texts.empty()) { + return; + } + + for (const auto& text : texts) { + this->contents->data.emplace_back(text.second.first, text.second.second); + } + + this->contents->UpdateScrollBar(); + this->image->SetImage(title); + this->contents->scrollBar->SetHidden(1); +} + // OFFSET: 0x009DD1C0 // FUNCTION: fn_14333 void CUIItem::Slot16() { diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.h b/Source/UI/AdventureGuide/UIAdventureGuide.h index 73c438d6..82a32283 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.h +++ b/Source/UI/AdventureGuide/UIAdventureGuide.h @@ -15,10 +15,12 @@ public: class CUIIntro : public CUIPage { public: + void Slot16() override; void Paint() override; void Slot54(int first, int second) override; - /* 0084 */ unsigned char unknown_0084[0x08]; + /* 0084 */ CUIStaticImage* image; + /* 0088 */ CUIListBoxEx* contents; }; class CUIItem : public CUIPage { diff --git a/Source/UI/Lists/UIListBoxTemplate.h b/Source/UI/Lists/UIListBoxTemplate.h index 017d03e9..6ed9f644 100644 --- a/Source/UI/Lists/UIListBoxTemplate.h +++ b/Source/UI/Lists/UIListBoxTemplate.h @@ -90,7 +90,13 @@ class CQuestInfo {}; } namespace Guide_Intro { -struct Contents {}; +struct Contents { + Contents(const std::string& first, const std::string& second) : first(first), second(second) { + } + + /* 0000 */ std::string first; + /* 0018 */ std::string second; +}; } template class CUIListBox : public CUIControl {