Decompile fn_23491 (CSession::LoadExceptionMinimapNameTable)
Batch #7837 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_23491 CSession::LoadExceptionMinimapNameTable: logic confirmed by peer review Peer-reviewed-by: Yommy, Snow Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
b7102fdc6e
commit
824c188f5f
3 changed files with 50 additions and 0 deletions
|
|
@ -3,7 +3,9 @@
|
|||
#include "Contents/Configuration/ServiceConfiguration.h"
|
||||
#include "Contents/MapInfoMgr.h"
|
||||
#include "Contents/NavigationManager.h"
|
||||
#include "File/CommonObject.h"
|
||||
#include "File/File.h"
|
||||
#include "Resource/Bitmap/BitmapResource.h"
|
||||
#include "Script/LuaScript.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
|
|
@ -52,6 +54,31 @@ private:
|
|||
bool m_encrypted;
|
||||
};
|
||||
|
||||
class TableBytes : public ResourceBytes {
|
||||
public:
|
||||
CFile file;
|
||||
|
||||
// INLINED
|
||||
bool Open(const char* name) override {
|
||||
return this->file.Open(name, 0, true, false);
|
||||
}
|
||||
|
||||
// INLINED
|
||||
const void* Data() const override {
|
||||
return this->file.GetData();
|
||||
}
|
||||
|
||||
// INLINED
|
||||
int Size() const override {
|
||||
return static_cast<int>(this->file.GetSize());
|
||||
}
|
||||
|
||||
// INLINED
|
||||
void Close() override {
|
||||
this->file.Close();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
struct NaviUnknownBlock {
|
||||
|
|
@ -98,6 +125,8 @@ CNavi_Object::CNavi_Object(int type, int index, const char* name, const char* ti
|
|||
this->info = info;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B8C520
|
||||
|
||||
// OFFSET: 0x00B8C2B0
|
||||
// FUNCTION: fn_19422
|
||||
CNavi_Link::CNavi_Link(
|
||||
|
|
@ -777,6 +806,25 @@ void CSession::LoadDamageSkinSettings() {
|
|||
g_luaScript->Call("GetDamageMillionUnit", "d>d", this->m_damageSkinIndex, &this->m_damageMillionUnit);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DE53C0
|
||||
// FUNCTION: fn_23491
|
||||
bool CSession::LoadExceptionMinimapNameTable() {
|
||||
std::vector<char*> tokens;
|
||||
this->m_navigationForbiddenMaps.clear();
|
||||
this->m_navigationForbiddenMaps.reserve(512);
|
||||
|
||||
CCommonObject& storage = reinterpret_cast<CCommonObject&>(this->unknown_5400[0x30]);
|
||||
TableBytes file;
|
||||
const bool loaded = storage.LoadTokens(tokens, "ExceptionMinimapNameTable.txt", 0, file);
|
||||
|
||||
for (char* token : tokens) {
|
||||
this->m_navigationForbiddenMaps.push_back(std::string(token));
|
||||
}
|
||||
|
||||
std::sort(this->m_navigationForbiddenMaps.begin(), this->m_navigationForbiddenMaps.end(), std::less<std::string>());
|
||||
return loaded;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DE5620
|
||||
// FUNCTION: fn_23492
|
||||
bool CSession::LoadFogParameters() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue