From 9d0d68ce1fb1082d50d62006087c7f3ea544db58 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 23:43:15 +0000 Subject: [PATCH] Decompile fn_04202 (UILapineUpgradeBox_IngredientListWnd::Paint) Batch #1919 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_04202 UILapineUpgradeBox_IngredientListWnd::Paint: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/UI/Buttons/UIButton.h | 4 ++++ Source/UI/UILapineScrollBar.h | 30 +++++++++++++++++++++++++++++ Source/UI/UILapineUpgradeBoxWnd.cpp | 18 +++++++++++++++++ Source/UI/UILapineUpgradeBoxWnd.h | 5 ++++- 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/Source/UI/Buttons/UIButton.h b/Source/UI/Buttons/UIButton.h index c808d10..4d48124 100644 --- a/Source/UI/Buttons/UIButton.h +++ b/Source/UI/Buttons/UIButton.h @@ -55,6 +55,10 @@ public: void SetDisabled(unsigned char value) { this->m_disabled = value; } + // INLINED + unsigned char Disabled() const { + return this->m_disabled; + } std::string label; protected: diff --git a/Source/UI/UILapineScrollBar.h b/Source/UI/UILapineScrollBar.h index bd7d319..0edd941 100644 --- a/Source/UI/UILapineScrollBar.h +++ b/Source/UI/UILapineScrollBar.h @@ -3,14 +3,44 @@ #include "UI/Lists/UIScrollBar.h" +#include +#include + +class UILapineUpgradeBox_IngredientInfoWnd; + class UILapineScrollBar : public UIScrollBar { public: void Paint() override; }; class UIScrollWnd : public UIWindow { +public: + /* 0080 */ unsigned char unknown_0080[0x10]; + /* 0090 */ UIScrollBar* scrollBar; + /* 0094 */ int scrollBarWidth; + /* 0098 */ int scrollBarHeight; + /* 009C */ int unknown_009C; + /* 00A0 */ int scrollPosition; + /* 00A4 */ unsigned char unknown_00A4; + /* 00A5 */ unsigned char wheelScroll; }; +class UILapineUpgradeBox_IngredientListWnd : public UIScrollWnd { +public: + void Slot10(int x, int y, std::intptr_t value) override; + void Paint() override; + void Slot35(int argument) override; + + /* 00A8 */ unsigned char unknown_00A8[0x14]; + /* 00BC */ std::vector items; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(offsetof(UIScrollWnd, scrollBar) == 0x90); +static_assert(offsetof(UIScrollWnd, wheelScroll) == 0xA5); +static_assert(offsetof(UILapineUpgradeBox_IngredientListWnd, items) == 0xBC); +#endif + class UILapineBox_IngredientListWnd : public UIScrollWnd { public: void Paint() override; diff --git a/Source/UI/UILapineUpgradeBoxWnd.cpp b/Source/UI/UILapineUpgradeBoxWnd.cpp index 3953566..c6bf59b 100644 --- a/Source/UI/UILapineUpgradeBoxWnd.cpp +++ b/Source/UI/UILapineUpgradeBoxWnd.cpp @@ -6,8 +6,12 @@ #include "Client/Mode/ModeEvents.h" #include "Contents/Items/ItemDescription.h" #include "UI/Buttons/UIBitmapButton.h" +#include "UI/UILapineScrollBar.h" #include "UI/Window/WindowManagerWindows.h" +#include +#include + // OFFSET: 0x006035E0 // FUNCTION: fn_04194 void UILapineUpgradeBoxWnd::Slot10(int x, int y, std::intptr_t value) { @@ -118,3 +122,17 @@ void UILapineUpgradeBoxWnd::SetWaiting(unsigned char value) { this->upgradeButton->Invalidate(); this->Invalidate(); } + +// OFFSET: 0x00603680 + +// OFFSET: 0x00603DA0 +// FUNCTION: fn_04202 +void UILapineUpgradeBox_IngredientListWnd::Paint() { + this->ClearSurface(0xFFF7F7); +} + +// OFFSET: 0x006041A0 + +// OFFSET: 0x00605980 + +// OFFSET: 0x00603FE0 diff --git a/Source/UI/UILapineUpgradeBoxWnd.h b/Source/UI/UILapineUpgradeBoxWnd.h index f689af7..11f83ec 100644 --- a/Source/UI/UILapineUpgradeBoxWnd.h +++ b/Source/UI/UILapineUpgradeBoxWnd.h @@ -7,6 +7,7 @@ #include class UIBitmapButton; +class UILapineUpgradeBox_IngredientListWnd; class UILapineUpgradeBox_IngredientInfoWnd : public UIFrameWnd { public: @@ -27,15 +28,17 @@ public: class UILapineUpgradeBoxWnd : public UIFrameWnd { public: void Slot10(int x, int y, std::intptr_t value) override; + void Slot19() override; void Slot25(int x, int y) override; void Slot26(int x, int y) override; void Slot32(int x, int y) override; void SetWaiting(unsigned char value); + UILapineUpgradeBox_IngredientInfoWnd* FindSelected(); /* 00B4 */ UIBitmapButton* closeButton; /* 00B8 */ UIBitmapButton* upgradeButton; /* 00BC */ UIBitmapButton* selectButton; - /* 00C0 */ UIWindow* ingredientList; + /* 00C0 */ UILapineUpgradeBox_IngredientListWnd* ingredientList; /* 00C4 */ int ingredientId; /* 00C8 */ std::string title; /* 00E0 */ ItemInfo item;