From 6a88c4419ff26fc789cfaceb46fd0b73c3e9efd5 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 05:58:56 +0000 Subject: [PATCH] Decompile fn_45477 (AdventureGuide::CUIMonster::SearchNavigation) Batch #9292 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_45477 AdventureGuide::CUIMonster::SearchNavigation: logic confirmed by peer review Peer-reviewed-by: gordaoprogramas, superintelligence, seumadruga Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 34 +++++++++++++++++++ Source/UI/AdventureGuide/UIAdventureGuide.h | 22 ++++++++---- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index ccd69097..ae28cadb 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -2109,3 +2109,37 @@ void CUIQuest::SearchNavigation() { } } + +namespace AdventureGuide { + +// OFFSET: 0x009C5BB0 + + +// OFFSET: 0x009C6F50 + + +// OFFSET: 0x009CDD40 + + +// OFFSET: 0x009CAE30 + +// OFFSET: 0x009DBAC0 +// FUNCTION: fn_45477 +void CUIMonster::SearchNavigation() { + g_navigationManager.unknown_1264 = this->unknown_0088; + g_navigationManager.UpdateSearchResults(); + g_navigationManager.unknown_12C4 = 0; + g_navigationManager.unknown_12C8 = 0; + g_navigationManager.SelectNodeState(); + if (g_windowMgr.LookupWindow(203)) { + g_navigationManager.SetViewMode(1); + g_navigationManager.ClearSavedTarget(); + g_windowMgr.CloseWindow(314); + static_cast(g_navigationWindow)->RefreshLayout(); + reinterpret_cast(g_windowMgr).Promote(g_windowMgr.LookupWindow(203)); + } else { + g_windowMgr.EnsureWindow(203); + } +} + +} diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.h b/Source/UI/AdventureGuide/UIAdventureGuide.h index d588ee14..d1c07f31 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.h +++ b/Source/UI/AdventureGuide/UIAdventureGuide.h @@ -3,7 +3,10 @@ #include "UI/FrameSkin.h" #include "UI/Lists/UIListBoxTemplate.h" +#include "UI/Navigation/UINavigationV4Wnd.h" #include "UI/Window/UIControl.h" +#include "UI/Window/UINavigationWnd.h" +#include "UI/Window/WindowOrdering.h" #include @@ -68,9 +71,10 @@ class CUIIntro : public CUIPage { public: // OFFSET: 0x009D8FE0 // FUNCTION: fn_14274 - explicit CUIIntro(UIWindowContext& context) : CUIPage(context), image(nullptr), contents(nullptr), unknown_0080(nullptr) { + explicit CUIIntro(UIWindowContext& context) : CUIPage(context), image(nullptr), contents(nullptr), banner(nullptr) { } + void Slot15(int width, int height) override; void Slot16() override; void Paint() override; void Slot54(int first, int second) override; @@ -80,7 +84,7 @@ public: /* 0084 */ CUIStaticImage* image; /* 0088 */ CUIListBoxEx* contents; - /* 0080 */ UIWindow* unknown_0080; + /* 0080 */ CUIStaticImage* banner; }; class CUIItem : public CUIPage { @@ -91,6 +95,7 @@ public: : CUIPage(context), unknown_0084(nullptr), unknown_0088(nullptr), unknown_008C(), location(-1), itemList(nullptr) { } + void Slot15(int width, int height) override; void Slot16() override; void Paint() override; void Slot54(int type, int id) override; @@ -99,8 +104,8 @@ public: void RequestNavigation(); void SearchNavigation(); - /* 0084 */ UIWindow* unknown_0084; - /* 0088 */ UIWindow* unknown_0088; + /* 0084 */ CUIImageButton* unknown_0084; + /* 0088 */ CUIImageButton* unknown_0088; /* 008C */ std::string unknown_008C; /* 00A4 */ int location; /* 0080 */ CUIListBoxEx* itemList; @@ -113,14 +118,16 @@ public: explicit CUIMonster(UIWindowContext& context) : CUIPage(context), unknown_0084(nullptr), unknown_0088(), monsterList(nullptr) { } + void Slot15(int width, int height) override; void Slot16() override; void Paint() override; void Slot54(int first, int second) override; void OnSelectMonster(CUIMonsterInfo* item, const CMonsterData& data); void BindMonster(CUIMonsterInfo* item, const CMonsterData& data); + void SearchNavigation(); - /* 0084 */ UIWindow* unknown_0084; + /* 0084 */ CUIImageButton* unknown_0084; /* 0088 */ std::string unknown_0088; /* 0080 */ CUIListBoxEx* monsterList; }; @@ -132,6 +139,7 @@ public: explicit CUIQuest(UIWindowContext& context) : CUIPage(context), unknown_0084(nullptr), unknown_0088(nullptr), unknown_008C(), questList(nullptr) { } + void Slot15(int width, int height) override; void Slot16() override; void Paint() override; void Slot54(int type, int id) override; @@ -140,8 +148,8 @@ public: void RequestNavigation(); void SearchNavigation(); - /* 0084 */ UIWindow* unknown_0084; - /* 0088 */ UIWindow* unknown_0088; + /* 0084 */ CUIImageButton* unknown_0084; + /* 0088 */ CUIImageButton* unknown_0088; /* 008C */ std::string unknown_008C; /* 0080 */ CUIListBoxEx* questList; };