prime/include/Kyoto/CResLoader.hpp

41 lines
879 B
C++
Raw Normal View History

#ifndef _CRESLOADER
#define _CRESLOADER
#include "types.h"
#include "rstl/list.hpp"
#include "rstl/string.hpp"
2022-08-09 23:03:51 +00:00
#include "Kyoto/IObjectStore.hpp"
2022-04-11 22:42:08 +00:00
class CPakFile;
struct SResInfo {
CAssetId x0_id;
bool x4_compressed : 1;
int x4_typeIdx; // CFactoryMgr::ETypeTable
uint x5_offsetDiv32 : 27;
uint x7_sizeDiv32 : 27;
};
class CResLoader {
public:
int GetPakCount() const;
2022-04-11 22:42:08 +00:00
CPakFile& GetPakFile(int idx) const;
void AddPakFileAsync(const rstl::string&, bool, bool);
void AsyncIdlePakLoading();
bool AreAllPaksLoaded() const;
2022-09-14 05:24:12 +00:00
CInputStream* LoadNewResourceSync(const SObjectTag& tag, char* extBuf);
private:
rstl::list< unkptr > x0_aramList;
rstl::list< unkptr > x18_pakLoadedList;
rstl::list< unkptr > x30_pakLoadingList;
unkptr x48_curPak;
CAssetId x4c_cachedResId;
SResInfo* x50_cachedResInfo;
bool x54_forwardSeek;
};
#endif // _CRESLOADER