Decompile 5 functions in Source/UI/Window/UIFrameWnd.cpp, Source/UI/Window/UIFrameWnd.h, ...
Batch #4953 by youko: 0 byte-identical, 5 confirmed by peer review. - fn_12070 UIMenuWnd::AddItem: logic confirmed by peer review - fn_12073 UITipboxWnd::ShowTip: logic confirmed by peer review - fn_12083 UIExchangeWnd::Slot10: logic confirmed by peer review - fn_12084 UInCashWnd::Slot10: logic confirmed by peer review - fn_12090 UISkillDescribeWnd::Slot43: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
40021da2ca
commit
0c4287947f
10 changed files with 120 additions and 1 deletions
|
|
@ -11,9 +11,11 @@
|
|||
#include "Contents/Configuration/ServiceConfiguration.h"
|
||||
#include "Contents/Items/ItemDescription.h"
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Contents/TipBoxTitles.h"
|
||||
#include "Client/Mode/ModeMgr.h"
|
||||
#include "Client/Mode/CGameMode.h"
|
||||
#include "Client/Mode/ModeEvents.h"
|
||||
#include "Client/Mode/ModeDragState.h"
|
||||
#include "Client/Replay.h"
|
||||
#include "Client/ReplayPacketRecorder.h"
|
||||
#include "Render/DeviceContext/DeviceContext.h"
|
||||
|
|
@ -67,6 +69,7 @@
|
|||
#include "UI/Lists/UIComboBoxWnd.h"
|
||||
#include "UI/Lists/UIListBox.h"
|
||||
#include "UI/Party/UIPartySettingWnd.h"
|
||||
#include "UI/Shortcuts/ShortcutVisibility.h"
|
||||
#include "UI/Shop/ItemDrawing.h"
|
||||
#include "UI/Shop/UInCash_CallWnd.h"
|
||||
#include "UI/Skill/UISkillDescribeWnd.h"
|
||||
|
|
@ -1078,6 +1081,81 @@ ITEM_INFO UIItemParamChangeDisplayWnd::FindEquippedItem(int location) {
|
|||
return ITEM_INFO(0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008CEA60
|
||||
// FUNCTION: fn_12070
|
||||
void UIMenuWnd::AddItem(const char* text, const std::uint32_t& color) {
|
||||
this->m_items.push_back(text);
|
||||
this->m_colors.push_back(color);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008CEED0
|
||||
// FUNCTION: fn_12073
|
||||
void UITipboxWnd::ShowTip(int id) {
|
||||
g_itemTagOwner->SelectTip(id);
|
||||
this->SendMsg(this, 6, 543, 0, 0, 0);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008D0230
|
||||
// FUNCTION: fn_12083
|
||||
void UIExchangeWnd::Slot10(int x, int y, std::intptr_t value) {
|
||||
CMode* mode = g_modeMgr.GetGameMode();
|
||||
if (this->unknown_00CC != 0) {
|
||||
mode->SendMsg(18, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
|
||||
if (drag->source != 1) {
|
||||
mode->SendMsg(18, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (drag->quantity == 1) {
|
||||
this->SendMsg(nullptr, 38, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
reinterpret_cast<WindowVisibility&>(g_windowMgr).Show(15, 1);
|
||||
g_windowMgr.window_01EC->SendMsg(nullptr, 13, 5, 0, 0, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008D02D0
|
||||
// FUNCTION: fn_12084
|
||||
void UInCashWnd::Slot10(int x, int y, std::intptr_t value) {
|
||||
if (g_windowMgr.LookupWindow(10011)) {
|
||||
UIWindow::Slot10(x, y, value);
|
||||
return;
|
||||
}
|
||||
|
||||
CMode* mode = g_modeMgr.GetGameMode();
|
||||
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
|
||||
switch (drag->source) {
|
||||
case 4:
|
||||
if (x < 445) {
|
||||
const int quantity = g_session.GetItem1720QuantityByItemId(drag->name.c_str());
|
||||
if (quantity < 2) {
|
||||
this->SendMsg(nullptr, 38, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
reinterpret_cast<WindowVisibility&>(g_windowMgr).Show(15, 1);
|
||||
g_windowMgr.window_01EC->SendMsg(nullptr, 13, 20, quantity, 0, 0);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (x > 444) {
|
||||
reinterpret_cast<WindowVisibility&>(g_windowMgr).Show(15, 1);
|
||||
g_windowMgr.window_01EC->SendMsg(nullptr, 13, 19, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
mode->SendMsg(18, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008D9F00
|
||||
// FUNCTION: fn_12137
|
||||
bool UISkillDescribeWnd::Slot42(void*) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
class UICheckBox : public UIWindow {
|
||||
friend class CMergeItemWnd;
|
||||
friend class UIFrameWnd;
|
||||
|
||||
public:
|
||||
UICheckBox(UIWindowContext& windowContext, UIButtonContext& controls);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public:
|
|||
/* 00BC */ int m_itemHeight;
|
||||
/* 00C0 */ std::vector<std::string> m_items;
|
||||
/* 00CC */ std::uint32_t unknown_00CC;
|
||||
/* 00D0 */ std::uint32_t* m_colors;
|
||||
/* 00D0 */ std::vector<std::uint32_t> m_colors;
|
||||
|
||||
void Move(int x, int y) override;
|
||||
void Slot15(int width, int height) override;
|
||||
|
|
@ -24,6 +24,7 @@ public:
|
|||
void Slot28(int x, int y) override;
|
||||
void Slot31(int x, int y) override;
|
||||
|
||||
void AddItem(const char* text, const std::uint32_t& color);
|
||||
int ItemAt(int x, int y);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
class UITipboxWnd : public UIFrameWnd {
|
||||
public:
|
||||
void ShowTip(int id);
|
||||
void TrimAt(std::string& text, const char* marker);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ public:
|
|||
/* 00D4 */ unsigned char unknown_00D4[0x04];
|
||||
/* 00D8 */ int unknown_00D8;
|
||||
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot35(int delta) override;
|
||||
|
||||
void LayoutButtons();
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ struct WindowPlacement;
|
|||
class UInCashWnd : public UIFrameWnd {
|
||||
public:
|
||||
bool Slot03() override;
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot11() override;
|
||||
|
||||
/* 00B4 */ unsigned char unknown_00B4[0x4C];
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ public:
|
|||
|
||||
void Paint() override;
|
||||
bool Slot42(void* output) override;
|
||||
void Slot43() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Layout/SnapMgr.h"
|
||||
#include "UI/Buttons/UIBitmapButton.h"
|
||||
#include "UI/Buttons/UICheckBox.h"
|
||||
#include "UI/Buttons/UIReplayButton.h"
|
||||
#include "UI/Acceptance/UIJoinPartyAcceptWnd.h"
|
||||
#include "UI/Edit/UIEditCtrl.h"
|
||||
|
|
@ -196,6 +197,10 @@ int UIFrameWnd::Slot46() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
// OFFSET: 0x008CEF10
|
||||
|
||||
// OFFSET: 0x008CEFD0
|
||||
|
||||
// OFFSET: 0x008CF0C0
|
||||
// FUNCTION: fn_12076
|
||||
UIBitmapButton* UIFrameWnd::AddCloseButton(UIButtonContext& controls, const char* tooltip, int width) {
|
||||
|
|
@ -216,6 +221,16 @@ UIBitmapButton* UIFrameWnd::AddCloseButton(UIButtonContext& controls, const char
|
|||
return button;
|
||||
}
|
||||
|
||||
// OFFSET: 0x008CF2A0
|
||||
|
||||
// OFFSET: 0x008CF390
|
||||
|
||||
// OFFSET: 0x008CF870
|
||||
|
||||
// OFFSET: 0x008CFE50
|
||||
|
||||
// OFFSET: 0x008CFF40
|
||||
|
||||
// OFFSET: 0x008BA280
|
||||
// FUNCTION: fn_11780
|
||||
void UIReplayListBox::Slot25(int x, int y) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
struct WindowSnapping;
|
||||
class WindowManagerWindows;
|
||||
class UIBitmapButton;
|
||||
class UICheckBox;
|
||||
struct UIButtonContext;
|
||||
|
||||
struct UIFrameContext {
|
||||
|
|
@ -33,6 +34,16 @@ public:
|
|||
std::vector<std::uint32_t> Slot44() override;
|
||||
int Slot46() override;
|
||||
UIBitmapButton* AddCloseButton(UIButtonContext& controls, const char* tooltip, int width);
|
||||
UIBitmapButton* AddBaseButton(UIButtonContext& controls);
|
||||
UIBitmapButton* AddBigCloseButton(UIButtonContext& controls, const char* tooltip, int width);
|
||||
UIBitmapButton* AddMinimizeButton(UIButtonContext& controls, const char* tooltip, int width);
|
||||
UIBitmapButton* AddBitmapButton(UIButtonContext& controls, int id, int x, int y, const char* name, const char* tooltip);
|
||||
UIBitmapButton* AddNumberedButton(UIButtonContext& controls, int id, int x, int y, const char* name, const char* tooltip, bool prefix);
|
||||
UICheckBox* AddStyledCheckBox(
|
||||
UIButtonContext& controls, int id, int width, int height, const char* text, int x, int y, bool checked, const char* tooltip, int fontHeight,
|
||||
std::uint32_t color, const char* checkedImage, const char* uncheckedImage
|
||||
);
|
||||
UICheckBox* AddCheckBox(UIButtonContext& controls, int id, int width, int height, const char* text, int x, int y, int checked, const char* tooltip);
|
||||
void DrawBorder(int x, int y, int width, int height);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,15 @@
|
|||
#include "Render/Renderer.h"
|
||||
#include "Render/TextureQuad.h"
|
||||
#include "UI/Chat/UIWhisperWnd.h"
|
||||
#include "UI/Skill/UISkillDescribeWnd.h"
|
||||
|
||||
// OFFSET: 0x008D0D80
|
||||
// FUNCTION: fn_12090
|
||||
void UISkillDescribeWnd::Slot43() {
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
this->ToScreen(x, y);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008D0DB0
|
||||
// FUNCTION: fn_12091
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue