Decompile 2 functions in Source/UI/UIItemReformWnd.cpp, Source/UI/UIItemReformWnd.h

Batch #5857 by Yommy: 0 byte-identical, 2 confirmed by peer review.

- fn_04123 UIItemReformWnd::Slot19: logic confirmed by peer review
- fn_04124 UIItemReformWnd_Item::Slot32: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, KWDev, SapitoSucio
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-30 16:40:41 +00:00
commit c8b37ea308
2 changed files with 72 additions and 0 deletions

View file

@ -1,16 +1,34 @@
#include "UI/UIItemReformWnd.h"
#include "Client/Input/InputCharset.h"
#include "Client/Input/Mouse.h"
#include "Client/Mode/ModeMgr.h"
#include "Client/Mode/ModeTooltip.h"
#include "Client/Session.h"
#include "Contents/Configuration/ServiceConfiguration.h"
#include "Contents/Items/ItemDescription.h"
#include "Contents/Items/ItemNaming.h"
#include "Contents/Items/ItemReformMgr.h"
#include "Contents/Items/SelectPackageItemMgr.h"
#include "Contents/MessageTable.h"
#include "Contents/PlayerNameDictionary.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/TextureNames.h"
#include "UI/Buttons/UIBasicButton.h"
#include "UI/Shop/ItemDrawing.h"
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/WindowBorder.h"
#include "UI/Window/WindowManagerWindows.h"
#include "UI/Window/WindowOrdering.h"
#include "Utility/Text/FormatString.h"
#include <algorithm>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <map>
#include <new>
#include <string>
// OFFSET: 0x005FCD10
@ -30,6 +48,8 @@ void UIItemReformWnd_List::Slot15(int width, int height) {
this->UpdateScrollBar();
}
// OFFSET: 0x005FD270
// OFFSET: 0x005FD600
// FUNCTION: fn_04111
void UIItemReformWnd_DetailBtn::Paint() {
@ -62,6 +82,8 @@ void UIItemReformWnd_Item::Paint() {
}
}
// OFFSET: 0x005FD8A0
// OFFSET: 0x005FDA60
// FUNCTION: fn_04117
void UIItemReformWnd_List::Slot31(int x, int y) {
@ -84,6 +106,8 @@ void UIItemReformWnd_DetailBtn::Slot47() {
}
}
// OFFSET: 0x005FDB20
// OFFSET: 0x005FDBE0
// FUNCTION: fn_04120
void UIItemReformWnd_List::Slot28(int x, int y) {
@ -103,6 +127,25 @@ void UIItemReformWnd_DetailBtn::Slot48() {
}
}
// OFFSET: 0x005FDC80
// FUNCTION: fn_04123
void UIItemReformWnd::Slot19() {
if (this->detailMsg) {
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this->detailMsg);
this->detailMsg->Move(g_mouse.x + 5, g_mouse.y + 5);
}
}
// OFFSET: 0x005FDCC0
// FUNCTION: fn_04124
void UIItemReformWnd_Item::Slot32(int x, int y) {
if (this->item) {
if (UIWindow* window = g_windowMgr.EnsureWindow(12)) {
window->SendMsg(nullptr, 24, reinterpret_cast<std::intptr_t>(this->item), 0, 0, 0);
}
}
}
// OFFSET: 0x005FDD10
// FUNCTION: fn_04126
void UIItemReformWnd_List::Slot33(int x, int y) {
@ -144,3 +187,5 @@ void UIItemReformWnd_List::UpdateScrollBar() {
this->parent->Invalidate();
}
}
// OFFSET: 0x005FDEA0

View file

@ -6,12 +6,16 @@
#include "UI/Lists/UIScrollBar.h"
#include "UI/Window/UIFrameWnd.h"
#include <string>
#include <vector>
class UIBasicButton;
class UIItemReformWnd_List : public UIFrameWnd {
public:
void Move(int x, int y) override;
void Slot15(int width, int height) override;
void Paint() override;
void Slot28(int x, int y) override;
void Slot31(int x, int y) override;
void Slot33(int x, int y) override;
@ -31,6 +35,8 @@ public:
class UIItemReformWnd_Item : public UIWindow {
public:
void Paint() override;
void Slot28(int x, int y) override;
void Slot32(int x, int y) override;
/* 007C */ ITEM_INFO* item;
};
@ -47,4 +53,25 @@ public:
void Paint() override;
};
class UIItemReformWnd : public UIFrameWnd {
public:
void Slot19() override;
void Paint() override;
void SelectItem(ITEM_INFO* item);
/* 00B4 */ UIBasicButton* reformButton;
/* 00B8 */ UIItemReformWnd_List* list;
/* 00BC */ UIItemReformWnd_Item* baseIcon;
/* 00C0 */ UIItemReformWnd_Item* resultIcon;
/* 00C4 */ std::vector<UIItemReformWnd_Item*> materialIcons;
/* 00D0 */ UIItemReformWnd_DetailBtn* detailButton;
/* 00D4 */ UIItemReformWnd_DetailMsg* detailMsg;
/* 00D8 */ ITEM_INFO reformItem;
/* 01D0 */ ITEM_INFO* selectedItem;
/* 01D8 */ ITEM_INFO resultItem;
/* 02D0 */ std::vector<ITEM_INFO> materials;
/* 02DC */ std::string information;
/* 02F4 */ std::string warning;
};
#endif