From f280ee4e1c1bb623700afdffdafa76fb3cbc0200 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 03:42:33 +0000 Subject: [PATCH] Decompile fn_13611 (UIMakeTargetProcessWnd::Paint) Batch #9189 by KWDev: 0 byte-identical, 1 confirmed by peer review. - fn_13611 UIMakeTargetProcessWnd::Paint: logic confirmed by peer review Peer-reviewed-by: youko, vinnyamancio, Bielhp Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Items/UIMakeTargetProcessWnd.cpp | 54 ++++++++++++++++++++++ Source/UI/Items/UIMakeTargetProcessWnd.h | 1 + 2 files changed, 55 insertions(+) diff --git a/Source/UI/Items/UIMakeTargetProcessWnd.cpp b/Source/UI/Items/UIMakeTargetProcessWnd.cpp index f18af746..f02184df 100644 --- a/Source/UI/Items/UIMakeTargetProcessWnd.cpp +++ b/Source/UI/Items/UIMakeTargetProcessWnd.cpp @@ -5,6 +5,13 @@ #include "Client/ReplayPacketRecorder.h" #include "Client/Replay.h" #include "Client/Session.h" +#include "Contents/Items/ItemDescription.h" +#include "Contents/MessageTable.h" +#include "Resource/Bitmap/BitmapResource.h" +#include "Resource/ResourceMgr.h" +#include "Resource/TextureNames.h" +#include "UI/Buttons/UIButton.h" +#include "UI/Shop/ItemDrawing.h" #include "UI/Window/UIWindowMgr.h" #include "UI/Window/WindowManagerWindows.h" @@ -109,6 +116,53 @@ ITEM_INFO UIMakeTargetProcessWnd::GetItemAt(int x, int y) { return ITEM_INFO(0); } +// OFFSET: 0x009A38E0 +// FUNCTION: fn_13611 +void UIMakeTargetProcessWnd::Paint() { + UIButtonContext& controls = *this->m_controls; + const int titleHeight = this->DrawTitleBar(controls.fonts, controls.locale, false, "", 0); + this->DrawPanelBackground(titleHeight, 0, ""); + this->DrawButtonBar(2, 0, 1); + + switch (this->makeType) { + case 994: + case 995: + case 996: + case 997: + case 998: + case 999: + case 1000: + break; + default: { + ItemDescriptions descriptions{g_itemDescriptions}; + const ITEM_INFO* material = this->materials; + for (int x = 8; x < 104; x += 32, ++material) { + auto* bar = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\btnbar_right2.bmp"))); + DrawItemSlotBackground(*this, x - 4, this->geometry.height - bar->image.height - 32); + if (material->unknown_0000[1] != 0) { + DrawItemIcon(*this, controls.resources, descriptions, x, this->geometry.height - bar->image.height - 28, *material, 0); + } + } + break; + } + } + + ITEM_INFO item; + item.SetItemId(this->makeType); + item.unknown_0060 = 0; + item.identified = 1; + const int nameWidth = this->DrawFittedItemName(16, 2, &item, 0, 0, 12, 0); + this->DrawShadowedText(nameWidth + 16, 2, LookupMessage(426), 0, 0, 0xFFFFFF, 0, 12, 0); + const int requiredWidth = this->DrawFittedItemName(16, 22, &item, 0, 0, 12, 0); + this->DrawShadowedText(requiredWidth + 16, 22, LookupMessage(427), 0, 0, 0xFFFFFF, 0, 12, 0); + + const std::vector& lines = FindMetalProcessItems(this->makeType); + int y = 42; + for (unsigned int index = 0; index < lines.size(); ++index, y += 20) { + this->DrawTextAt(controls.fonts, controls.locale, 16, y, lines[index], 0, 0, 12, 0, 0, 0); + } +} + // OFFSET: 0x009A3D10 // FUNCTION: fn_13614 void UIMakeTargetProcessWnd::Slot25(int x, int y) { diff --git a/Source/UI/Items/UIMakeTargetProcessWnd.h b/Source/UI/Items/UIMakeTargetProcessWnd.h index c281027e..5560620b 100644 --- a/Source/UI/Items/UIMakeTargetProcessWnd.h +++ b/Source/UI/Items/UIMakeTargetProcessWnd.h @@ -12,6 +12,7 @@ struct WindowResponseRecorder; class UIMakeTargetProcessWnd : public UIFrameWnd { public: UIMakeTargetProcessWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls, WindowResponseRecorder& recorder); + void Paint() override; void Slot10(int x, int y, std::intptr_t value) override; void Slot15(int width, int height) override; void Slot25(int x, int y) override;