rodecomp/Source/UI/GameSettings/GameSettingsUI.cpp
ragnarok-clanker cc5abd95bf Decompile 3 functions in Source/UI/GameSettings/GameSettingsUI.cpp, Source/UI/GameSettings/GameSettingsUI.h
Batch #3130 by eAthena: 0 byte-identical, 3 confirmed by peer review.

- fn_15975 GameSettingsUI::CUIGroupSkin::Apply: logic confirmed by peer review
- fn_15982 GameSettingsUI::CUIListPage::Paint: logic confirmed by peer review
- fn_15984 GameSettingsUI::CUIPage::Paint: logic confirmed by peer review

Peer-reviewed-by: meitogi, superintelligence
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-29 21:29:50 +00:00

110 lines
2.6 KiB
C++

#include "UI/GameSettings/GameSettingsUI.h"
#include "Contents/Configuration/ServiceOptions.h"
#include "Contents/MessageTable.h"
#include "Contents/SkinMgr.h"
#include "Network/Connection/Connection.h"
#include "Network/Packets/PacketLengths.h"
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/WindowBorder.h"
#include <cstdint>
namespace {
struct RodexSpamOptionPacket {
/* 0000 */ std::int16_t id;
/* 0004 */ int option;
/* 0008 */ int value;
};
static_assert(sizeof(RodexSpamOptionPacket) == 12);
}
namespace GameSettingsUI {
// OFFSET: 0x00A40420
// FUNCTION: fn_15970
void CUIGroup::Apply() {
}
// OFFSET: 0x00A40430
// FUNCTION: fn_15971
void CUIGroupEmblem::Apply() {
g_serviceOptions.Set(0xF3, 0);
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0xDC8)), 0x64FFFF, 0, 0, 0);
}
// OFFSET: 0x00A40480
// FUNCTION: fn_15972
void CUIGroupLogInOut::Apply() {
g_serviceOptions.Set(0xA5, 1);
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0x414)), 0x64FFFF, 0, 0, 0);
}
// OFFSET: 0x00A404F0
// FUNCTION: fn_15974
void CUIGroupRodexSpam::Apply() {
RodexSpamOptionPacket packet;
packet.id = 0x0B93;
packet.option = 1;
packet.value = 1;
CRagConnection& connection = GetRagConnection();
connection.Send(g_packetLengths.FixedLength(packet.id), &packet);
}
// OFFSET: 0x00A40550
// FUNCTION: fn_15975
void CUIGroupSkin::Apply() {
g_skinInfo.Select(-1);
}
// OFFSET: 0x00A408D0
// FUNCTION: fn_15977
void CUIPage::Apply() {
for (UIWindow* child : this->m_children) {
static_cast<CUIGroup*>(child)->Apply();
}
}
// OFFSET: 0x00A40B90
// FUNCTION: fn_15979
void CUIGroupSound::Paint() {
this->ClearSurface(0xFFFF00FF);
}
// OFFSET: 0x00A40BA0
// FUNCTION: fn_15980
void CUIGroupSpriteDetailLevel::Paint() {
this->ClearSurface(0xFFFF00FF);
}
// OFFSET: 0x00A40BB0
// FUNCTION: fn_15981
void CUIGroupTextureDetailLevel::Paint() {
this->ClearSurface(0xFFFF00FF);
}
// OFFSET: 0x00A40BC0
// FUNCTION: fn_15982
void CUIListPage::Paint() {
this->ClearSurface(0xFFFF00FF);
DrawRectangleBorder(*this, 0, 0, this->geometry.width, this->geometry.height, 0xCECECE);
}
// OFFSET: 0x00A40BF0
// FUNCTION: fn_15983
void CUIOptionItem::Paint() {
this->ClearSurface(0xFFFF00FF);
}
// OFFSET: 0x00A40C00
// FUNCTION: fn_15984
void CUIPage::Paint() {
this->ClearSurface(0xFFFF00FF);
DrawRectangleBorder(*this, 0, 0, this->geometry.width, this->geometry.height, 0xCECECE);
}
// OFFSET: 0x00A40C30
// FUNCTION: fn_15985
void CUIComboItem::Slot16() {
}
}