From 5dcd3c8ee0cc713bee5c12c40cfa6afc76a6b4bc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 2 Nov 2026 12:49:25 +0000 Subject: [PATCH] Decompile 4 functions in Source/UI/GameSettings/GameSettingsUI.cpp, Source/UI/GameSettings/GameSettingsUI.h Batch #9985 by ragnarok-clanker: 0 byte-identical, 4 confirmed by peer review. - fn_15341 CUIListBoxEx::CUIListBoxEx: logic confirmed by peer review - fn_15348 CUIListBoxEx::~CUIListBoxEx: logic confirmed by peer review - fn_15892 GameSettingsUI::CUIGroupGraphics::CUIGroupGraphics: logic confirmed by peer review - fn_15989 GameSettingsUI::CUIGroupGraphics::Slot16: logic confirmed by peer review Reviewed-by: ragnarok-clanker --- Source/UI/GameSettings/GameSettingsUI.cpp | 41 +++++++++++++++++++++++ Source/UI/GameSettings/GameSettingsUI.h | 1 + 2 files changed, 42 insertions(+) diff --git a/Source/UI/GameSettings/GameSettingsUI.cpp b/Source/UI/GameSettings/GameSettingsUI.cpp index 659e939f..9bb063ca 100644 --- a/Source/UI/GameSettings/GameSettingsUI.cpp +++ b/Source/UI/GameSettings/GameSettingsUI.cpp @@ -99,6 +99,8 @@ std::map g_optionHotkeys; // GLOBAL: gl_25229 bool g_restartClient; +RenderAdapter sub_56A0F0(); + // OFFSET: 0x00A3D0A0 // FUNCTION: fn_15905 RenderAdapter::RenderAdapter() : backend(0), ordinal(0), drawGuid{}, renderGuid{}, deviceGuid{} { @@ -2097,6 +2099,24 @@ void GameSettingsUI::CUIGroupFullscreen::Slot16() { this->m_offText->SetText(offText, std::strlen(offText)); } +// OFFSET: 0x00A41260 +// FUNCTION: fn_15989 +void GameSettingsUI::CUIGroupGraphics::Slot16() { + const char* title = LookupMessage(0xc6d); + this->m_title->SetText(title, std::strlen(title)); + const char* modeText = LookupMessage(0xc6e); + this->m_modeText->SetText(modeText, std::strlen(modeText)); + GetRenderSystemHolder(); + this->m_pendingAdapter = sub_56A0F0(); + this->m_adapter = this->m_pendingAdapter; + DisplayMode mode{}; + mode.width = g_configuredScreenWidth; + mode.height = g_configuredScreenHeight; + mode.bitsPerPixel = g_configuredBitsPerPixel; + this->m_pendingMode = std::move(mode); + this->m_mode = this->m_pendingMode; +} + // OFFSET: 0x00A41510 // FUNCTION: fn_15990 void GameSettingsUI::CUIGroupGraphicsAPI::Slot16() { @@ -2150,6 +2170,14 @@ void GameSettingsUI::CUIGroupTrilinear::Slot16() { this->m_offText->SetText(offText, std::strlen(offText)); } +// OFFSET: 0x00A193A0 +// FUNCTION: fn_15341 +template <> +CUIListBoxEx::CUIListBoxEx(UIWindowContext& context) + : CUIControl(context), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), + unknown_00E0(1), rebind(0) { +} + // OFFSET: 0x00A19560 // FUNCTION: fn_15342 template <> @@ -2317,6 +2345,13 @@ GameSettingsUI::CUIGroupEmblem::CUIGroupEmblem(UIWindowContext& context) : CUIGr GameSettingsUI::CUIGroupFullscreen::CUIGroupFullscreen(UIWindowContext& context) : CUIGroup(context), m_onButton(nullptr), m_onText(nullptr), m_offButton(nullptr), m_offText(nullptr) { } +// OFFSET: 0x00A3C7E0 +// FUNCTION: fn_15892 +GameSettingsUI::CUIGroupGraphics::CUIGroupGraphics(UIWindowContext& context) + : CUIGroup(context), m_adapterCombo(nullptr), m_modeText(nullptr), m_modeCombo(nullptr), + m_adapter(), m_pendingAdapter(), m_mode(), m_pendingMode() { +} + // OFFSET: 0x00A3C910 // FUNCTION: fn_15893 GameSettingsUI::CUIGroupGraphicsAPI::CUIGroupGraphicsAPI(UIWindowContext& context) : CUIGroup(context), m_combo(nullptr), m_backend(-1), m_pendingBackend(-1) { @@ -3662,6 +3697,12 @@ void CUIGameSettingsUI::ResetToDefaults() { } } +// OFFSET: 0x00A1A1C0 +// FUNCTION: fn_15348 +template <> +CUIListBoxEx::~CUIListBoxEx() { +} + // OFFSET: 0x00A1A320 // FUNCTION: fn_15349 template <> diff --git a/Source/UI/GameSettings/GameSettingsUI.h b/Source/UI/GameSettings/GameSettingsUI.h index a49b4e0b..224c4efc 100644 --- a/Source/UI/GameSettings/GameSettingsUI.h +++ b/Source/UI/GameSettings/GameSettingsUI.h @@ -104,6 +104,7 @@ class CUIGroupGraphics : public CUIGroup { public: __declspec(noinline) explicit CUIGroupGraphics(UIWindowContext& context); void Slot15(int width, int height) override; + void Slot16() override; void Refresh() override; int GetPendingBackend(); void LoadAdapters();