Decompile 2 functions in Source/Contents/MapSkyMgr.cpp, Source/Contents/MapSkyMgr.h, ...
Batch #1449 by Yommy: 2 byte-identical, 0 confirmed by peer review. - fn_17872 CPathFinder::Height: byte-identical - fn_17873 CPathFinder::Width: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Contents/MapSkyMgr.cpp, Source/Contents/EquipmentResources.cpp, Source/Contents/Pathfinding.cpp, Source/Resource/ImfResource.cpp
This commit is contained in:
parent
3d1d975150
commit
f61f0747fa
14 changed files with 108 additions and 3 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include <ctime>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -65,7 +66,9 @@ public:
|
|||
/* 1718 */ unsigned char unknown_1718[0x1438];
|
||||
/* 2B50 */ ItemInfo unknown_2B50[10];
|
||||
/* 3500 */ ItemInfo unknown_3500[10];
|
||||
/* 3EB0 */ unsigned char unknown_3EB0[0x16A8];
|
||||
/* 3EB0 */ unsigned char unknown_3EB0[0x1408];
|
||||
/* 52B8 */ std::vector<const char*> m_accessoryNames;
|
||||
/* 52C4 */ unsigned char unknown_52C4[0x294];
|
||||
/* 5558 */ int unknown_5558;
|
||||
/* 555C */ unsigned char unknown_555C[0x47C];
|
||||
/* 59D8 */ LuaScript* m_hotkeyScript;
|
||||
|
|
@ -122,6 +125,7 @@ public:
|
|||
char* ConvertTooltipText(const char* source, char* output) const;
|
||||
int MercSkillLevel(int skillId) const;
|
||||
int SyncUnknown0E98();
|
||||
std::string GetAccessoryName(int id);
|
||||
void CollectCardItems();
|
||||
};
|
||||
|
||||
|
|
@ -157,6 +161,7 @@ static_assert(offsetof(CSession, m_job) == 0x1628);
|
|||
static_assert(offsetof(CSession, m_inventoryItems) == 0x1710);
|
||||
static_assert(offsetof(CSession, unknown_2B50) == 0x2B50);
|
||||
static_assert(offsetof(CSession, unknown_3500) == 0x3500);
|
||||
static_assert(offsetof(CSession, m_accessoryNames) == 0x52B8);
|
||||
static_assert(offsetof(CSession, unknown_5558) == 0x5558);
|
||||
static_assert(offsetof(CSession, m_hotkeyScript) == 0x59D8);
|
||||
static_assert(offsetof(CSession, unknown_5C68) == 0x5C68);
|
||||
|
|
|
|||
5
Source/Contents/EquipmentResources.cpp
Normal file
5
Source/Contents/EquipmentResources.cpp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#include "Client/Session.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
// OFFSET: 0x00E0A2C0
|
||||
3
Source/Contents/MapSkyMgr.cpp
Normal file
3
Source/Contents/MapSkyMgr.cpp
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#include "Contents/MapSkyMgr.h"
|
||||
|
||||
// OFFSET: 0x005B8F00
|
||||
23
Source/Contents/MapSkyMgr.h
Normal file
23
Source/Contents/MapSkyMgr.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef RAGNAROK_SOURCE_CONTENTS_MAPSKYMGR_H
|
||||
#define RAGNAROK_SOURCE_CONTENTS_MAPSKYMGR_H
|
||||
|
||||
#include "Script/LuaScript.h"
|
||||
|
||||
class CMapSkyMgr {
|
||||
public:
|
||||
// INLINED
|
||||
virtual ~CMapSkyMgr() {
|
||||
if (this->m_script) {
|
||||
this->m_script->Close();
|
||||
delete this->m_script;
|
||||
this->m_script = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool LoadData();
|
||||
|
||||
private:
|
||||
/* 0004 */ LuaScript* m_script;
|
||||
};
|
||||
|
||||
#endif
|
||||
16
Source/Contents/Pathfinding.cpp
Normal file
16
Source/Contents/Pathfinding.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include "Contents/TerrainPathSearch.h"
|
||||
#include "Resource/World/TerrainResource.h"
|
||||
|
||||
// OFFSET: 0x00AD85A0
|
||||
|
||||
// OFFSET: 0x00AD8DB0
|
||||
// FUNCTION: fn_17872
|
||||
int CPathFinder::Height() const {
|
||||
return this->attr->height;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AD8DC0
|
||||
// FUNCTION: fn_17873
|
||||
int CPathFinder::Width() const {
|
||||
return this->attr->width;
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class C3dAttr;
|
||||
|
|
@ -27,23 +28,26 @@ public:
|
|||
class CPathFinder {
|
||||
public:
|
||||
CPathFinder();
|
||||
~CPathFinder();
|
||||
|
||||
/* 0000 */ C3dAttr* attr;
|
||||
/* 0004 */ int destinationX;
|
||||
/* 0008 */ int destinationY;
|
||||
/* 000C */ int nodeCount;
|
||||
/* 0010 */ MovementPathNode nodes[150];
|
||||
/* 1078 */ std::map<int, MovementRouteInterpolation> unknown_1078;
|
||||
/* 1078 */ std::map<std::string, C3dAttr*> attrCache;
|
||||
/* 1080 */ bool useNodePool;
|
||||
/* 1084 */ std::vector<MovementPathNode> nodePool;
|
||||
/* 1090 */ std::map<int, MovementPathNode*> nodeMap;
|
||||
/* 1098 */ MovementOpenList openList;
|
||||
|
||||
void Reset();
|
||||
int Height() const;
|
||||
int Width() const;
|
||||
};
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(offsetof(CPathFinder, unknown_1078) == 0x1078);
|
||||
static_assert(offsetof(CPathFinder, attrCache) == 0x1078);
|
||||
static_assert(offsetof(CPathFinder, nodePool) == 0x1084);
|
||||
static_assert(offsetof(CPathFinder, nodeMap) == 0x1090);
|
||||
static_assert(offsetof(CPathFinder, openList) == 0x1098);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ struct WorldActors {
|
|||
const std::uint32_t& localAccountId;
|
||||
|
||||
CRenderObject* Find(std::uint32_t accountId) const;
|
||||
CRenderObject* Lookup(std::uint32_t accountId) const;
|
||||
|
||||
bool TargetPosition(const float* origin, std::uint32_t accountId, float* output) const;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include "Contents/Actors/RenderObject.h"
|
||||
#include "Contents/World/WorldActors.h"
|
||||
#include "Contents/World/WorldObjects.h"
|
||||
|
||||
// OFFSET: 0x00AC8220
|
||||
|
||||
// OFFSET: 0x00ACA4E0
|
||||
// FUNCTION: fn_17692
|
||||
void WorldObjects::Remove(CRenderObject* object) {
|
||||
|
|
@ -22,3 +25,5 @@ void WorldObjects::Clear() {
|
|||
entry = this->objects.erase(entry);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00ACA980
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
#ifndef RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDOBJECTS_H
|
||||
#define RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDOBJECTS_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
|
||||
class CGameObject;
|
||||
class CRenderObject;
|
||||
|
||||
struct WorldObjects {
|
||||
|
|
@ -10,6 +12,7 @@ struct WorldObjects {
|
|||
|
||||
void Remove(CRenderObject* object);
|
||||
void Clear();
|
||||
void SendObjectMessage(CGameObject* sender, std::uint64_t identity, int message, int a, int b, int c, int d);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
4
Source/Resource/ImfResource.cpp
Normal file
4
Source/Resource/ImfResource.cpp
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#include "Resource/ImfResource.h"
|
||||
#include "File/File.h"
|
||||
|
||||
// OFFSET: 0x0074F190
|
||||
29
Source/Resource/ImfResource.h
Normal file
29
Source/Resource/ImfResource.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef RAGNAROK_SOURCE_RESOURCE_IMFRESOURCE_H
|
||||
#define RAGNAROK_SOURCE_RESOURCE_IMFRESOURCE_H
|
||||
|
||||
#include "Resource/Resource.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct ImfData {
|
||||
/* 0000 */ std::vector<int> priority;
|
||||
/* 000C */ std::vector<int> cx;
|
||||
/* 0018 */ std::vector<int> cy;
|
||||
};
|
||||
|
||||
class CImfRes : public CRes {
|
||||
public:
|
||||
bool Load(const char* name) override;
|
||||
|
||||
private:
|
||||
/* 0110 */ std::vector<std::vector<ImfData>> m_imfData;
|
||||
/* 011C */ int m_maxAction[15];
|
||||
/* 0158 */ int m_maxMotion[15][104];
|
||||
};
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(sizeof(ImfData) == 36);
|
||||
static_assert(sizeof(CImfRes) == 0x19B8);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -102,6 +102,8 @@ void LuaScript::Error(const char* caption, const char* format, ...) {
|
|||
MessageBoxA(nullptr, text, caption, MB_OK);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AFDC60
|
||||
|
||||
// OFFSET: 0x00AFC9A0
|
||||
// FUNCTION: fn_18326
|
||||
bool LuaScript::Call(std::string function, const char* signature, ...) {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ protected:
|
|||
|
||||
private:
|
||||
void Error(const char* caption, const char* format, ...);
|
||||
bool TableField(const char* signature, ...);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue