Decompile 2 functions in Source/Contents/NavigationSource.cpp, Source/Contents/NavigationManager.h
Batch #1754 by Yommy: 2 byte-identical, 0 confirmed by peer review. - fn_19572 CNavigationManager::ClearCurrentObject: byte-identical - fn_19577 CNavigationManager::ClearNodes: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
df85eb5f7b
commit
e38b027ea1
2 changed files with 70 additions and 2 deletions
|
|
@ -36,6 +36,8 @@ struct NaviDataEntry {
|
|||
};
|
||||
|
||||
struct NaviRouteLine {
|
||||
// OFFSET: 0x00B92F10
|
||||
|
||||
/* 0000 */ int kind;
|
||||
/* 0004 */ int x;
|
||||
/* 0008 */ int y;
|
||||
|
|
@ -110,6 +112,17 @@ public:
|
|||
CNaviInfo* GetInfo() const override;
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct NaviObjectRecord {
|
||||
/* 0000 */ int type;
|
||||
/* 0004 */ int index;
|
||||
/* 0008 */ int cellX;
|
||||
/* 000C */ int cellY;
|
||||
/* 0010 */ std::int16_t nameLength;
|
||||
/* 0012 */ char name[1];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
class CNaviInfo {
|
||||
public:
|
||||
~CNaviInfo();
|
||||
|
|
@ -144,12 +157,22 @@ public:
|
|||
|
||||
struct NavigationTarget {
|
||||
NavigationTarget() : type(-1), object(nullptr), x(-1), y(-1) {}
|
||||
|
||||
// INLINED
|
||||
NavigationTarget(int type, void* object, int x, int y, std::string name) {
|
||||
this->type = type;
|
||||
this->object = object;
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
this->name = name;
|
||||
}
|
||||
|
||||
~NavigationTarget();
|
||||
|
||||
/* 0000 */ int type;
|
||||
/* 0004 */ void* object;
|
||||
/* 0008 */ int x;
|
||||
/* 000C */ int y;
|
||||
/* 0008 */ int x = 0;
|
||||
/* 000C */ int y = 0;
|
||||
/* 0010 */ std::string name;
|
||||
};
|
||||
|
||||
|
|
@ -207,6 +230,17 @@ public:
|
|||
bool UpdateGround();
|
||||
bool PlayerCell(int* column, int* row);
|
||||
bool LoadStates(std::vector<char> packet);
|
||||
bool AddState(const std::vector<std::string>& tokens);
|
||||
bool ParseFlags(const char* text, bool* first, bool* second, bool* third);
|
||||
NaviCell ParseCell(const char* text);
|
||||
std::vector<char> WriteTarget(NavigationTarget target);
|
||||
std::vector<char> WriteObject(CNavi_Object* object);
|
||||
void ClearSavedTarget();
|
||||
void ClearCurrentObject();
|
||||
void ClearStates();
|
||||
void ClearNodes();
|
||||
int FindNodePath(unsigned int index);
|
||||
void SelectNodePath(std::string name);
|
||||
|
||||
/* 0000 */ CNaviData data;
|
||||
/* 004C */ CPathFinder pathFinder;
|
||||
|
|
@ -264,6 +298,7 @@ static_assert(offsetof(CNaviInfo, visited) == 0x40);
|
|||
static_assert(offsetof(NaviDataEntry, cost) == 0x08);
|
||||
static_assert(offsetof(CNavi_Link, linkedLinks) == 0x8C);
|
||||
static_assert(sizeof(NaviCell) == 0x08);
|
||||
static_assert(offsetof(NaviObjectRecord, name) == 0x12);
|
||||
static_assert(sizeof(NaviDataEntry) == 0x0C);
|
||||
static_assert(sizeof(NaviRouteLine) == 0x2C);
|
||||
static_assert(offsetof(NaviRouteLine, text) == 0x0C);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
#include "Client/Session.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
// GLOBAL: gl_24627
|
||||
|
|
@ -270,3 +272,34 @@ void CNavigationManager::Reset(bool clearAll) {
|
|||
this->unknown_12A4 = nullptr;
|
||||
this->ClearRouteNodes();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B93110
|
||||
|
||||
// OFFSET: 0x00B93670
|
||||
|
||||
// OFFSET: 0x00B938F0
|
||||
|
||||
// OFFSET: 0x00B94890
|
||||
|
||||
// OFFSET: 0x00B94B50
|
||||
|
||||
// OFFSET: 0x00B950B0
|
||||
|
||||
// OFFSET: 0x00B95260
|
||||
// FUNCTION: fn_19572
|
||||
void CNavigationManager::ClearCurrentObject() {
|
||||
this->currentTarget.type = 0;
|
||||
this->currentTarget.object = nullptr;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B95AD0
|
||||
|
||||
// OFFSET: 0x00B95AF0
|
||||
// FUNCTION: fn_19577
|
||||
void CNavigationManager::ClearNodes() {
|
||||
this->nodes.clear();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B95DC0
|
||||
|
||||
// OFFSET: 0x00B95FB0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue