From f1e8a70739c8b1493b307cb648afd32dee4035af Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 13:16:03 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/UIChangeMaterialWnd.cpp, Source/UI/UIChangeMaterialWnd.h Batch #1433 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_03872 UIChangeMaterialWnd::GetItemAt: logic confirmed by peer review - fn_03875 UIChangeMaterialWnd_List::Move: logic confirmed by peer review Reviewed-by: ragnarok-clanker --- Source/UI/UIChangeMaterialWnd.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/UI/UIChangeMaterialWnd.cpp b/Source/UI/UIChangeMaterialWnd.cpp index c45ce4b..2909655 100644 --- a/Source/UI/UIChangeMaterialWnd.cpp +++ b/Source/UI/UIChangeMaterialWnd.cpp @@ -1,6 +1,20 @@ #include "UI/UIChangeMaterialWnd.h" // OFFSET: 0x005E1120 +// FUNCTION: fn_03872 +ItemInfo* UIChangeMaterialWnd::GetItemAt(int x, int y) { + if (this->m_resultX <= x && x <= this->m_resultX + 24 && this->m_resultY <= y && y <= this->m_resultY + 24) { + return &this->m_resultItem; + } + + for (unsigned int i = 0; i < this->m_materials.size(); ++i) { + const MaterialSlotPos& pos = this->m_materialPos[i]; + if (pos.x <= x && x <= pos.x + 24 && pos.y <= y && y <= pos.y + 24) { + return &this->m_materials[i]; + } + } + return nullptr; +} // OFFSET: 0x005E1300 // FUNCTION: fn_03874 @@ -9,3 +23,7 @@ bool UIChangeMaterialWnd::Slot02() { } // OFFSET: 0x005E1310 +// FUNCTION: fn_03875 +void UIChangeMaterialWnd_List::Move(int x, int y) { + UIWindow::Move(x, y); +}