Decompile fn_03889 (UIChangeMaterialWnd_List::Slot35)

Batch #5147 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review.

- fn_03889 UIChangeMaterialWnd_List::Slot35: logic confirmed by peer review

Peer-reviewed-by: Yommy, youko
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 08:53:23 +00:00
commit da7e83e11e
2 changed files with 15 additions and 3 deletions

View file

@ -64,9 +64,13 @@ void UIChangeMaterialWnd_List::Slot27(int x, int y) {
// OFFSET: 0x005E2A30
// FUNCTION: fn_03889
void UIChangeMaterialWnd_List::Slot35(int argument) {
this->SendMsg(reinterpret_cast<UIWindow*>(this->unknown_00D8), argument < 0 ? 10 : 9, 0, 0, 0, 0);
this->SendMsg(this->m_scrollBar, argument < 0 ? 10 : 9, 0, 0, 0, 0);
}
// OFFSET: 0x005E2A70
// OFFSET: 0x005E3B80
// OFFSET: 0x005E44C0
// FUNCTION: fn_03898
void UIChangeMaterialWnd_List::ShiftSelectedIndex(int value) {

View file

@ -2,6 +2,7 @@
#define RAGNAROK_SOURCE_UI_UICHANGEMATERIALWND_H
#include "Contents/Items/ItemInfo.h"
#include "UI/Lists/UIScrollBar.h"
#include "UI/Window/UIFrameWnd.h"
#include <cstdint>
@ -12,6 +13,10 @@ struct MaterialSlotPos {
/* 0004 */ int y;
};
struct MaterialListEntry {
/* 0000 */ unsigned char unknown_0000[0x1C];
};
class UIChangeMaterialWnd : public UIFrameWnd {
public:
bool Slot02() override;
@ -43,9 +48,10 @@ public:
/* 00CC */ int unknown_00CC;
/* 00D0 */ int m_scrollOffset;
/* 00D4 */ int m_previousScrollOffset;
/* 00D8 */ int unknown_00D8;
/* 00D8 */ UIScrollBar* m_scrollBar;
/* 00DC */ std::vector<int> m_items;
/* 00E8 */ unsigned char unknown_00E8[0x10];
/* 00E8 */ std::vector<MaterialListEntry> m_entries;
/* 00F4 */ std::uint32_t unknown_00F4;
};
#if defined(_WIN32) && !defined(_WIN64)
@ -59,6 +65,8 @@ static_assert(offsetof(UIChangeMaterialWnd_List, m_selectedIndex) == 0xC0);
static_assert(offsetof(UIChangeMaterialWnd_List, m_scrollOffset) == 0xD0);
static_assert(offsetof(UIChangeMaterialWnd_List, m_previousScrollOffset) == 0xD4);
static_assert(offsetof(UIChangeMaterialWnd_List, m_items) == 0xDC);
static_assert(offsetof(UIChangeMaterialWnd_List, m_entries) == 0xE8);
static_assert(sizeof(MaterialListEntry) == 0x1C);
#endif
#endif