Decompile 3 functions in Source/UI/Acceptance/UIChooseSellBuyWnd.cpp, Source/UI/Items/UIItemCollectionWnd.h, ...

Batch #8878 by KWDev: 0 byte-identical, 3 confirmed by peer review.

- fn_12165 UICombinedCardItemCollectionWnd::Slot15: logic confirmed by peer review
- fn_12166 UICombinedCardItemCollection_ComparisonWnd::Slot15: logic confirmed by peer review
- fn_12176 UIItemCollection_ComparisonWnd::Slot15: logic confirmed by peer review

Peer-reviewed-by: gordaoprogramas, pedrao, dori
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-31 22:13:40 +00:00
commit 1fcdfed79d
2 changed files with 46 additions and 7 deletions

View file

@ -13,6 +13,7 @@
#include "Contents/MessageTable.h"
#include "Contents/Items/ItemNaming.h"
#include "Contents/TipBoxTitles.h"
#include "Contents/SkinMgr.h"
#include "Client/Mode/ModeMgr.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeEvents.h"
@ -1581,7 +1582,7 @@ void UIEquipWnd::Slot19() {
// FUNCTION: fn_12296
void UIItemCollectionWnd::Slot19() {
if (this->m_previewTick != 0 && timeGetTime() > this->m_previewTick + 100) {
this->m_preview->Invalidate();
this->m_readButtons[1]->Invalidate();
this->m_previewTick = timeGetTime();
}
}
@ -2204,6 +2205,38 @@ void UIBookWnd::Slot15(int width, int height) {
}
}
// OFFSET: 0x008E1890
// OFFSET: 0x008DE360
// FUNCTION: fn_12165
void UICombinedCardItemCollectionWnd::Slot15(int width, int height) {
this->UIItemCollectionWnd::Slot15(width, height);
this->m_kind = 82;
}
// OFFSET: 0x008DE380
// FUNCTION: fn_12166
void UICombinedCardItemCollection_ComparisonWnd::Slot15(int width, int height) {
this->UIItemCollectionWnd::Slot15(width, height);
this->m_closeButton->Enable(0);
this->m_kind = 250;
const SkinPaletteCell cell = {7, 1};
this->m_viewer->backgroundColor = SkinPaletteColor(ResourceMgr::Instance(), cell, g_skinInfo.Selected()) | 0xFF000000u;
this->m_viewer->Invalidate();
}
// OFFSET: 0x008E24C0
// FUNCTION: fn_12176
void UIItemCollection_ComparisonWnd::Slot15(int width, int height) {
this->UIItemCollectionWnd::Slot15(width, height);
this->m_closeButton->Enable(0);
this->m_kind = 234;
unsigned red, green, blue;
SkinPaletteChannels(ResourceMgr::Instance(), 30, 6, red, green, blue);
this->m_viewer->backgroundColor = 0xFF000000u | RGB(red, green, blue);
this->m_viewer->Invalidate();
}
// OFFSET: 0x008DBD00
// FUNCTION: fn_12160
void UICardItemIllustWnd::Slot15(int, int) {
@ -3790,7 +3823,7 @@ UINotifyItemObtainWnd::UINotifyItemObtainWnd(UIWindowContext& windows, UIFrameCo
// OFFSET: 0x008C7CB0
// FUNCTION: fn_11943
UIItemCollectionWnd::UIItemCollectionWnd(UIWindowContext& windows, UIFrameContext& frames)
: UIFrameWnd(windows, frames, 0), unknown_0214(0) {
: UIFrameWnd(windows, frames, 0), m_helpButton(nullptr) {
this->m_placement = nullptr;
this->m_item.Reset();
this->unknown_0238 = 0;
@ -3799,7 +3832,7 @@ UIItemCollectionWnd::UIItemCollectionWnd(UIWindowContext& windows, UIFrameContex
this->unknown_021C = -1;
this->unknown_0236 = 0xFFFF;
this->m_previewTick = 0;
this->unknown_0208 = 0;
this->m_closeButton = nullptr;
this->m_compare = 0;
this->unknown_01FC = 0;
this->m_moveInfo = nullptr;

View file

@ -10,12 +10,15 @@
#include <map>
#include <string>
class UIBitmapButton;
class UISpriteButton;
struct WindowPlacement;
class UIItemCollectionWnd : public UIFrameWnd {
public:
UIItemCollectionWnd(UIWindowContext& windows, UIFrameContext& frames);
void Slot11() override;
void Slot15(int width, int height) override;
// INLINED
std::string& ItemIdText() {
@ -27,8 +30,8 @@ public:
/* 00B4 */ unsigned char unknown_00B4[0x4];
/* 00B8 */ ITEM_INFO m_item;
/* 01B0 */ UITextViewer* m_viewer;
/* 01B4 */ unsigned char unknown_01B4[0x8];
/* 01BC */ UIWindow* m_preview;
/* 01B4 */ UIBitmapButton* m_viewButton;
/* 01B8 */ UISpriteButton* m_readButtons[2];
/* 01C0 */ std::uint32_t m_previewTick;
/* 01C4 */ std::string unknown_01C4;
/* 01DC */ std::string unknown_01DC;
@ -37,10 +40,10 @@ public:
/* 01FC */ int unknown_01FC;
/* 0200 */ WindowPlacement* m_placement;
/* 0204 */ UIResizer* m_resizer;
/* 0208 */ int unknown_0208;
/* 0208 */ UIBitmapButton* m_closeButton;
/* 020C */ unsigned char m_compare;
/* 0210 */ UIItemMoveInfo* m_moveInfo;
/* 0214 */ int unknown_0214;
/* 0214 */ UIBitmapButton* m_helpButton;
/* 0218 */ std::int16_t unknown_0218;
/* 021A */ std::int16_t unknown_021A;
/* 021C */ std::int16_t unknown_021C;
@ -62,6 +65,7 @@ public:
class UICombinedCardItemCollectionWnd : public UIItemCollectionWnd {
public:
UICombinedCardItemCollectionWnd(UIWindowContext& windows, UIFrameContext& frames);
void Slot15(int width, int height) override;
void Move(int x, int y) override;
void Slot11() override;
void Slot31(int x, int y) override;
@ -72,6 +76,7 @@ public:
class UIItemCollection_ComparisonWnd : public UIItemCollectionWnd {
public:
UIItemCollection_ComparisonWnd(UIWindowContext& windows, UIFrameContext& frames);
void Slot15(int width, int height) override;
void Move(int x, int y) override;
void Slot25(int x, int y) override;
void Slot31(int x, int y) override;
@ -80,6 +85,7 @@ public:
class UICombinedCardItemCollection_ComparisonWnd : public UIItemCollectionWnd {
public:
UICombinedCardItemCollection_ComparisonWnd(UIWindowContext& windows, UIFrameContext& frames);
void Slot15(int width, int height) override;
void Slot25(int x, int y) override;
void Slot31(int x, int y) override;
};