Decompile 2 functions in Source/Contents/AdventureGuideMgr.cpp, Source/Contents/AdventureGuideMgr.h
Batch #1200 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_05222 CAdventureGuideMgr::CAdventureGuideMgr: logic confirmed by peer review - fn_05227 CAdventureGuideMgr::~CAdventureGuideMgr: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Contents/AdventureGuideMgr.cpp
This commit is contained in:
parent
d1fbbd049e
commit
08ebce70a2
3 changed files with 130 additions and 0 deletions
23
Source/Contents/AdventureGuideMgr.cpp
Normal file
23
Source/Contents/AdventureGuideMgr.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include "Contents/AdventureGuideMgr.h"
|
||||
|
||||
// GLOBAL: gl_24502
|
||||
CAdventureGuideMgr* g_adventureGuideMgr;
|
||||
|
||||
// OFFSET: 0x00660F70
|
||||
// FUNCTION: fn_05222
|
||||
CAdventureGuideMgr::CAdventureGuideMgr() : m_initialized(true) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x006629D0
|
||||
// FUNCTION: fn_05227
|
||||
CAdventureGuideMgr::~CAdventureGuideMgr() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00663680
|
||||
// FUNCTION: fn_05235
|
||||
void CAdventureGuideMgr::Destroy() {
|
||||
if (g_adventureGuideMgr) {
|
||||
delete g_adventureGuideMgr;
|
||||
g_adventureGuideMgr = nullptr;
|
||||
}
|
||||
}
|
||||
106
Source/Contents/AdventureGuideMgr.h
Normal file
106
Source/Contents/AdventureGuideMgr.h
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
#ifndef RAGNAROK_SOURCE_CONTENTS_ADVENTUREGUIDEMGR_H
|
||||
#define RAGNAROK_SOURCE_CONTENTS_ADVENTUREGUIDEMGR_H
|
||||
|
||||
#include "Script/LuaInstance.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct AdventureGuideDetail {
|
||||
/* 0000 */ int unknown_0000;
|
||||
/* 0004 */ int unknown_0004;
|
||||
/* 0008 */ int unknown_0008;
|
||||
/* 000C */ std::string text;
|
||||
};
|
||||
|
||||
struct AdventureGuideIntro {
|
||||
/* 0000 */ int unknown_0000;
|
||||
/* 0004 */ std::string title;
|
||||
/* 001C */ std::string text;
|
||||
/* 0034 */ std::map<int, AdventureGuideDetail> details;
|
||||
};
|
||||
|
||||
struct AdventureGuideText {
|
||||
/* 0000 */ std::string first;
|
||||
/* 0018 */ std::string second;
|
||||
};
|
||||
|
||||
struct AdventureGuideEpisode {
|
||||
/* 0000 */ std::string name;
|
||||
/* 0018 */ int order;
|
||||
/* 001C */ int unknown_001C;
|
||||
/* 0020 */ std::vector<std::string> values;
|
||||
};
|
||||
|
||||
struct AdventureGuideContents {
|
||||
/* 0000 */ std::uint8_t unknown_0000;
|
||||
/* 0004 */ int unknown_0004;
|
||||
/* 0008 */ int unknown_0008;
|
||||
/* 000C */ int unknown_000C;
|
||||
/* 0010 */ std::string first;
|
||||
/* 0028 */ std::string second;
|
||||
/* 0040 */ std::vector<std::string> values;
|
||||
};
|
||||
|
||||
struct AdventureGuideEntry {
|
||||
/* 0000 */ std::uint8_t unknown_0000;
|
||||
/* 0001 */ std::uint8_t unknown_0001;
|
||||
/* 0002 */ std::uint8_t unknown_0002;
|
||||
/* 0004 */ int unknown_0004;
|
||||
/* 0008 */ int unknown_0008;
|
||||
/* 000C */ std::string text;
|
||||
/* 0024 */ std::vector<std::string> values;
|
||||
};
|
||||
|
||||
// VTABLE: vt_00350
|
||||
class CAdventureGuideMgr {
|
||||
public:
|
||||
static void Destroy();
|
||||
|
||||
/* 0004 */ CLuaInstance m_lua;
|
||||
/* 000C */ std::map<int, AdventureGuideIntro> m_intros;
|
||||
/* 0014 */ std::string unknown_0014;
|
||||
/* 002C */ std::map<int, AdventureGuideText> unknown_002C;
|
||||
/* 0034 */ std::list<AdventureGuideEpisode> m_episodes;
|
||||
/* 003C */ std::map<int, std::map<int, AdventureGuideContents>> unknown_003C;
|
||||
/* 0044 */ std::map<int, std::map<int, AdventureGuideContents>> unknown_0044;
|
||||
/* 004C */ std::map<int, std::map<int, AdventureGuideContents>> unknown_004C;
|
||||
/* 0054 */ std::map<int, std::map<int, AdventureGuideEntry>> unknown_0054;
|
||||
/* 005C */ std::map<int, std::map<int, AdventureGuideEntry>> unknown_005C;
|
||||
/* 0064 */ bool m_initialized;
|
||||
|
||||
CAdventureGuideMgr();
|
||||
virtual ~CAdventureGuideMgr();
|
||||
};
|
||||
|
||||
extern CAdventureGuideMgr* g_adventureGuideMgr;
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(sizeof(AdventureGuideDetail) == 0x24);
|
||||
static_assert(sizeof(AdventureGuideIntro) == 0x3C);
|
||||
static_assert(offsetof(AdventureGuideIntro, details) == 0x34);
|
||||
static_assert(sizeof(AdventureGuideText) == 0x30);
|
||||
static_assert(sizeof(AdventureGuideEpisode) == 0x2C);
|
||||
static_assert(offsetof(AdventureGuideEpisode, order) == 0x18);
|
||||
static_assert(offsetof(AdventureGuideEpisode, values) == 0x20);
|
||||
static_assert(sizeof(AdventureGuideContents) == 0x4C);
|
||||
static_assert(offsetof(AdventureGuideContents, values) == 0x40);
|
||||
static_assert(sizeof(AdventureGuideEntry) == 0x30);
|
||||
static_assert(offsetof(AdventureGuideEntry, text) == 0xC);
|
||||
static_assert(offsetof(AdventureGuideEntry, values) == 0x24);
|
||||
static_assert(offsetof(CAdventureGuideMgr, m_lua) == 0x4);
|
||||
static_assert(offsetof(CAdventureGuideMgr, m_intros) == 0xC);
|
||||
static_assert(offsetof(CAdventureGuideMgr, unknown_0014) == 0x14);
|
||||
static_assert(offsetof(CAdventureGuideMgr, unknown_002C) == 0x2C);
|
||||
static_assert(offsetof(CAdventureGuideMgr, m_episodes) == 0x34);
|
||||
static_assert(offsetof(CAdventureGuideMgr, unknown_003C) == 0x3C);
|
||||
static_assert(offsetof(CAdventureGuideMgr, unknown_0054) == 0x54);
|
||||
static_assert(offsetof(CAdventureGuideMgr, m_initialized) == 0x64);
|
||||
static_assert(sizeof(CAdventureGuideMgr) == 0x68);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -274,6 +274,7 @@
|
|||
"Source/Contents/Actors/RenderObject.cpp": 4,
|
||||
"Source/Contents/Actors/RenderObjectState.cpp": 4,
|
||||
"Source/Contents/Actors/SpriteDrawingPolicy.cpp": 4,
|
||||
"Source/Contents/AdventureGuideMgr.cpp": 4,
|
||||
"Source/Contents/Async/AsyncWorkMgr.cpp": 4,
|
||||
"Source/Contents/Async/AsyncWorkRecycleObjectPoolMgr.cpp": 4,
|
||||
"Source/Contents/Camera/CameraFrame.cpp": 3,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue