2022-04-10 00:17:06 +00:00
|
|
|
#ifndef _CRESLOADER_HPP
|
|
|
|
#define _CRESLOADER_HPP
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "rstl/list.hpp"
|
|
|
|
#include "rstl/string.hpp"
|
|
|
|
|
2022-07-18 22:42:58 +00:00
|
|
|
#include "IObjectStore.hpp"
|
2022-04-10 00:17:06 +00:00
|
|
|
|
2022-04-11 22:42:08 +00:00
|
|
|
class CPakFile;
|
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
struct SResInfo {
|
|
|
|
CAssetId x0_id;
|
|
|
|
bool x4_compressed : 1;
|
|
|
|
int x4_typeIdx; // CFactoryMgr::ETypeTable
|
|
|
|
u32 x5_offsetDiv32 : 27;
|
|
|
|
u32 x7_sizeDiv32 : 27;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CResLoader {
|
|
|
|
public:
|
2022-04-11 22:42:08 +00:00
|
|
|
s32 GetPakCount() const;
|
|
|
|
CPakFile& GetPakFile(int idx) const;
|
|
|
|
void AddPakFileAsync(const rstl::string&, bool, bool);
|
2022-04-10 00:17:06 +00:00
|
|
|
void AsyncIdlePakLoading();
|
|
|
|
bool AreAllPaksLoaded() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
rstl::list< void > x0_aramList;
|
|
|
|
rstl::list< void > x18_pakLoadedList;
|
|
|
|
rstl::list< void > x30_pakLoadingList;
|
|
|
|
unkptr x48_curPak;
|
|
|
|
CAssetId x4c_cachedResId;
|
|
|
|
SResInfo* x50_cachedResInfo;
|
|
|
|
bool x54_forwardSeek;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|