rodecomp/Source/UI/GameSettings/GameSettingsUI.cpp
ragnarok-clanker d28f098f75 Decompile 5 functions in Source/UI/GameSettings/GameSettingsUI.cpp, Source/UI/GameSettings/GameSettingsUI.h
Batch #3568 by eAthena: 3 byte-identical, 2 confirmed by peer review.

- fn_15999 GameSettingsUI::CUIListPage::Slot16: byte-identical
- fn_16000 GameSettingsUI::CUIOptionItem::Slot16: byte-identical
- fn_16001 GameSettingsUI::CUIPage::Slot16: logic confirmed by peer review
- fn_16002 CUIGameSettingsUI::Slot25: logic confirmed by peer review
- fn_16045 GameSettingsUI::CUIPage::Refresh: byte-identical

Peer-reviewed-by: Yommy, alisonrag, Lumen
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-29 22:48:18 +00:00

146 lines
3.3 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() {
}
// OFFSET: 0x00A41D80
// FUNCTION: fn_15999
void CUIListPage::Slot16() {
}
// OFFSET: 0x00A41D90
// FUNCTION: fn_16000
void CUIOptionItem::Slot16() {
}
// OFFSET: 0x00A41DA0
// FUNCTION: fn_16001
void CUIPage::Slot16() {
int y = 0;
for (UIWindow* child : this->m_children) {
child->Move(child->geometry.x, y);
y += child->geometry.height;
}
}
// OFFSET: 0x00A43B70
// FUNCTION: fn_16045
void CUIPage::Refresh() {
for (UIWindow* child : this->m_children) {
static_cast<CUIGroup*>(child)->Refresh();
}
}
}
// OFFSET: 0x00A41DE0
// FUNCTION: fn_16002
void CUIGameSettingsUI::Slot25(int x, int y) {
if (this->m_titleBar->IsPointInside(x, y)) {
this->UIFrameWnd::Slot25(x, y);
}
}