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).
This commit is contained in:
ragnarok-clanker 2026-10-30 05:12:59 +00:00
commit db4e6c1764
4 changed files with 50 additions and 0 deletions

View file

@ -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;
}

View file

@ -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)

View file

@ -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();
}

View file

@ -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: