From a19784af308c430cdacf2bf2f359dc0a6f055aa8 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 21:25:13 +0000 Subject: [PATCH] Decompile fn_10336 (UIDisplayCharacter::Slot15) Batch #8804 by kyoshi: 0 byte-identical, 1 confirmed by peer review. - fn_10336 UIDisplayCharacter::Slot15: logic confirmed by peer review Peer-reviewed-by: eAthena, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/StylingShop/UIStylingShopWnd.cpp | 32 ++++++++++++++++++++++ Source/UI/StylingShop/UIStylingShopWnd.h | 9 ++++++ 2 files changed, 41 insertions(+) diff --git a/Source/UI/StylingShop/UIStylingShopWnd.cpp b/Source/UI/StylingShop/UIStylingShopWnd.cpp index cfd4266f..b22a9112 100644 --- a/Source/UI/StylingShop/UIStylingShopWnd.cpp +++ b/Source/UI/StylingShop/UIStylingShopWnd.cpp @@ -1504,6 +1504,7 @@ struct StyleChangePacket { #include "Utility/Text/GroupedInteger.h" #include #include +#include // OFFSET: 0x00827AE0 // FUNCTION: fn_10331 @@ -2068,3 +2069,34 @@ void UIAccessoryCusWnd::Slot15(int, int) { showCase->Move(static_cast(roundf(static_cast(this->geometry.width) * 0.6f)), 13); this->AddChild(showCase); } + +// OFFSET: 0x008270A0 + +// OFFSET: 0x00828B90 +// FUNCTION: fn_10336 +void UIDisplayCharacter::Slot15(int width, int height) { + this->Resize(width, height); + this->unknown_00A8 = timeGetTime(); + if (!*reinterpret_cast(&this->unknown_00B0)) { + this->CreateButtons(); + } + + this->unknown_0088 = g_session.m_robe; + this->unknown_008C = g_session.m_head; + this->job = g_session.m_bodyCostume; + this->unknown_0094 = g_session.m_headPalette; + this->unknown_0098 = g_session.m_bodyStyle; + this->unknown_009C = *reinterpret_cast(&g_session.unknown_0EF4[4]); + this->unknown_00A0 = *reinterpret_cast(&g_session.unknown_0EF4[8]); + this->unknown_00A4 = *reinterpret_cast(&g_session.unknown_0EF4[0]); + this->unknown_00B4 = static_cast(roundf(static_cast(this->geometry.width) * 0.55f) - 40.0f); + this->unknown_00B8 = static_cast(roundf(static_cast(this->geometry.height) * 0.877f) - 17.0f); +} + +// OFFSET: 0x00829080 + +// OFFSET: 0x00827D00 + +// OFFSET: 0x00828380 + +// OFFSET: 0x008288C0 diff --git a/Source/UI/StylingShop/UIStylingShopWnd.h b/Source/UI/StylingShop/UIStylingShopWnd.h index efdbe08e..4bf2c073 100644 --- a/Source/UI/StylingShop/UIStylingShopWnd.h +++ b/Source/UI/StylingShop/UIStylingShopWnd.h @@ -21,6 +21,8 @@ public: void SelectNextStyle(const char* table, int* goods); void SelectPreviousStyle(const char* table, int* goods); std::string GetStyleTable(const int& type); + void CreateButtons(); + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; @@ -59,6 +61,7 @@ public: bool SendStyleChange(); void DrawPaymentItem(const int& type, const int& zeny, const int& itemId, bool enabled, const int& row); void DrawPayments(); + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; @@ -105,6 +108,7 @@ public: class UICostumeChangeWnd : public UIStylingshopTabParentWnd { public: explicit UICostumeChangeWnd(UIWindowContext& context); + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; }; @@ -139,6 +143,7 @@ class UI2ndCostumeWnd : public UIStylingshopTabParentWnd { public: explicit UI2ndCostumeWnd(UIWindowContext& context); + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; @@ -177,6 +182,7 @@ public: class UIBasicStylingWnd : public UIStylingshopTabParentWnd { public: explicit UIBasicStylingWnd(UIWindowContext& context); + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; @@ -221,6 +227,9 @@ public: class UI2ndCostumeCheckBox : public UICheckBox { public: + // INLINED + UI2ndCostumeCheckBox(UIWindowContext& windowContext, UIButtonContext& controls) : UICheckBox(windowContext, controls) { + } void Slot25(int x, int y) override; };