From 2f0b52f2ee0da36e9dd87741b8e1f64a4f4d7ef8 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 23:03:53 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Acceptance/UIChooseSellBuyWnd.cpp, Source/UI/Items/UIItemIdentifyWnd.h, ... Batch #8953 by KWDev: 0 byte-identical, 2 confirmed by peer review. - fn_12177 UIItemCompositionWnd::Slot15: logic confirmed by peer review - fn_12407 UIItemCompositionWnd::Slot11: logic confirmed by peer review Peer-reviewed-by: youko, pedrao, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 145 ++++++++++++++++++++ Source/UI/Items/UIEquipWnd.h | 1 + Source/UI/Items/UIItemIdentifyWnd.h | 15 +- Source/UI/Lists/UIComboBoxWnd.h | 1 + Source/UI/Skill/UISkillDescribeWnd.h | 10 +- Source/UI/Skill/UISkillNameChangeWnd.h | 1 + Source/UI/Status/UIStatusWnd.h | 9 +- 7 files changed, 177 insertions(+), 5 deletions(-) diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 1577c098..ce3bb62c 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -33,6 +33,7 @@ #include "Resource/Sprites/SpriteResource.h" #include "UI/Acceptance/UIJoinPartyAcceptWnd.h" #include "UI/Buttons/UIBitmapButton.h" +#include "UI/Buttons/UIBmpTextButton.h" #include "UI/Buttons/UICheckBox.h" #include "UI/Buttons/UISpriteButton.h" #include "UI/Chat/UIChatRoomMakeWnd.h" @@ -1381,6 +1382,8 @@ void UIExchangeWnd::Slot10(int x, int y, std::intptr_t value) { g_windowMgr.window_01EC->SendMsg(nullptr, 13, 5, 0, 0, 0); } +// OFFSET: 0x008D0010 + // OFFSET: 0x008D02D0 // FUNCTION: fn_12084 void UInCashWnd::Slot10(int x, int y, std::intptr_t value) { @@ -2314,6 +2317,137 @@ void UICardItemIllustWnd::Slot15(int, int) { this->AddCloseButton(*this->m_controls, "", 0); } +// OFFSET: 0x008E2590 + +// OFFSET: 0x008E2540 +// FUNCTION: fn_12177 +void UIItemCompositionWnd::Slot15(int width, int height) { + this->UIItemIdentifyWnd::Slot15(width, height); + this->m_title = LookupMessage(522); + this->m_compositionState = 0; +} + +// OFFSET: 0x008DE490 + +// OFFSET: 0x008E85C0 +// FUNCTION: fn_12199 +void UISkillDescribeWnd::Slot15(int width, int height) { + this->unknown_00D4 = LookupMessage(526); + this->m_skillId = -1; + this->m_viewer = new UITextViewer(*this->m_context, *reinterpret_cast(nullptr)); + this->m_viewer->Configure(3, 3, width - 6, height - 6, 0); + unsigned red, green, blue; + SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); + const std::uint32_t color = 0xFF000000u | RGB(red, green, blue); + this->m_viewer->backgroundColor = color; + this->m_viewer->Invalidate(); + this->AddChild(this->m_viewer); + this->m_closeButton = this->AddCloseButton(*reinterpret_cast(nullptr), "ESC", 0); + + this->m_text = new UITextViewer(*this->m_context, *reinterpret_cast(nullptr)); + this->m_text->backgroundColor = color; + this->m_text->Invalidate(); + this->m_text->Configure(3, 3, width - 31, height - 6, 0); + this->AddChild(this->m_text); + + this->m_delayButton = new UIBitmapButton(*this->m_context, *reinterpret_cast(nullptr)); + this->m_delayButton->SetBitmap("유저인터페이스\\skilldelayinfo\\btn_sd_normal.bmp", 0, 0); + this->m_delayButton->SetBitmap("유저인터페이스\\skilldelayinfo\\btn_sd_over.bmp", 1, 0); + this->m_delayButton->SetBitmap("유저인터페이스\\skilldelayinfo\\btn_sd_pressed.bmp", 2, 0); + this->m_delayButton->SetSize(this->m_delayButton->BitmapWidth(), this->m_delayButton->BitmapHeight()); + this->m_delayButton->Move(this->geometry.width - this->m_delayButton->BitmapWidth() - 4, 18); + this->m_delayButton->SetId(343); + this->m_delayButton->SetTooltip(LookupMessage(4254)); + this->m_delayButton->Enable(0); + this->AddChild(this->m_delayButton); + this->AddCloseButton(*reinterpret_cast(nullptr), "", 0); +} + +// OFFSET: 0x008E8DC0 +// FUNCTION: fn_12201 +void UIStatusWnd::Slot15(int, int) { + this->AddBaseButton(*this->m_controls); + this->AddCloseButton(*this->m_controls, "Alt+A", 0); + this->AddMinimizeButton(*this->m_controls, "Ctrl+A", 0); + + { + const int ids[6] = {205, 206, 207, 208, 209, 210}; + const std::string arrow = "유저인터페이스\\basic_interface\\arw_right.bmp"; + for (int i = 0; i < 6; ++i) { + this->m_statButtons[i] = new UIBitmapButton(*this->m_context, *this->m_controls); + this->m_statButtons[i]->SetBitmap(arrow.c_str(), 0, 0); + this->m_statButtons[i]->SetBitmap(arrow.c_str(), 1, 0); + this->m_statButtons[i]->SetBitmap(arrow.c_str(), 2, 0); + this->m_statButtons[i]->SetSize(this->m_statButtons[0]->BitmapWidth(), this->m_statButtons[0]->BitmapHeight()); + this->m_statButtons[i]->Move(78, 24 + i * 16); + this->m_statButtons[i]->SetId(ids[i]); + this->AddChild(this->m_statButtons[i]); + } + } + + { + const int ids[6] = {551, 552, 553, 554, 555, 556}; + const std::string arrow = "유저인터페이스\\basic_interface\\arw_right.bmp"; + for (int i = 0; i < 6; ++i) { + this->m_extendedButtons[i] = new UIBitmapButton(*this->m_context, *this->m_controls); + this->m_extendedButtons[i]->SetBitmap(arrow.c_str(), 0, 0); + this->m_extendedButtons[i]->SetBitmap(arrow.c_str(), 1, 0); + this->m_extendedButtons[i]->SetBitmap(arrow.c_str(), 2, 0); + this->m_extendedButtons[i]->SetSize(this->m_extendedButtons[0]->BitmapWidth(), this->m_extendedButtons[0]->BitmapHeight()); + this->m_extendedButtons[i]->Move(78, 145 + i * 16); + this->m_extendedButtons[i]->SetId(ids[i]); + this->AddChild(this->m_extendedButtons[i]); + } + } + + this->m_expandButton = new UIBmpTextButton(*this->m_context, *this->m_controls); + this->m_expandButton->SetBitmap("유저인터페이스\\statuswnd\\expand_on_normal.bmp", 0, 0); + this->m_expandButton->SetBitmap("유저인터페이스\\statuswnd\\expand_on_normal.bmp", 1, 0); + this->m_expandButton->SetBitmap("유저인터페이스\\statuswnd\\expand_on_press.bmp", 2, 0); + this->m_expandButton->AddTextStyle(0, 12, 0, 0, 1, 16, 3); + this->m_expandButton->AddTextStyle(1, 12, 0, 0, 1, 16, 3); + this->m_expandButton->AddTextStyle(2, 12, 0, 0, 1, 16, 3); + this->m_expandButton->SetSize(this->m_expandButton->BitmapWidth(), this->m_expandButton->BitmapHeight()); + { + const std::string label = LookupMessage(3613); + this->m_expandButton->text = label; + this->m_expandButton->Invalidate(); + } + this->m_expandButton->Move(2, 121); + this->m_expandButton->SetId(550); + this->AddChild(this->m_expandButton); + this->m_expandedHeight = this->geometry.height; +} + +// OFFSET: 0x008E8860 +// FUNCTION: fn_12200 +void UISkillNameChangeWnd::Slot15(int, int) { + this->m_edit = new UIEditCtrl(*this->m_context, *reinterpret_cast(nullptr)); + this->m_edit->SetSize(this->geometry.width - 77, 16); + this->m_edit->Move(15, 22); + this->m_edit->maximum = 29; + this->m_edit->Background(232, 232, 232); + this->m_edit->SetText(""); + this->AddChild(this->m_edit); + InputFocus focus{g_windowMgr.hoverWindow}; + focus.Set(this->m_edit); + this->m_edit->SelectAll(); + + const std::string prefix("유저인터페이스\\"); + const int x = this->geometry.width - 55; + const int y = this->geometry.height - 32; + auto* button = new UIBitmapButton(*this->m_context, *this->m_controls); + button->SetBitmap((prefix + "btn_ok" + ".bmp").c_str(), 0, 0); + button->SetBitmap((prefix + "btn_ok_a" + ".bmp").c_str(), 1, 0); + button->SetBitmap((prefix + "btn_ok_b" + ".bmp").c_str(), 2, 0); + button->SetSize(button->BitmapWidth(), button->BitmapHeight()); + button->Move(x, y); + button->SetId(184); + this->AddChild(button); + this->m_skillId = -1; + this->m_message0 = 184; +} + // OFFSET: 0x008E3C80 // FUNCTION: fn_12183 void UIMonsterDisplayWnd::Slot15(int, int) { @@ -2740,6 +2874,17 @@ void UIItemCollectionWnd::Slot11() { } } +// OFFSET: 0x00909F40 +// FUNCTION: fn_12407 +void UIItemCompositionWnd::Slot11() { + if (this->m_compositionPlacement) { + this->m_compositionPlacement->width = this->geometry.width; + this->m_compositionPlacement->height = this->geometry.height; + this->m_compositionPlacement->x = this->geometry.x; + this->m_compositionPlacement->y = this->geometry.y; + } +} + // OFFSET: 0x00909F80 // FUNCTION: fn_12408 void UIItemIdentifyWnd::Slot11() { diff --git a/Source/UI/Items/UIEquipWnd.h b/Source/UI/Items/UIEquipWnd.h index 3654523e..d19b7b75 100644 --- a/Source/UI/Items/UIEquipWnd.h +++ b/Source/UI/Items/UIEquipWnd.h @@ -11,6 +11,7 @@ class UIEquipWnd : public UIFrameWnd { public: bool Slot03() override; void Move(int x, int y) override; + void Slot10(int x, int y, std::intptr_t value) override; void Slot11() override; /* 00B4 */ int m_viewOther; /* 00B8 */ int m_highlight[3]; diff --git a/Source/UI/Items/UIItemIdentifyWnd.h b/Source/UI/Items/UIItemIdentifyWnd.h index 757a91e7..3922c926 100644 --- a/Source/UI/Items/UIItemIdentifyWnd.h +++ b/Source/UI/Items/UIItemIdentifyWnd.h @@ -4,6 +4,9 @@ #include "Contents/Items/ItemInfo.h" #include "UI/Window/UIFrameWnd.h" +#include +#include + struct WindowPlacement; class UIItemIdentifyWnd : public UIFrameWnd { @@ -15,10 +18,11 @@ public: /* 00C4 */ int m_rows; /* 00C8 */ int m_scrollable; /* 00CC */ std::list m_items; - /* 00D4 */ unsigned char unknown_00D4[0x18]; + /* 00D4 */ std::string m_title; /* 00EC */ WindowPlacement* m_placement; void Slot11() override; + void Slot15(int width, int height) override; void UpdateScroll(); void Slot25(int x, int y) override; void Slot26(int x, int y) override; @@ -28,4 +32,13 @@ public: ITEM_INFO GetSelectedItem(int* found); }; +class UIItemCompositionWnd : public UIItemIdentifyWnd { +public: + void Slot11() override; + void Slot15(int width, int height) override; + + /* 00F0 */ WindowPlacement* m_compositionPlacement; + /* 00F4 */ int m_compositionState; +}; + #endif diff --git a/Source/UI/Lists/UIComboBoxWnd.h b/Source/UI/Lists/UIComboBoxWnd.h index 76591270..d443f9cc 100644 --- a/Source/UI/Lists/UIComboBoxWnd.h +++ b/Source/UI/Lists/UIComboBoxWnd.h @@ -13,6 +13,7 @@ public: /* 00B8 */ UIWindow* m_owner; void Resize(int width, int height) override; + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; diff --git a/Source/UI/Skill/UISkillDescribeWnd.h b/Source/UI/Skill/UISkillDescribeWnd.h index e9aa0f06..4d1a665b 100644 --- a/Source/UI/Skill/UISkillDescribeWnd.h +++ b/Source/UI/Skill/UISkillDescribeWnd.h @@ -5,17 +5,23 @@ #include +class UIBitmapButton; +class UITextViewer; + class UISkillDescribeWnd : public UIFrameWnd { public: UISkillDescribeWnd(UIWindowContext& windows, UIFrameContext& frames); - /* 00B4 */ unsigned char unknown_00B4[0x8]; + /* 00B4 */ UIBitmapButton* m_closeButton; + /* 00B8 */ UITextViewer* m_viewer; /* 00BC */ std::string unknown_00BC; /* 00D4 */ std::string unknown_00D4; /* 00EC */ std::string unknown_00EC; /* 0104 */ int m_skillId; - /* 0108 */ UIWindow* m_text; + /* 0108 */ UITextViewer* m_text; + /* 010C */ UIBitmapButton* m_delayButton; + void Slot15(int width, int height) override; void Paint() override; bool Slot42(void* output) override; void Slot43() override; diff --git a/Source/UI/Skill/UISkillNameChangeWnd.h b/Source/UI/Skill/UISkillNameChangeWnd.h index 0dc6df7b..7bfdb87f 100644 --- a/Source/UI/Skill/UISkillNameChangeWnd.h +++ b/Source/UI/Skill/UISkillNameChangeWnd.h @@ -15,6 +15,7 @@ public: /* 00B8 */ int m_skillId; /* 00BC */ std::string m_name; + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; diff --git a/Source/UI/Status/UIStatusWnd.h b/Source/UI/Status/UIStatusWnd.h index 4c3afbee..587817dc 100644 --- a/Source/UI/Status/UIStatusWnd.h +++ b/Source/UI/Status/UIStatusWnd.h @@ -6,20 +6,25 @@ struct UIButtonContext; struct StatusWndInfo; +class UIBitmapButton; +class UIBmpTextButton; + class UIStatusWnd : public UIFrameWnd { public: UIStatusWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls); - /* 00B4 */ unsigned char unknown_00B4[0x18]; + /* 00B4 */ UIBitmapButton* m_statButtons[6]; /* 00CC */ int m_expandedHeight; /* 00D0 */ StatusWndInfo* m_info; /* 00D4 */ int m_titleHeight; /* 00D8 */ int m_offsetY; /* 00DC */ int m_offsetX; - /* 00E0 */ unsigned char unknown_00E0[0x1C]; + /* 00E0 */ UIBitmapButton* m_extendedButtons[6]; + /* 00F8 */ UIBmpTextButton* m_expandButton; /* 00FC */ unsigned char m_extended; bool Slot03() override; void Slot11() override; + void Slot15(int width, int height) override; void Slot25(int x, int y) override; void Slot26(int x, int y) override; void Slot28(int x, int y) override;