Decompile 3 functions in Source/UI/Acceptance/UIChooseSellBuyWnd.cpp, Source/UI/Dialogs/UIPetTamingDeceiveWnd.h, ...

Batch #1859 by Yommy: 0 byte-identical, 3 confirmed by peer review.

- fn_12255 UITipOfTheDayWnd::Paint: logic confirmed by peer review
- fn_12298 UIPetTamingDeceiveWnd::Slot19: logic confirmed by peer review
- fn_12322 UISayDialogWnd::Resize: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-10-28 22:59:58 +00:00
commit 31cf3f5cc2
4 changed files with 104 additions and 4 deletions

View file

@ -25,6 +25,7 @@
#include "UI/Dialogs/UIRestartWnd.h"
#include "UI/Dialogs/UISayDialogWnd.h"
#include "UI/Dialogs/UISelectCartWnd.h"
#include "UI/Dialogs/UITipOfTheDayWnd.h"
#include "UI/Dialogs/UIWaitWnd.h"
#include "UI/Items/UIEquipWnd.h"
#include "UI/Items/UIExchangeWnd.h"
@ -34,6 +35,7 @@
#include "UI/Lists/UIComboBoxWnd.h"
#include "UI/Lists/UIListBox.h"
#include "UI/Party/UIPartySettingWnd.h"
#include "UI/Shop/ItemDrawing.h"
#include "UI/Shop/UInCash_CallWnd.h"
#include "UI/Skill/UISkillDescribeWnd.h"
#include "UI/Status/UIStatusWnd.h"
@ -244,6 +246,44 @@ void UISkillDescribeWnd::Paint() {
DrawRoundedBorder(*this, 2, 2, this->geometry.width - 4, this->geometry.height - 4, 0xFFFFFF);
}
// OFFSET: 0x008F2460
// FUNCTION: fn_12255
void UITipOfTheDayWnd::Paint() {
auto& controls = *this->m_controls;
this->DrawTitleBar(controls.fonts, controls.locale, true, controls.services.MessageText(174), 0);
if (this->geometry.height == 17) {
return;
}
int rows = (this->geometry.height - 38) / 8 + ((this->geometry.height - 38) % 8 != 0);
for (int y = 17; rows > 0; --rows, y += 8) {
const auto* left = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp")));
this->DrawBitmap(0, y, &left->image, false);
}
rows = (this->geometry.height - 38) / 8 + ((this->geometry.height - 38) % 8 != 0);
for (int y = 17; rows > 0; --rows, y += 8) {
const auto* right = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp")));
this->DrawBitmap(this->geometry.width - right->image.width, y, &right->image, false);
}
unsigned red, green, blue;
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue);
this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - 38, RGB(red, green, blue));
this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue));
this->DrawButtonBar(2, 0, 1);
const int columns = (this->geometry.width - 40) / 32;
const int slots = (this->geometry.height - 38) / 32;
for (int i = 0, y = 17; i < slots; ++i, y += 32) {
DrawItemSlotBackground(*this, 40, y);
}
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue);
this->FillRegion(72, 17, columns * 32 - 32, slots * 32, RGB(red, green, blue));
}
// OFFSET: 0x008F2A90
// FUNCTION: fn_12258
void UIWaitWnd::Paint() {
@ -472,6 +512,21 @@ void UINotifyItemObtainWnd::Slot19() {
}
}
// OFFSET: 0x008F4FF0
// FUNCTION: fn_12298
void UIPetTamingDeceiveWnd::Slot19() {
this->Invalidate();
const int frame = this->m_tick / this->m_delay;
if (this->m_finishTime == 0xFFFFFFFF) {
if (this->m_frame == frame && this->m_delay <= this->m_maxDelay) {
this->m_finishTime = timeGetTime();
}
} else if (this->m_frame == frame && this->m_delay <= this->m_maxDelay && timeGetTime() - this->m_finishTime >= 2000) {
this->m_frameContext->windows.CloseWindow(91);
}
}
// OFFSET: 0x008F50B0
// FUNCTION: fn_12300
void UISayDialogWnd::Slot19() {
@ -529,6 +584,28 @@ void UIComboBoxWnd::Resize(int width, int height) {
this->m_list->Invalidate();
}
// OFFSET: 0x008F6750
// FUNCTION: fn_12322
void UISayDialogWnd::Resize(int width, int height) {
this->UIFrameWnd::Resize(width, height);
this->m_viewer->Resize(width - 20, height - 40);
for (UIWindow* button : this->m_buttons) {
if (button == nullptr) {
continue;
}
int x = this->geometry.width - 4;
const int y = this->geometry.height - 24;
for (UIWindow* other : this->m_buttons) {
if (button != other) {
x += -4 - other->geometry.width;
}
}
button->Move(x - button->geometry.width, y);
}
}
// OFFSET: 0x008F8860
// FUNCTION: fn_12332
int UIChooseSellBuyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {

View file

@ -5,15 +5,16 @@
class UIPetTamingDeceiveWnd : public UIFrameWnd {
public:
/* 00B4 */ std::uint32_t unknown_00B4;
/* 00B4 */ int m_delay;
/* 00B8 */ int m_state;
/* 00BC */ std::uint32_t unknown_00BC;
/* 00BC */ int m_tick;
/* 00C0 */ int m_target;
/* 00C4 */ int m_frame;
/* 00C8 */ std::uint32_t unknown_00C8;
/* 00CC */ std::uint32_t unknown_00CC;
/* 00C8 */ int m_maxDelay;
/* 00CC */ std::uint32_t m_finishTime;
/* 00D0 */ int m_started;
void Slot19() override;
void Slot25(int x, int y) override;
};

View file

@ -3,8 +3,14 @@
#include "UI/Window/UIFrameWnd.h"
#include <list>
class UISayDialogWnd : public UIFrameWnd {
public:
/* 00B4 */ UIWindow* m_viewer;
/* 00B8 */ std::list<UIWindow*> m_buttons;
void Resize(int width, int height) override;
void Slot19() override;
};

View file

@ -0,0 +1,16 @@
#ifndef RAGNAROK_SOURCE_UI_DIALOGS_UITIPOFTHEDAYWND_H
#define RAGNAROK_SOURCE_UI_DIALOGS_UITIPOFTHEDAYWND_H
#include "UI/Window/UIFrameWnd.h"
struct UIButtonContext;
class UITipOfTheDayWnd : public UIFrameWnd {
public:
void Paint() override;
protected:
UIButtonContext* m_controls;
};
#endif