From 90aee1257f2480de8e7ac6309fcca295624f1eec Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 29 Oct 2026 00:12:04 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/UILapineUpgradeBoxWnd.cpp, Source/UI/UILapineScrollBar.h Batch #1952 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review. - fn_04214 UILapineUpgradeBox_IngredientListWnd::Slot35: logic confirmed by peer review - fn_04223 UILapineUpgradeBox_IngredientListWnd::FindSelected: logic confirmed by peer review Peer-reviewed-by: eAthena, Yommy Reviewed-by: ragnarok-clanker --- Source/UI/UILapineScrollBar.h | 1 + Source/UI/UILapineUpgradeBoxWnd.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/Source/UI/UILapineScrollBar.h b/Source/UI/UILapineScrollBar.h index 0edd941..5ca58ce 100644 --- a/Source/UI/UILapineScrollBar.h +++ b/Source/UI/UILapineScrollBar.h @@ -30,6 +30,7 @@ public: void Slot10(int x, int y, std::intptr_t value) override; void Paint() override; void Slot35(int argument) override; + UILapineUpgradeBox_IngredientInfoWnd* FindSelected(); /* 00A8 */ unsigned char unknown_00A8[0x14]; /* 00BC */ std::vector items; diff --git a/Source/UI/UILapineUpgradeBoxWnd.cpp b/Source/UI/UILapineUpgradeBoxWnd.cpp index a5c767c..dedf0ad 100644 --- a/Source/UI/UILapineUpgradeBoxWnd.cpp +++ b/Source/UI/UILapineUpgradeBoxWnd.cpp @@ -141,8 +141,33 @@ void UILapineUpgradeBox_IngredientListWnd::Paint() { } // OFFSET: 0x006041A0 +// FUNCTION: fn_04214 +void UILapineUpgradeBox_IngredientListWnd::Slot35(int argument) { + if (this->wheelScroll == 1) { + if (argument < 0) { + this->SendMsg(this->scrollBar, 7, 15, 0, 0, 0); + } else { + this->SendMsg(this->scrollBar, 7, -15, 0, 0, 0); + } + } +} // OFFSET: 0x00605980 +// FUNCTION: fn_04223 +UILapineUpgradeBox_IngredientInfoWnd* UILapineUpgradeBox_IngredientListWnd::FindSelected() { + for (UILapineUpgradeBox_IngredientInfoWnd* entry : this->items) { + if (entry->selected == 1) { + return entry; + } + } + + return nullptr; +} + +// INLINED +inline UILapineUpgradeBox_IngredientInfoWnd* UILapineUpgradeBoxWnd::FindSelected() { + return this->ingredientList->FindSelected(); +} // OFFSET: 0x00603FE0 // FUNCTION: fn_04210