From d0656a7ed3e9ed13494b313d586977957b634990 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 18:16:29 +0000 Subject: [PATCH] Decompile fn_14353 (AdventureGuide::CUITab::SetSelected) Batch #9688 by Toshiro: 0 byte-identical, 1 confirmed by peer review. - fn_14353 AdventureGuide::CUITab::SetSelected: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Romain, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 5 ++++- Source/UI/Lists/UIListBoxTemplate.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index 1322c878..98ce6a40 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -845,7 +845,8 @@ void CUIQuest::Slot54(int type, int id) { // FUNCTION: fn_14353 void CUITab::SetSelected(bool selected) { CUIListItem::SetSelected(selected); - const bool expand = selected && this->subTabs && !this->subTabs->geometry.visible; + volatile bool selectedState = selected; + const bool expand = selectedState && this->subTabs && !this->subTabs->geometry.visible; if (this->subTabs) { this->subTabs->Show(expand); } @@ -2017,6 +2018,8 @@ AdventureGuide::CUISubTab* CUIListBox::CreateItem() { return item; } +// OFFSET: 0x009DB4B0 + namespace AdventureGuide { // OFFSET: 0x009DB720 diff --git a/Source/UI/Lists/UIListBoxTemplate.h b/Source/UI/Lists/UIListBoxTemplate.h index 0c29dbd9..4f247272 100644 --- a/Source/UI/Lists/UIListBoxTemplate.h +++ b/Source/UI/Lists/UIListBoxTemplate.h @@ -62,6 +62,9 @@ public: class CUITab : public CUIListItem { public: + // INLINED + CUITab() : CUIListItem(), unknown_00E8(nullptr), subTabs(nullptr), unknown_00F0(), type(7), page(nullptr), unknown_0110(0) { + } explicit CUITab(UIWindowContext& context); void Slot15(int width, int height) override; void Slot16() override;