Batch #11707 by cremane: 0 byte-identical, 3 confirmed by peer review. - fn_02596 MakeResourcePath: logic confirmed by peer review - fn_18113 PakRegistry::ReadLooseResource: logic confirmed by peer review - fn_18112 PakRegistry::Read: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev, kyoshi, Toshiro, StrawberrysherbetIX Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
31 lines
862 B
C++
31 lines
862 B
C++
#ifndef RAGNAROK_SOURCE_ARCHIVE_PAKREGISTRY_H
|
|
#define RAGNAROK_SOURCE_ARCHIVE_PAKREGISTRY_H
|
|
|
|
#include "Archive/GPak.h"
|
|
#include "Archive/MemMapPakFile.h"
|
|
|
|
#include <list>
|
|
#include <utility>
|
|
|
|
class PakRegistry {
|
|
public:
|
|
~PakRegistry();
|
|
bool Add(const char* filename);
|
|
bool Exists(const char* filename, bool looseOnly) const;
|
|
void* Read(const char* filename, std::uint32_t* size, int option = 0);
|
|
__declspec(noinline) void* ReadArchive(const char* filename, std::uint32_t* size);
|
|
void* ReadLooseResource(const char* filename, std::uint32_t* size);
|
|
BOOL Free(void* buffer);
|
|
void ApplyAuxiliary(const void* data, std::uint32_t size);
|
|
|
|
private:
|
|
/* 0000 */ std::list<std::pair<CMemMapPakFile*, CGPak*>> m_archives;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(PakRegistry) == 8);
|
|
#endif
|
|
|
|
extern PakRegistry g_pakRegistry;
|
|
|
|
#endif
|