From edd7dd7b4ca6e83457a805273ee261ce4cdd00cf Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 12:49:55 +0000 Subject: [PATCH] Decompile fn_03874 (UIChangeMaterialWnd::Slot02) Batch #1434 by Yommy: 1 byte-identical, 0 confirmed by peer review. - fn_03874 UIChangeMaterialWnd::Slot02: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/UI/UIChangeMaterialWnd.cpp --- Source/UI/UIChangeMaterialWnd.cpp | 11 +++++++++ Source/UI/UIChangeMaterialWnd.h | 41 +++++++++++++++++++++++++++++++ data/compile.json | 1 + 3 files changed, 53 insertions(+) create mode 100644 Source/UI/UIChangeMaterialWnd.cpp create mode 100644 Source/UI/UIChangeMaterialWnd.h diff --git a/Source/UI/UIChangeMaterialWnd.cpp b/Source/UI/UIChangeMaterialWnd.cpp new file mode 100644 index 0000000..c45ce4b --- /dev/null +++ b/Source/UI/UIChangeMaterialWnd.cpp @@ -0,0 +1,11 @@ +#include "UI/UIChangeMaterialWnd.h" + +// OFFSET: 0x005E1120 + +// OFFSET: 0x005E1300 +// FUNCTION: fn_03874 +bool UIChangeMaterialWnd::Slot02() { + return true; +} + +// OFFSET: 0x005E1310 diff --git a/Source/UI/UIChangeMaterialWnd.h b/Source/UI/UIChangeMaterialWnd.h new file mode 100644 index 0000000..adbe3ee --- /dev/null +++ b/Source/UI/UIChangeMaterialWnd.h @@ -0,0 +1,41 @@ +#ifndef RAGNAROK_SOURCE_UI_UICHANGEMATERIALWND_H +#define RAGNAROK_SOURCE_UI_UICHANGEMATERIALWND_H + +#include "Contents/Items/ItemInfo.h" +#include "UI/Window/UIFrameWnd.h" + +#include +#include + +struct MaterialSlotPos { + /* 0000 */ int x; + /* 0004 */ int y; +}; + +class UIChangeMaterialWnd : public UIFrameWnd { +public: + bool Slot02() override; + ItemInfo* GetItemAt(int x, int y); + + /* 00BC */ std::uint32_t unknown_00BC; + /* 00C0 */ std::uint32_t unknown_00C0; + /* 00C4 */ int m_resultX; + /* 00C8 */ int m_resultY; + /* 00D0 */ ItemInfo m_resultItem; + /* 01C8 */ MaterialSlotPos m_materialPos[6]; + /* 01F8 */ std::vector m_materials; +}; + +class UIChangeMaterialWnd_List : public UIFrameWnd { +public: + void Move(int x, int y) override; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(offsetof(UIChangeMaterialWnd, m_resultX) == 0xC4); +static_assert(offsetof(UIChangeMaterialWnd, m_resultItem) == 0xD0); +static_assert(offsetof(UIChangeMaterialWnd, m_materialPos) == 0x1C8); +static_assert(offsetof(UIChangeMaterialWnd, m_materials) == 0x1F8); +#endif + +#endif diff --git a/data/compile.json b/data/compile.json index 3010ed3..bee3976 100644 --- a/data/compile.json +++ b/data/compile.json @@ -615,6 +615,7 @@ "Source/UI/Text/UITextViewerLinks.cpp": 2, "Source/UI/Text/UITextViewerMessages.cpp": 2, "Source/UI/Text/UITransBalloonText.cpp": 2, + "Source/UI/UIChangeMaterialWnd.cpp": 2, "Source/UI/UILapineScrollBar.cpp": 2, "Source/UI/UILapineUpgradeBoxWnd.cpp": 2, "Source/UI/UIStaticBitmap.cpp": 2,