Decompile fn_11041 (UIDescriptRace::UIDescriptRace)

Batch #5130 by meitogi: 0 byte-identical, 1 confirmed by peer review.

- fn_11041 UIDescriptRace::UIDescriptRace: logic confirmed by peer review

Peer-reviewed-by: Yommy, alisonrag, youko
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
Adds to the build: Source/UI/Buttons/UIDescriptRace.cpp
This commit is contained in:
ragnarok-clanker 2026-10-30 08:50:16 +00:00
commit 2d16bc8d36
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,11 @@
#include "UI/Buttons/UIDescriptRace.h"
#include <windows.h>
#include <mmsystem.h>
// OFFSET: 0x0086D060
// FUNCTION: fn_11041
UIDescriptRace::UIDescriptRace(int race) : m_race(race), unknown_0284(0) {
this->m_createTime = timeGetTime();
this->m_noRace = race == 0;
}

View file

@ -0,0 +1,38 @@
#ifndef RAGNAROK_SOURCE_UI_BUTTONS_UIDESCRIPTRACE_H
#define RAGNAROK_SOURCE_UI_BUTTONS_UIDESCRIPTRACE_H
#include "UI/Buttons/UIBitmapButton.h"
#include <cstdint>
#include <string>
struct UIDescriptRaceText {
/* 0000 */ int unknown_0000;
/* 0004 */ int unknown_0004;
/* 0008 */ std::string names[5];
/* 0080 */ std::string descriptions[5];
/* 00F8 */ std::string title;
/* 0110 */ int unknown_0110;
/* 0114 */ int unknown_0114;
/* 0118 */ std::string unknown_0118;
/* 0130 */ std::string unknown_0130;
};
// VTABLE: vt_00998
class UIDescriptRace : public UIBitmapButton {
public:
explicit UIDescriptRace(int race);
/* 0120 */ int m_race;
/* 0124 */ UIDescriptRaceText m_text;
/* 026C */ unsigned char unknown_026C[0x14];
/* 0280 */ unsigned char m_noRace;
/* 0284 */ int unknown_0284;
/* 0288 */ std::uint32_t m_createTime;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(UIDescriptRaceText) == 0x148);
#endif
#endif

View file

@ -799,6 +799,7 @@
"Source/UI/Buttons/UIButton.cpp": 2,
"Source/UI/Buttons/UICheckBox.cpp": 2,
"Source/UI/Buttons/UIColorButton.cpp": 2,
"Source/UI/Buttons/UIDescriptRace.cpp": 2,
"Source/UI/Buttons/UIJobSlotButton.cpp": 2,
"Source/UI/Buttons/UINaviLinkButton.cpp": 2,
"Source/UI/Buttons/UINoneVisibleButton.cpp": 2,