From 9e4dd3fcaf2431ef5248e185bc4cd2ce0d1bd60b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 15:07:59 +0000 Subject: [PATCH] Decompile fn_12182 (UIMinimapZoomWnd::Slot15) Batch #12339 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review. - fn_12182 UIMinimapZoomWnd::Slot15: logic confirmed by peer review Peer-reviewed-by: Yommy, dori, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 9f219964..cbae73d5 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -727,6 +727,29 @@ void UIMinimapZoomWnd::Paint() { this->DrawTextAt(20, 128, text.c_str(), 0, 0, 12, 0xFFFFFF, 0, 0); } +// INLINED +static __forceinline UIBitmapButton* AddNumberedButtonInline(UIFrameWnd* frame, int id, int x, int y, const char* name, const char* tooltip, bool prefix) { + if (!name) { + return nullptr; + } + + UIBitmapButton* button = new UIBitmapButton(); + std::string path; + if (prefix) { + path += "유저인터페이스\\"; + } + path += name; + button->SetBitmap((path + "_1" + ".bmp").c_str(), 0, 0); + button->SetBitmap((path + "_2" + ".bmp").c_str(), 1, 0); + button->SetBitmap((path + "_3" + ".bmp").c_str(), 2, 0); + button->SetSize(button->BitmapWidth(), button->BitmapHeight()); + button->Move(x, y); + button->SetId(id); + button->SetTooltip(tooltip); + frame->AddChild(button); + return button; +} + // OFFSET: 0x008E3340 // FUNCTION: fn_12182 void UIMinimapZoomWnd::Slot15(int, int) { @@ -741,7 +764,7 @@ void UIMinimapZoomWnd::Slot15(int, int) { buttons.clear(); for (int i = 0; i < 5; ++i) { const std::string name = prefix + names[i]; - UIWindow* button = this->AddNumberedButton(ids[i], xs[i], ys[i], name.c_str(), tooltips[i], true); + UIWindow* button = AddNumberedButtonInline(this, ids[i], xs[i], ys[i], name.c_str(), tooltips[i], true); buttons.push_back(button); }