Decompile fn_12211 (UIBookWnd::Paint)
Batch #9155 by Bielhp: 0 byte-identical, 1 confirmed by peer review. - fn_12211 UIBookWnd::Paint: logic confirmed by peer review Peer-reviewed-by: youko, superintelligence 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
e4112cc1ec
commit
99ba376b0c
5 changed files with 69 additions and 0 deletions
|
|
@ -5500,3 +5500,62 @@ int UIStorePasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr_
|
|||
|
||||
return UIFrameWnd::SendMsg(sender, message, a, b, c, d);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008ECE60
|
||||
// FUNCTION: fn_12211
|
||||
void UIBookWnd::Paint() {
|
||||
const int titleHeight = this->DrawTitleBar(this->m_context->fonts, this->m_context->locale, false, "", 0);
|
||||
this->DrawPanelBackground(titleHeight, 0, "");
|
||||
|
||||
char* title = new char[110];
|
||||
std::sprintf(title, "%s ( %d / %d )", this->m_bookName, this->m_page, this->m_pageCount);
|
||||
this->DrawTextAt(this->m_context->fonts, this->m_context->locale, this->geometry.width / 2 - 72, 2, title, 0, 0, 12, 0, 0, 0);
|
||||
|
||||
this->FillRegion(1, titleHeight, this->geometry.width - 2, this->geometry.height - 18, RGB(this->m_red, this->m_green, this->m_blue));
|
||||
this->m_viewer->backgroundColor = 0xFF000000u | RGB(this->m_red, this->m_green, this->m_blue);
|
||||
this->m_viewer->Invalidate();
|
||||
}
|
||||
|
||||
// OFFSET: 0x008ECF50
|
||||
|
||||
// OFFSET: 0x008E8480
|
||||
|
||||
// OFFSET: 0x008D3AB0
|
||||
|
||||
// OFFSET: 0x008D4100
|
||||
|
||||
// INLINED
|
||||
static __forceinline std::vector<unsigned char> BuildAcceptanceReplayRecords(UITextViewer* viewer, std::uint16_t id, int message) {
|
||||
std::vector<unsigned char> records;
|
||||
{
|
||||
const auto record = BuildReplayTaggedRecord(id, nullptr, 0);
|
||||
records.insert(records.end(), record.begin(), record.end());
|
||||
}
|
||||
|
||||
char text[260];
|
||||
std::memset(text, 0, sizeof(text));
|
||||
viewer->CopyText(text, 0);
|
||||
const char parentheses[] = {'(', ')', '\0'};
|
||||
std::string decoration(parentheses);
|
||||
decoration.append(LookupMessage(message));
|
||||
{
|
||||
const auto record = BuildReplayTaggedRecord(id + 2, text + 1, viewer->TextLength() - decoration.size());
|
||||
records.insert(records.end(), record.begin(), record.end());
|
||||
}
|
||||
|
||||
{
|
||||
const auto record = BuildReplayTaggedRecord(id + 1, nullptr, 0);
|
||||
records.insert(records.end(), record.begin(), record.end());
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
// OFFSET: 0x008D4A40
|
||||
|
||||
// OFFSET: 0x008D3CD0
|
||||
|
||||
// OFFSET: 0x008D5C80
|
||||
|
||||
// OFFSET: 0x008D60B0
|
||||
|
||||
// OFFSET: 0x008D64E0
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public:
|
|||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
|
||||
/* 00B4 */ std::uint32_t identity;
|
||||
/* 00B8 */ UITextViewer* viewer;
|
||||
|
|
@ -46,6 +47,7 @@ public:
|
|||
void Slot15(int width, int height) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
void Slot11() override;
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
|
||||
/* 00BC */ NormalItemSlotWindow* saved;
|
||||
};
|
||||
|
|
@ -55,6 +57,7 @@ public:
|
|||
UIJoinPartyAcceptWnd(UIWindowContext& windows, UIFrameContext& frames, UIAcceptanceContext& acceptance);
|
||||
~UIJoinPartyAcceptWnd() override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
};
|
||||
|
||||
class UIAllyGuildAcceptWnd : public UIExchangeAcceptWnd {
|
||||
|
|
@ -67,12 +70,14 @@ class UIBabyAcceptWnd2 : public UIExchangeAcceptWnd {
|
|||
public:
|
||||
UIBabyAcceptWnd2(UIWindowContext& windows, UIFrameContext& frames, UIAcceptanceContext& acceptance);
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
};
|
||||
|
||||
class UIBabyAcceptWnd : public UIExchangeAcceptWnd {
|
||||
public:
|
||||
UIBabyAcceptWnd(UIWindowContext& windows, UIFrameContext& frames, UIAcceptanceContext& acceptance);
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
};
|
||||
|
||||
class UICoupleAcceptWnd : public UIExchangeAcceptWnd {
|
||||
|
|
@ -85,6 +90,7 @@ class UIJoinFriendAcceptWnd : public UIExchangeAcceptWnd {
|
|||
public:
|
||||
UIJoinFriendAcceptWnd(UIWindowContext& windows, UIFrameContext& frames, UIAcceptanceContext& acceptance);
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
|
||||
/* 00C0 */ int m_accountId;
|
||||
/* 00C4 */ int m_characterId;
|
||||
|
|
@ -93,6 +99,7 @@ public:
|
|||
class UIJoinGuildAcceptWnd : public UIExchangeAcceptWnd {
|
||||
public:
|
||||
UIJoinGuildAcceptWnd(UIWindowContext& windows, UIFrameContext& frames, UIAcceptanceContext& acceptance);
|
||||
std::vector<unsigned char> Slot44() override;
|
||||
};
|
||||
|
||||
class UIMixAcceptWnd : public UIExchangeAcceptWnd {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ public:
|
|||
/* 0150 */ UISpriteButton* m_buttons[4];
|
||||
|
||||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
void Slot25(int x, int y) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ struct UIButtonContext;
|
|||
class UISelectCartWnd : public UIFrameWnd {
|
||||
public:
|
||||
UISelectCartWnd(UIWindowContext& windows, UIFrameContext& frames);
|
||||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
void Slot25(int x, int y) override;
|
||||
void AddCart(int index, int type);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class UICardItemIllustWnd : public UIFrameWnd {
|
|||
public:
|
||||
UICardItemIllustWnd(UIWindowContext& windows, UIFrameContext& frames, UIButtonContext& controls);
|
||||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
|
||||
/* 00B4 */ std::string m_bitmapPath;
|
||||
/* 00CC */ std::string m_name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue