From db4e6c1764ac3cb42ae0c0b0b7c8e7a6cf0160e2 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 05:12:59 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Window/UISeekPartyListWnd.cpp, Source/UI/Window/UISeekPartyListWnd.h, ... Batch #4798 by youko: 0 byte-identical, 2 confirmed by peer review. - fn_12729 UISeekPartyListWnd::UpdateScrollBar: logic confirmed by peer review - fn_12725 UIRoMapWnd::Slot33: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag, Bruwuno Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UIRoMapWnd.cpp | 12 +++++++++ Source/UI/Window/UIRoMapWnd.h | 3 +++ Source/UI/Window/UISeekPartyListWnd.cpp | 34 +++++++++++++++++++++++++ Source/UI/Window/UISeekPartyListWnd.h | 1 + 4 files changed, 50 insertions(+) diff --git a/Source/UI/Window/UIRoMapWnd.cpp b/Source/UI/Window/UIRoMapWnd.cpp index 5fd76208..a09c6ea6 100644 --- a/Source/UI/Window/UIRoMapWnd.cpp +++ b/Source/UI/Window/UIRoMapWnd.cpp @@ -1,6 +1,8 @@ #include "UI/Window/UIRoMapWnd.h" #include "Contents/MapSkyMgr.h" +#include "UI/Window/UIWindowMgr.h" +#include "UI/Window/WindowManagerWindows.h" // OFFSET: 0x00931080 // FUNCTION: fn_12697 @@ -34,3 +36,13 @@ void UIRoMapWnd::ClearRecords() { this->unknown_00BC = 0; this->unknown_00CC = 0; } + +// OFFSET: 0x009335B0 +// FUNCTION: fn_12725 +void UIRoMapWnd::Slot33(int, int) { + if (g_windowMgr.unknown_0214 != 0) { + this->m_frameContext->windows.CloseWindow(26); + } + + this->unknown_0208 = 0; +} diff --git a/Source/UI/Window/UIRoMapWnd.h b/Source/UI/Window/UIRoMapWnd.h index fbb5422f..bfe17f8b 100644 --- a/Source/UI/Window/UIRoMapWnd.h +++ b/Source/UI/Window/UIRoMapWnd.h @@ -21,6 +21,7 @@ void SetRoMapMarker(std::string name, const WorldViewArea& area, RoMapMarker& ma class UIRoMapWnd : public UIFrameWnd { public: void Slot25(int x, int y) override; + void Slot33(int x, int y) override; void ClearRecords(); private: @@ -31,6 +32,8 @@ private: /* 00C8 */ int unknown_00C8; /* 00CC */ unsigned char unknown_00CC; /* 00D0 */ int unknown_00D0; + /* 00D4 */ unsigned char unknown_00D4[0x134]; + /* 0208 */ int unknown_0208; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Window/UISeekPartyListWnd.cpp b/Source/UI/Window/UISeekPartyListWnd.cpp index 13832817..840ceaec 100644 --- a/Source/UI/Window/UISeekPartyListWnd.cpp +++ b/Source/UI/Window/UISeekPartyListWnd.cpp @@ -118,3 +118,37 @@ void UISeekPartyListWnd::Slot25(int x, int y) { this->Invalidate(); } } + +// OFFSET: 0x00933740 +// FUNCTION: fn_12729 +void UISeekPartyListWnd::UpdateScrollBar() { + if (!this->m_scrollBar) { + return; + } + + const int count = g_friendRows.size(); + const int rows = count / this->m_columnCount + (count % this->m_columnCount != 0 ? 1 : 0); + + const int visible = this->m_visibleRows; + int range = rows - visible; + if (range < 0) { + range = 0; + } + + this->m_scrollable = range != 0; + if (range != 0) { + this->m_scrollBar->SetRange(range, visible, rows); + if (this->m_firstRow < 0) { + this->m_firstRow = 0; + } + if (this->m_firstRow > rows - this->m_visibleRows) { + this->m_firstRow = rows - this->m_visibleRows; + } + this->m_scrollBar->SetPosition(this->m_firstRow); + } else { + this->m_firstRow = 0; + this->m_scrollBar->SetRange(0, visible, rows); + } + + this->m_scrollBar->Invalidate(); +} diff --git a/Source/UI/Window/UISeekPartyListWnd.h b/Source/UI/Window/UISeekPartyListWnd.h index ec00a7f4..8cb5d925 100644 --- a/Source/UI/Window/UISeekPartyListWnd.h +++ b/Source/UI/Window/UISeekPartyListWnd.h @@ -15,6 +15,7 @@ public: void Slot26(int x, int y) override; void Slot35(int delta) override; void NotifyNewAd(); + void UpdateScrollBar(); bool MatchesFilter(PARTY_BOOKING_AD_INFO info); protected: