From 377623e86d22cd1b93e334b2d21c5c618bc0700e Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 19:11:08 +0000 Subject: [PATCH] Decompile fn_17166 (UIWindowMgr::GetMiniPartyUsableArea) Batch #1585 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_17166 UIWindowMgr::GetMiniPartyUsableArea: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/UI/MiniPartyUsableArea.cpp --- Source/UI/MiniPartyUsableArea.cpp | 18 ++++++++++++++++++ Source/UI/Window/UIWindowMgr.h | 1 + data/compile.json | 1 + 3 files changed, 20 insertions(+) create mode 100644 Source/UI/MiniPartyUsableArea.cpp diff --git a/Source/UI/MiniPartyUsableArea.cpp b/Source/UI/MiniPartyUsableArea.cpp new file mode 100644 index 0000000..82d9552 --- /dev/null +++ b/Source/UI/MiniPartyUsableArea.cpp @@ -0,0 +1,18 @@ +#include "UI/MiniPartyGrid.h" +#include "UI/Window/UIWindow.h" +#include "UI/Window/UIWindowMgr.h" + +// OFFSET: 0x00A918B0 +// FUNCTION: fn_17166 +void UIWindowMgr::GetMiniPartyUsableArea(RECT* area) { + const int height = this->unknown_0480; + int top = static_cast(height * 0.3f); + if (UIWindow* window = g_windowMgr.LookupWindow(307)) { + top = window->geometry.height; + } + + area->right = this->unknown_047C; + area->top = top; + area->left = 0; + area->bottom = height - g_miniPartyCellHeight * 3; +} diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index e73ce1e..57274e6 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -422,6 +422,7 @@ public: void Shutdown(); void SetScreenSize(int width, int height); UIWindow* LookupWindow(int id); + void GetMiniPartyUsableArea(RECT* area); void Schedule(UIWindow* window); void Destroy(UIWindow* window); void ForgetWindowReferences(UIWindow* removed); diff --git a/data/compile.json b/data/compile.json index de54914..d86737a 100644 --- a/data/compile.json +++ b/data/compile.json @@ -600,6 +600,7 @@ "Source/UI/MiniPartyGrid.cpp": 2, "Source/UI/MiniPartyManager.cpp": 2, "Source/UI/MiniPartyPlacement.cpp": 2, + "Source/UI/MiniPartyUsableArea.cpp": 2, "Source/UI/Party/UIAdvenPartyBoardWnd.cpp": 2, "Source/UI/Party/UIApplyForPartyWnd.cpp": 2, "Source/UI/Party/UIPartyInfoWnd.cpp": 2,