From a53f42ebe2cccf750eb4c11411d63ae8aab127e4 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 12:56:04 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Chat/UISubChatHisWnd.cpp, Source/UI/Chat/UISubChatHisWnd.h, ... Batch #5517 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_12633 UISubChatHisWnd::Move: logic confirmed by peer review - fn_12638 UIEscOptionWnd::Slot15: logic confirmed by peer review Peer-reviewed-by: willerthal, Snow Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Chat/UISubChatHisWnd.cpp | 14 ++++++++++++++ Source/UI/Chat/UISubChatHisWnd.h | 1 + Source/UI/Window/UIEscOptionWnd.cpp | 23 +++++++++++++++++++++++ Source/UI/Window/UIEscOptionWnd.h | 1 + 4 files changed, 39 insertions(+) diff --git a/Source/UI/Chat/UISubChatHisWnd.cpp b/Source/UI/Chat/UISubChatHisWnd.cpp index f00785a8..dea9a6dd 100644 --- a/Source/UI/Chat/UISubChatHisWnd.cpp +++ b/Source/UI/Chat/UISubChatHisWnd.cpp @@ -1,5 +1,6 @@ #include "UI/Chat/UISubChatHisWnd.h" #include "Contents/UserData/NormalItemSlots.h" +#include "Client/Session.h" #include "UI/Chat/UINewChatWnd.h" #include "UI/Edit/UIEditCtrl.h" @@ -56,6 +57,19 @@ void UISubChatHisWnd::Slot31(int x, int y) { } } +// OFFSET: 0x0091EA90 +// FUNCTION: fn_12633 +void UISubChatHisWnd::Move(int x, int y) { + this->UIFrameWnd::Move(x, y); + int screenX = 0; + int screenY = 0; + this->ToScreen(screenX, screenY); + this->m_state.unknown_0000 = screenX; + this->m_state.unknown_0004 = screenY + this->m_inputHeight; + g_session.m_subChatWnds[this->m_index].x = screenX; + g_session.m_subChatWnds[this->m_index].y = screenY; +} + // OFFSET: 0x0091C9E0 // FUNCTION: fn_12619 bool UISubChatHisWnd::Slot42(void* output) { diff --git a/Source/UI/Chat/UISubChatHisWnd.h b/Source/UI/Chat/UISubChatHisWnd.h index e3125ae7..cd93bbc6 100644 --- a/Source/UI/Chat/UISubChatHisWnd.h +++ b/Source/UI/Chat/UISubChatHisWnd.h @@ -21,6 +21,7 @@ struct SubChatHistoryState { class UISubChatHisWnd : public UIFrameWnd { public: + void Move(int x, int y) override; void Slot11() override; void Slot25(int x, int y) override; void Slot26(int x, int y) override; diff --git a/Source/UI/Window/UIEscOptionWnd.cpp b/Source/UI/Window/UIEscOptionWnd.cpp index 1b2be606..43a74355 100644 --- a/Source/UI/Window/UIEscOptionWnd.cpp +++ b/Source/UI/Window/UIEscOptionWnd.cpp @@ -3,11 +3,34 @@ #include "Client/Session.h" #include "Contents/MessageTable.h" #include "File/ShortcutFilename.h" +#include "UI/Buttons/UIBitmapButton.h" #include "UI/Buttons/UIButton.h" #include "Utility/Text/FormatString.h" #include +// OFFSET: 0x0091F4F0 +// FUNCTION: fn_12638 +void UIEscOptionWnd::Slot15(int, int) { + const std::string prefix("유저인터페이스\\"); + int ids[7] = {371, 458, 370, 251, 185, 353, 372}; + const char* names[7] = {"esc_01", "esc_001", "esc_08", "esc_09", "esc_02", "esc_05", "esc_10"}; + + for (int i = 0; i < 7; ++i) { + UIBitmapButton* button = new UIBitmapButton(*this->m_context, *this->m_controls); + this->m_buttons[i] = button; + button->SetBitmap((prefix + names[i] + "a.bmp").c_str(), 0, 0); + button->SetBitmap((prefix + names[i] + "b.bmp").c_str(), 1, 0); + button->SetBitmap((prefix + names[i] + "c.bmp").c_str(), 2, 0); + this->m_buttons[i]->SetSize(button->BitmapWidth(), button->BitmapHeight()); + this->m_buttons[i]->Move(-100, -100); + this->m_buttons[i]->SetId(ids[i]); + this->AddChild(this->m_buttons[i]); + } + + this->LayoutButtons(); +} + // OFFSET: 0x0092BDE0 // FUNCTION: fn_12662 void UIEscOptionWnd::Paint() { diff --git a/Source/UI/Window/UIEscOptionWnd.h b/Source/UI/Window/UIEscOptionWnd.h index 68861bca..5f14f72e 100644 --- a/Source/UI/Window/UIEscOptionWnd.h +++ b/Source/UI/Window/UIEscOptionWnd.h @@ -9,6 +9,7 @@ struct UIButtonContext; class UIEscOptionWnd : public UIFrameWnd { public: void Paint() override; + void Slot15(int width, int height) override; void LayoutButtons(); /* 00B4 */ UIButton* m_buttons[7];