Decompile fn_12400 (CTipOfTheDay::Size)
Batch #1884 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_12400 CTipOfTheDay::Size: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Contents/TipOfTheDay.cpp
This commit is contained in:
parent
5e2fac0539
commit
3898d6613a
3 changed files with 56 additions and 0 deletions
27
Source/Contents/TipOfTheDay.cpp
Normal file
27
Source/Contents/TipOfTheDay.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#include "Contents/TipOfTheDay.h"
|
||||||
|
#include "Client/Input/InputCharset.h"
|
||||||
|
#include "Contents/Configuration/ServiceConfiguration.h"
|
||||||
|
#include "File/File.h"
|
||||||
|
#include "File/ResourcePath.h"
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
|
// GLOBAL: gl_24741
|
||||||
|
CTipOfTheDay g_tipOfTheDay;
|
||||||
|
|
||||||
|
// GLOBAL: gl_24740
|
||||||
|
bool g_tipOfTheDayEnglish;
|
||||||
|
|
||||||
|
// OFFSET: 0x00AE7760
|
||||||
|
|
||||||
|
// OFFSET: 0x00909CF0
|
||||||
|
// FUNCTION: fn_12400
|
||||||
|
int CTipOfTheDay::Size() {
|
||||||
|
if (this->m_bTryLoading == false) {
|
||||||
|
this->Load();
|
||||||
|
}
|
||||||
|
|
||||||
|
return static_cast<int>(this->m_tipList.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00AE7710
|
||||||
28
Source/Contents/TipOfTheDay.h
Normal file
28
Source/Contents/TipOfTheDay.h
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef RAGNAROK_SOURCE_CONTENTS_TIPOFTHEDAY_H
|
||||||
|
#define RAGNAROK_SOURCE_CONTENTS_TIPOFTHEDAY_H
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
using StringList = std::vector<std::string>;
|
||||||
|
|
||||||
|
class CTipOfTheDay {
|
||||||
|
public:
|
||||||
|
int Load();
|
||||||
|
int Size();
|
||||||
|
StringList& GetTip(int index);
|
||||||
|
|
||||||
|
/* 0000 */ bool m_bTryLoading = false;
|
||||||
|
/* 0004 */ std::vector<StringList> m_tipList;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern CTipOfTheDay g_tipOfTheDay;
|
||||||
|
extern bool g_tipOfTheDayEnglish;
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(_WIN64)
|
||||||
|
static_assert(sizeof(CTipOfTheDay) == 0x10);
|
||||||
|
static_assert(offsetof(CTipOfTheDay, m_tipList) == 0x4);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -436,6 +436,7 @@
|
||||||
"Source/Contents/Store/StoreBackupData.cpp": 4,
|
"Source/Contents/Store/StoreBackupData.cpp": 4,
|
||||||
"Source/Contents/TerrainPathSearch.cpp": 4,
|
"Source/Contents/TerrainPathSearch.cpp": 4,
|
||||||
"Source/Contents/TipBoxTitles.cpp": 4,
|
"Source/Contents/TipBoxTitles.cpp": 4,
|
||||||
|
"Source/Contents/TipOfTheDay.cpp": 4,
|
||||||
"Source/Contents/UserData/AccountLinkedUserDataLoadAsyncWork.cpp": 4,
|
"Source/Contents/UserData/AccountLinkedUserDataLoadAsyncWork.cpp": 4,
|
||||||
"Source/Contents/UserData/AccountLinkedUserDataMgr.cpp": 4,
|
"Source/Contents/UserData/AccountLinkedUserDataMgr.cpp": 4,
|
||||||
"Source/Contents/UserData/AccountLinkedUserDataSaveAsyncWork.cpp": 4,
|
"Source/Contents/UserData/AccountLinkedUserDataSaveAsyncWork.cpp": 4,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue