From 57203465fe17a63a3945dfd6bbcc19ba41e09b71 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 01:06:04 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Items/UIItemParamChangeDisplayWnd.cpp, Source/UI/Items/UIItemParamChangeDisplayWnd.h, ... Batch #6494 by Montyla: 0 byte-identical, 2 confirmed by peer review. - fn_11947 UIItemParamChangeDisplayWnd::UIItemParamChangeDisplayWnd: logic confirmed by peer review - fn_11954 UIMinimapZoomWnd::UIMinimapZoomWnd: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, superintelligence, SapitoSucio, pedrao Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). Adds to the build: Source/UI/Items/UIItemParamChangeDisplayWnd.cpp, Source/UI/Dialogs/UIMinimapZoomWnd.cpp --- Source/UI/Dialogs/UIMinimapZoomWnd.cpp | 10 ++++++++++ Source/UI/Dialogs/UIMinimapZoomWnd.h | 8 ++++++++ Source/UI/Items/UIItemParamChangeDisplayWnd.cpp | 17 +++++++++++++++++ Source/UI/Items/UIItemParamChangeDisplayWnd.h | 16 +++++++++++++++- data/compile.json | 2 ++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 Source/UI/Dialogs/UIMinimapZoomWnd.cpp create mode 100644 Source/UI/Items/UIItemParamChangeDisplayWnd.cpp diff --git a/Source/UI/Dialogs/UIMinimapZoomWnd.cpp b/Source/UI/Dialogs/UIMinimapZoomWnd.cpp new file mode 100644 index 00000000..8a724d30 --- /dev/null +++ b/Source/UI/Dialogs/UIMinimapZoomWnd.cpp @@ -0,0 +1,10 @@ +#include "UI/Dialogs/UIMinimapZoomWnd.h" + +// OFFSET: 0x008C8460 +// FUNCTION: fn_11954 +UIMinimapZoomWnd::UIMinimapZoomWnd() + : UIFrameWnd(*reinterpret_cast(nullptr), *reinterpret_cast(nullptr), 0), + m_zoom(), + unknown_00BC(0), + unknown_00C0(0), + unknown_00C4(0) {} diff --git a/Source/UI/Dialogs/UIMinimapZoomWnd.h b/Source/UI/Dialogs/UIMinimapZoomWnd.h index fa69dbd8..fc44ddbb 100644 --- a/Source/UI/Dialogs/UIMinimapZoomWnd.h +++ b/Source/UI/Dialogs/UIMinimapZoomWnd.h @@ -3,14 +3,22 @@ #include "UI/Window/UIFrameWnd.h" +#include + struct UIButtonContext; class UIMinimapZoomWnd : public UIFrameWnd { public: + UIMinimapZoomWnd(); bool Slot08() override; void Paint() override; void Slot25(int x, int y) override; + /* 00B4 */ std::map m_zoom; + /* 00BC */ int unknown_00BC; + /* 00C0 */ int unknown_00C0; + /* 00C4 */ int unknown_00C4; + protected: UIButtonContext* m_controls; }; diff --git a/Source/UI/Items/UIItemParamChangeDisplayWnd.cpp b/Source/UI/Items/UIItemParamChangeDisplayWnd.cpp new file mode 100644 index 00000000..08f56f8a --- /dev/null +++ b/Source/UI/Items/UIItemParamChangeDisplayWnd.cpp @@ -0,0 +1,17 @@ +#include "UI/Items/UIItemParamChangeDisplayWnd.h" + +// OFFSET: 0x008C7FC0 +// FUNCTION: fn_11947 +UIItemParamChangeDisplayWnd::UIItemParamChangeDisplayWnd() + : UIFrameWnd(*reinterpret_cast(nullptr), *reinterpret_cast(nullptr), 0), + m_before(0), + m_after(0), + m_beforeSecond(0), + m_afterSecond(0), + unknown_00C4(0), + unknown_00C8(0), + unknown_00CC(0), + unknown_00D0(0), + m_label("512"), + unknown_00EC(0), + m_placement(nullptr) {} diff --git a/Source/UI/Items/UIItemParamChangeDisplayWnd.h b/Source/UI/Items/UIItemParamChangeDisplayWnd.h index 8f6d5d01..700e616d 100644 --- a/Source/UI/Items/UIItemParamChangeDisplayWnd.h +++ b/Source/UI/Items/UIItemParamChangeDisplayWnd.h @@ -4,16 +4,26 @@ #include "Contents/Items/ItemInfo.h" #include "UI/Window/UIFrameWnd.h" +#include +#include + struct UIButtonContext; struct WindowPlacement; class UIItemParamChangeDisplayWnd : public UIFrameWnd { public: + UIItemParamChangeDisplayWnd(); + /* 00B4 */ int m_before; /* 00B8 */ int m_after; /* 00BC */ int m_beforeSecond; /* 00C0 */ int m_afterSecond; - /* 00C4 */ unsigned char unknown_00C4[0x2C]; + /* 00C4 */ int unknown_00C4; + /* 00C8 */ int unknown_00C8; + /* 00CC */ int unknown_00CC; + /* 00D0 */ int unknown_00D0; + /* 00D4 */ std::string m_label; + /* 00EC */ int unknown_00EC; /* 00F0 */ WindowPlacement* m_placement; void Slot11() override; @@ -27,4 +37,8 @@ protected: UIButtonContext* m_controls; }; +#if defined(_WIN32) && !defined(_WIN64) +static_assert(offsetof(UIItemParamChangeDisplayWnd, m_placement) - offsetof(UIItemParamChangeDisplayWnd, unknown_00C4) == 0x2C); +#endif + #endif diff --git a/data/compile.json b/data/compile.json index a74034ea..69d52dae 100644 --- a/data/compile.json +++ b/data/compile.json @@ -843,6 +843,7 @@ "Source/UI/Dialogs/UIEditctrlWnd.cpp": 2, "Source/UI/Dialogs/UIEmailAddressWnd.cpp": 2, "Source/UI/Dialogs/UIGraffiStrboxWnd.cpp": 2, + "Source/UI/Dialogs/UIMinimapZoomWnd.cpp": 2, "Source/UI/Dialogs/UIWaitDBSaveWnd.cpp": 2, "Source/UI/Edit/EditTextState.cpp": 2, "Source/UI/Edit/EditViewport.cpp": 2, @@ -872,6 +873,7 @@ "Source/UI/Items/MergeItemWnd.cpp": 2, "Source/UI/Items/UIGameItem.cpp": 2, "Source/UI/Items/UIIllustWnd.cpp": 2, + "Source/UI/Items/UIItemParamChangeDisplayWnd.cpp": 2, "Source/UI/Items/UIItemRepairWnd.cpp": 2, "Source/UI/Items/UIMakeTargetListWnd.cpp": 2, "Source/UI/Items/UIMakeTargetProcessWnd.cpp": 2,