Decompile 4 functions in Source/Contents/NavigationManager.h, Source/Contents/NavigationRoute.cpp, ...
Batch #7233 by eAthena: 0 byte-identical, 4 confirmed by peer review. - fn_19619 CNavigationManager::WriteStates: logic confirmed by peer review - fn_16324 RecommendedQuestInfo::CUIScrollWindow::Slot15: logic confirmed by peer review - fn_16349 CUIRecommendedQuestInfo::Slot16: logic confirmed by peer review - fn_16350 RecommendedQuestInfo::CUIScrollWindow::Slot16: logic confirmed by peer review Peer-reviewed-by: alisonrag, Lumen, Landruca 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
d2e184a3b7
commit
bfc44fffd9
7 changed files with 142 additions and 0 deletions
|
|
@ -331,6 +331,7 @@ public:
|
|||
std::vector<char> WriteTarget(NavigationTarget target);
|
||||
std::vector<char> WriteObject(CNavi_Object* object);
|
||||
std::vector<unsigned char> WriteReplayState();
|
||||
std::vector<unsigned char> WriteStates();
|
||||
CNavi_Link* ReadObject(const char* record);
|
||||
NavigationTarget ReadTarget(const char* data, int size);
|
||||
CNavi_Object* ReadTargetObject(const char* record);
|
||||
|
|
|
|||
|
|
@ -598,6 +598,39 @@ float CNavigationManager::FitToSquare(int* offsetX, int* offsetY, int width, int
|
|||
return scale;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B9C0D0
|
||||
// FUNCTION: fn_19619
|
||||
std::vector<unsigned char> CNavigationManager::WriteStates() {
|
||||
std::vector<unsigned char> buffer;
|
||||
if (this->states.empty()) {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
buffer.resize(4, 0);
|
||||
std::size_t offset = 4;
|
||||
*reinterpret_cast<int*>(buffer.data()) = static_cast<int>(this->states.size());
|
||||
for (auto it = this->states.begin(); it != this->states.end(); ++it) {
|
||||
CNaviInfo* info = static_cast<CNaviInfo*>(it->object);
|
||||
if (info == nullptr) {
|
||||
continue;
|
||||
}
|
||||
buffer.resize(it->name.size() + 0x24 + offset, 0);
|
||||
*reinterpret_cast<int*>(buffer.data() + offset) = it->type;
|
||||
offset += 4;
|
||||
std::memcpy(buffer.data() + offset, info->GetName(), info->GetNameLength());
|
||||
*reinterpret_cast<int*>(buffer.data() + offset + 0x14) = it->x;
|
||||
*reinterpret_cast<int*>(buffer.data() + offset + 0x18) = it->y;
|
||||
const int length = static_cast<int>(it->name.size());
|
||||
*reinterpret_cast<int*>(buffer.data() + offset + 0x1C) = length;
|
||||
offset += 0x20;
|
||||
if (length > 0) {
|
||||
std::memcpy(buffer.data() + offset, it->name.c_str(), length);
|
||||
offset += length;
|
||||
}
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B888F0
|
||||
// FUNCTION: fn_19378
|
||||
NaviCell* CNaviData::GetCell(NaviCell* out) {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class UITextButton : public UIButton {
|
|||
friend class UIMessageBox;
|
||||
friend class UIEditCtrl3;
|
||||
friend class UIAchTracingWnd;
|
||||
friend class UIAchSummaryWnd;
|
||||
|
||||
public:
|
||||
friend void OpenTextButtonLink(UITextButton* button);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
#include "UI/Quest/UIRecommendedQuestInfo.h"
|
||||
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Render/Renderer.h"
|
||||
#include "UI/Quest/UIRenewQuestWnd.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
// OFFSET: 0x00A568E0
|
||||
// FUNCTION: fn_16321
|
||||
void CUIRecommendedQuestInfo::Slot53() {
|
||||
|
|
@ -16,6 +23,19 @@ void CUIRecommendedQuestInfo::Slot53() {
|
|||
void CUIRecommendedQuestInfo::OnFirstAction() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A58BE0
|
||||
// FUNCTION: fn_16349
|
||||
void CUIRecommendedQuestInfo::Slot16() {
|
||||
const char* title = LookupMessage(0xD48);
|
||||
this->titleBar->SetTitle(title, std::strlen(title));
|
||||
UIWindow* window = g_windowMgr.LookupWindow(0x2718);
|
||||
if (window) {
|
||||
this->Move(window->geometry.x + window->geometry.width, window->geometry.y);
|
||||
} else {
|
||||
this->Move((g_renderer->viewport.width - this->geometry.width) / 2, (g_renderer->viewport.height - this->geometry.height) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
namespace RecommendedQuestInfo {
|
||||
|
||||
// OFFSET: 0x00A58BC0
|
||||
|
|
@ -57,4 +77,61 @@ void CUIQuestInfo::Slot15(int width, int height) {
|
|||
this->AddChild(this->textViewer);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A57EF0
|
||||
// FUNCTION: fn_16324
|
||||
void CUIScrollWindow::Slot15(int width, int height) {
|
||||
this->background = new CUIStaticImage(*this->m_context);
|
||||
this->background->SetSize(336, 318);
|
||||
this->background->Move(3, 2);
|
||||
this->background->SetImage(std::string());
|
||||
this->AddChild(this->background);
|
||||
|
||||
this->topImage = new CUIStaticImage(*this->m_context);
|
||||
this->topImage->SetSize(324, 138);
|
||||
this->topImage->Move(9, 8);
|
||||
this->topImage->SetImage("유저인터페이스\\Renew_QuestUI\\bg_quest01.png");
|
||||
this->AddChild(this->topImage);
|
||||
|
||||
this->bottomImage = new CUIStaticImage(*this->m_context);
|
||||
this->bottomImage->SetSize(208, 92);
|
||||
this->bottomImage->Move(9, 221);
|
||||
this->bottomImage->SetImage("유저인터페이스\\Renew_QuestUI\\bg_quest02.png");
|
||||
this->AddChild(this->bottomImage);
|
||||
|
||||
for (int count = 3; count != 0; --count) {
|
||||
CUIQuestInfo* info = new CUIQuestInfo(*this->m_context);
|
||||
info->SetSize(300, 150);
|
||||
this->AddChild(info);
|
||||
this->questInfos.push_back(info);
|
||||
}
|
||||
|
||||
this->questInfos[0]->Resize(306, 120);
|
||||
this->questInfos[0]->Move(18, 17);
|
||||
this->questInfos[0]->textViewer->Resize(306, 120);
|
||||
this->questInfos[0]->textViewer->SetScrollBarSize(7, 120);
|
||||
|
||||
this->questInfos[1]->Resize(213, 60);
|
||||
this->questInfos[1]->Move(16, 153);
|
||||
this->questInfos[1]->textViewer->Resize(213, 60);
|
||||
this->questInfos[1]->textViewer->SetTextOffset(0, 6);
|
||||
this->questInfos[1]->textViewer->SetBold(true);
|
||||
this->questInfos[1]->textViewer->SetTextColor(0x2A2A2A);
|
||||
this->questInfos[1]->textViewer->SetOutline(true, 0xFFFFFF);
|
||||
this->questInfos[1]->textViewer->SetScrollBarSize(7, 60);
|
||||
|
||||
this->questInfos[2]->Resize(182, 76);
|
||||
this->questInfos[2]->Move(22, 229);
|
||||
this->questInfos[2]->textViewer->Resize(182, 76);
|
||||
this->questInfos[2]->textViewer->SetScrollBarSize(7, 76);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A58C70
|
||||
// FUNCTION: fn_16350
|
||||
void CUIScrollWindow::Slot16() {
|
||||
this->npcSprite = new UINpcSprWnd(*this->m_context);
|
||||
this->npcSprite->SetSize(75, 145);
|
||||
this->npcSprite->Show(0);
|
||||
this->AddChild(this->npcSprite);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,16 +5,26 @@
|
|||
#include "UI/Text/UITextViewerControl.h"
|
||||
#include "UI/Window/UIControl.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class UINpcSprWnd;
|
||||
|
||||
class CUIRecommendedQuestInfo : public CUIFrameWnd {
|
||||
public:
|
||||
void Slot16() override;
|
||||
void OnFirstAction();
|
||||
virtual void Slot53();
|
||||
|
||||
/* 00D8 */ CUITitleBar* titleBar;
|
||||
};
|
||||
|
||||
namespace RecommendedQuestInfo {
|
||||
|
||||
class CUIQuestInfo : public CUIControl {
|
||||
public:
|
||||
__declspec(noinline) explicit CUIQuestInfo(UIWindowContext& context) : CUIControl(context), textViewer(nullptr) {
|
||||
}
|
||||
|
||||
void Slot15(int width, int height) override;
|
||||
void Slot16() override;
|
||||
void Paint() override;
|
||||
|
|
@ -22,6 +32,18 @@ public:
|
|||
/* 0084 */ CUITextViewer* textViewer;
|
||||
};
|
||||
|
||||
class CUIScrollWindow : public CUIControl {
|
||||
public:
|
||||
void Slot15(int width, int height) override;
|
||||
void Slot16() override;
|
||||
|
||||
/* 0084 */ CUIStaticImage* background;
|
||||
/* 0088 */ CUIStaticImage* topImage;
|
||||
/* 008C */ CUIStaticImage* bottomImage;
|
||||
/* 0090 */ std::vector<CUIQuestInfo*> questInfos;
|
||||
/* 009C */ UINpcSprWnd* npcSprite;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1013,3 +1013,5 @@ void UIToolTipBitmapWnd::Slot28(int x, int y) {
|
|||
reinterpret_cast<ModeTooltip*>(g_modeMgr.gameMode)->Show(this->tooltip.c_str(), x, y, 0xFFFFFFFFu, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x007B50C0
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@ public:
|
|||
|
||||
class UICustomGageBar : public UIWindow {
|
||||
public:
|
||||
__declspec(noinline) explicit UICustomGageBar(UIWindowContext& windows)
|
||||
: UIWindow(windows, 0), value(-1), maximum(-1), text(), barColor(0xCE7B52), backgroundColor(0xFFFFFF), outerBorderColor(0xEFE7E7),
|
||||
innerBorderColor(0xADADAD) {
|
||||
}
|
||||
|
||||
/* 007C */ int value;
|
||||
/* 0080 */ int maximum;
|
||||
/* 0084 */ std::string text;
|
||||
|
|
@ -235,6 +240,7 @@ public:
|
|||
/* 0098 */ UIWindow* buttons[2];
|
||||
|
||||
void Show(int visible) override;
|
||||
void Slot15(int width, int height) override;
|
||||
void Paint() override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue