Decompile 5 functions in Source/Contents/NavigationLink.cpp, Source/Contents/NavigationManager.h, ...
Batch #1541 by ragnarok-clanker: 5 byte-identical, 0 confirmed by peer review. - fn_19473 CNavi_Link::GetTitle: byte-identical - fn_19475 CNavi_Link::GetName: byte-identical - fn_19487 CNavi_Link::GetIndex: byte-identical - fn_19492 CNavi_Link::GetType: byte-identical - fn_19494 CNavi_Link::GetId: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Contents/NavigationLink.cpp
This commit is contained in:
parent
7472beae2d
commit
dfadb24ce5
5 changed files with 118 additions and 0 deletions
37
Source/Contents/NavigationLink.cpp
Normal file
37
Source/Contents/NavigationLink.cpp
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#include "Contents/NavigationManager.h"
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8D8D0
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8E5F0
|
||||||
|
// FUNCTION: fn_19473
|
||||||
|
const char* CNavi_Link::GetTitle() const {
|
||||||
|
return this->title.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8E610
|
||||||
|
// FUNCTION: fn_19475
|
||||||
|
const char* CNavi_Link::GetName() const {
|
||||||
|
return this->name.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8E7D0
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8E830
|
||||||
|
// FUNCTION: fn_19487
|
||||||
|
int CNavi_Link::GetIndex() const {
|
||||||
|
return this->index;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8E8A0
|
||||||
|
// FUNCTION: fn_19492
|
||||||
|
int CNavi_Link::GetType() const {
|
||||||
|
return this->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8E8C0
|
||||||
|
// FUNCTION: fn_19494
|
||||||
|
int CNavi_Link::GetId() const {
|
||||||
|
return this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8E8F0
|
||||||
|
|
@ -81,8 +81,29 @@ public:
|
||||||
virtual CNaviInfo* GetInfo() const;
|
virtual CNaviInfo* GetInfo() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// VTABLE: vt_01778
|
||||||
|
class CNavi_Link : public CNavi_Object {
|
||||||
|
public:
|
||||||
|
/* 007C */ CNaviInfo* linkedInfo;
|
||||||
|
/* 0080 */ int unknown_0080;
|
||||||
|
/* 0084 */ int unknown_0084;
|
||||||
|
/* 0088 */ int unknown_0088;
|
||||||
|
/* 008C */ std::vector<NaviLink> linkedLinks;
|
||||||
|
|
||||||
|
~CNavi_Link() override;
|
||||||
|
int GetId() const override;
|
||||||
|
int GetType() const override;
|
||||||
|
int GetIndex() const override;
|
||||||
|
const char* GetName() const override;
|
||||||
|
const char* GetTitle() const override;
|
||||||
|
NaviCell* GetCell(NaviCell* out) const override;
|
||||||
|
CNaviInfo* GetInfo() const override;
|
||||||
|
};
|
||||||
|
|
||||||
class CNaviInfo {
|
class CNaviInfo {
|
||||||
public:
|
public:
|
||||||
|
~CNaviInfo();
|
||||||
|
|
||||||
bool HasName(const char* name) const;
|
bool HasName(const char* name) const;
|
||||||
const char* GetName() const;
|
const char* GetName() const;
|
||||||
const char* GetTitle() const;
|
const char* GetTitle() const;
|
||||||
|
|
@ -100,6 +121,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NavigationTarget {
|
struct NavigationTarget {
|
||||||
|
NavigationTarget() : type(-1), object(nullptr), x(-1), y(-1) {}
|
||||||
|
~NavigationTarget();
|
||||||
|
|
||||||
/* 0000 */ int type;
|
/* 0000 */ int type;
|
||||||
/* 0004 */ void* object;
|
/* 0004 */ void* object;
|
||||||
/* 0008 */ int x;
|
/* 0008 */ int x;
|
||||||
|
|
@ -109,6 +133,10 @@ struct NavigationTarget {
|
||||||
|
|
||||||
class CNaviData {
|
class CNaviData {
|
||||||
public:
|
public:
|
||||||
|
CNaviData();
|
||||||
|
~CNaviData();
|
||||||
|
|
||||||
|
bool SetDestination(CNaviInfo* info, int cellX, int cellY);
|
||||||
CNaviInfo* GetInfo();
|
CNaviInfo* GetInfo();
|
||||||
NaviCell* GetCell(NaviCell* out);
|
NaviCell* GetCell(NaviCell* out);
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
@ -126,6 +154,9 @@ public:
|
||||||
|
|
||||||
class CNavigationManager {
|
class CNavigationManager {
|
||||||
public:
|
public:
|
||||||
|
CNavigationManager();
|
||||||
|
~CNavigationManager();
|
||||||
|
|
||||||
NavigationTarget GetCurrentTarget() const;
|
NavigationTarget GetCurrentTarget() const;
|
||||||
std::string GetCurrentTargetName() const;
|
std::string GetCurrentTargetName() const;
|
||||||
NavigationTarget GetSavedTarget() const;
|
NavigationTarget GetSavedTarget() const;
|
||||||
|
|
@ -142,6 +173,11 @@ public:
|
||||||
std::string DestinationTitle();
|
std::string DestinationTitle();
|
||||||
float FitToSquare(int* offsetX, int* offsetY, int width, int height, float size) const;
|
float FitToSquare(int* offsetX, int* offsetY, int width, int height, float size) const;
|
||||||
void LoadSettings();
|
void LoadSettings();
|
||||||
|
void Reset(bool clearAll);
|
||||||
|
void ClearRouteNodes();
|
||||||
|
void ClearNodePaths();
|
||||||
|
CNaviInfo* GetLinkedPlayerInfo();
|
||||||
|
bool UpdateGround();
|
||||||
|
|
||||||
/* 0000 */ CNaviData data;
|
/* 0000 */ CNaviData data;
|
||||||
/* 004C */ CPathFinder pathFinder;
|
/* 004C */ CPathFinder pathFinder;
|
||||||
|
|
@ -189,7 +225,12 @@ public:
|
||||||
/* 1344 */ int viewIcon;
|
/* 1344 */ int viewIcon;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern CNavigationManager g_navigationManager;
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(_WIN64)
|
#if defined(_WIN32) && !defined(_WIN64)
|
||||||
|
static_assert(sizeof(CNavi_Link) == 0x98);
|
||||||
|
static_assert(offsetof(CNavi_Link, linkedInfo) == 0x7C);
|
||||||
|
static_assert(offsetof(CNavi_Link, linkedLinks) == 0x8C);
|
||||||
static_assert(sizeof(NaviCell) == 0x08);
|
static_assert(sizeof(NaviCell) == 0x08);
|
||||||
static_assert(sizeof(NaviDataEntry) == 0x0C);
|
static_assert(sizeof(NaviDataEntry) == 0x0C);
|
||||||
static_assert(sizeof(NaviRouteLine) == 0x2C);
|
static_assert(sizeof(NaviRouteLine) == 0x2C);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
#include "Contents/NavigationManager.h"
|
#include "Contents/NavigationManager.h"
|
||||||
|
#include "Client/Mode/ActiveGameMode.h"
|
||||||
|
#include "Client/Mode/CGameMode.h"
|
||||||
|
#include "Contents/World/WorldScene.h"
|
||||||
|
|
||||||
// OFFSET: 0x00B8DF10
|
// OFFSET: 0x00B8DF10
|
||||||
// FUNCTION: fn_19461
|
// FUNCTION: fn_19461
|
||||||
|
|
@ -64,3 +67,7 @@ int CNavi_Object::GetId() const {
|
||||||
CNaviInfo* CNavi_Object::GetInfo() const {
|
CNaviInfo* CNavi_Object::GetInfo() const {
|
||||||
return this->info;
|
return this->info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B89940
|
||||||
|
|
||||||
|
// OFFSET: 0x00BA1260
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
#include "Contents/NavigationManager.h"
|
#include "Contents/NavigationManager.h"
|
||||||
|
#include "Client/Session.h"
|
||||||
#include "Resource/ResourceMgr.h"
|
#include "Resource/ResourceMgr.h"
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
// GLOBAL: gl_24627
|
||||||
|
CNavigationManager g_navigationManager;
|
||||||
|
|
||||||
// OFFSET: 0x00B96980
|
// OFFSET: 0x00B96980
|
||||||
// FUNCTION: fn_19588
|
// FUNCTION: fn_19588
|
||||||
NavigationTarget CNavigationManager::GetCurrentTarget() const {
|
NavigationTarget CNavigationManager::GetCurrentTarget() const {
|
||||||
|
|
@ -102,3 +107,30 @@ int CNavigationManager::SaveCurrentTarget() {
|
||||||
this->savedTarget = this->currentTarget;
|
this->savedTarget = this->currentTarget;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B880D0
|
||||||
|
|
||||||
|
// OFFSET: 0x00B88530
|
||||||
|
|
||||||
|
// OFFSET: 0x00B8CC10
|
||||||
|
|
||||||
|
// INLINED
|
||||||
|
NavigationTarget::~NavigationTarget() {
|
||||||
|
this->type = -1;
|
||||||
|
this->object = nullptr;
|
||||||
|
this->x = -1;
|
||||||
|
this->y = -1;
|
||||||
|
this->name.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00B92580
|
||||||
|
|
||||||
|
// OFFSET: 0x00B92CA0
|
||||||
|
|
||||||
|
// OFFSET: 0x00B959D0
|
||||||
|
|
||||||
|
// OFFSET: 0x00B95A20
|
||||||
|
|
||||||
|
// OFFSET: 0x00B961A0
|
||||||
|
|
||||||
|
// OFFSET: 0x00B96BA0
|
||||||
|
|
|
||||||
|
|
@ -368,6 +368,7 @@
|
||||||
"Source/Contents/MovementRouteInterpolation.cpp": 4,
|
"Source/Contents/MovementRouteInterpolation.cpp": 4,
|
||||||
"Source/Contents/Movies/BinkMovie.cpp": 3,
|
"Source/Contents/Movies/BinkMovie.cpp": 3,
|
||||||
"Source/Contents/Movies/BinkMovies.cpp": 3,
|
"Source/Contents/Movies/BinkMovies.cpp": 3,
|
||||||
|
"Source/Contents/NavigationLink.cpp": 4,
|
||||||
"Source/Contents/NavigationRequest.cpp": 4,
|
"Source/Contents/NavigationRequest.cpp": 4,
|
||||||
"Source/Contents/NavigationRoute.cpp": 4,
|
"Source/Contents/NavigationRoute.cpp": 4,
|
||||||
"Source/Contents/NavigationSource.cpp": 4,
|
"Source/Contents/NavigationSource.cpp": 4,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue