From f545883c1a8eabf28cd3a0e5ed8d7daebad85ea0 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 09:47:30 +0000 Subject: [PATCH] Decompile fn_17178 (UIWindowMgr::LoadUIRectInfo) Batch #18120 by eAthena: 1 byte-identical, 0 confirmed by peer review. - fn_17178 UIWindowMgr::LoadUIRectInfo: byte-identical Merged automatically: every function is byte-identical to the original. --- .../Linkage/Source/UI/Window/WindowMgrState.cpp.h | 2 ++ Source/UI/Window/WindowMgrState.cpp | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Source/Linkage/Source/UI/Window/WindowMgrState.cpp.h b/Source/Linkage/Source/UI/Window/WindowMgrState.cpp.h index b6e3611f7..731c685e7 100644 --- a/Source/Linkage/Source/UI/Window/WindowMgrState.cpp.h +++ b/Source/Linkage/Source/UI/Window/WindowMgrState.cpp.h @@ -45,3 +45,5 @@ extern template std::_Tree_unchecked_const_iterator>>, std::_Iterator_base0>& std::_Tree_unchecked_const_iterator>>, std::_Iterator_base0>::operator++() noexcept; extern template std::_List_node* std::list::_Emplace(std::_List_node* const, UIWindow* const&); +using PersistentWindowTree = std::_Tree, std::allocator, false>>; +extern template std::pair*, bool> PersistentWindowTree::_Emplace(UIWindow*&&); diff --git a/Source/UI/Window/WindowMgrState.cpp b/Source/UI/Window/WindowMgrState.cpp index 7280778aa..7ce493d30 100644 --- a/Source/UI/Window/WindowMgrState.cpp +++ b/Source/UI/Window/WindowMgrState.cpp @@ -219,13 +219,19 @@ void UIWindowMgr::LoadUIRectInfo() { char name[256]; RegQueryValueExA(key, "m_minimapZoomWnd", nullptr, &type, reinterpret_cast(&this->minimapZoom), &size); - if (RegQueryValueExA(key, "M_ISDRAGALL", nullptr, &type, reinterpret_cast(&this->dragAllItems), &size) != ERROR_SUCCESS || this->dragAllItems != 0) { + if (RegQueryValueExA(key, "M_ISDRAGALL", nullptr, &type, reinterpret_cast(&this->dragAllItems), &size) != ERROR_SUCCESS) { + this->dragAllItems = 1; + } + if (this->dragAllItems != 0) { this->dragAllItems = 1; } if (RegQueryValueExA(key, "M_ISDRAWCOMPASS", nullptr, &type, reinterpret_cast(&this->drawCompass), &size) != ERROR_SUCCESS) { this->drawCompass = 0; } - if (RegQueryValueExA(key, "M_MINIMAPARGB", nullptr, &type, reinterpret_cast(&this->minimapColor), &size) != ERROR_SUCCESS || this->minimapColor != 0xFFFFFFFF) { + if (RegQueryValueExA(key, "M_MINIMAPARGB", nullptr, &type, reinterpret_cast(&this->minimapColor), &size) != ERROR_SUCCESS) { + this->minimapColor = 0xAAFFFFFF; + } + if (this->minimapColor != 0xFFFFFFFF) { this->minimapColor = 0xAAFFFFFF; } RegQueryValueExA(key, "M_CHATWNDSTATUS", nullptr, &type, reinterpret_cast(&this->chatWndStatus), &size); @@ -308,9 +314,8 @@ void UIWindowMgr::LoadUIRectInfo() { std::memset(name, 0, sizeof(name) - 1); RegQueryValueExA(key, "ITEMSTOREWNDNUM", nullptr, &type, reinterpret_cast(&this->itemStoreWindowCount), &size); if (this->itemStoreWindowCount != 8) { - ItemStoreFindSlotInfo* const storeSlots = reinterpret_cast(base + 0x62C); for (int index = 0; index < 8; ++index) { - storeSlots[index].Reset(index); + reinterpret_cast(base + 0x62C)[index].Reset(index); } this->itemStoreWindowCount = 8; reinterpret_cast(base + 0x614)->Reset();