rodecomp/Source/Archive/PakRegistry.h
ragnarok-clanker 32be070652 Confirm fn_18112 (PakRegistry::Read)
Batch #10808 by kyoshi: 0 byte-identical, 1 confirmed by peer review.

- fn_18112 PakRegistry::Read: logic confirmed by peer review (already on main)

Peer-reviewed-by: Toshiro, cremane, StrawberrysherbetIX
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-04 21:35:15 +00:00

30 lines
792 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);
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