2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CRESLOADER
|
|
|
|
#define _CRESLOADER
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#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-10 00:17:06 +00:00
|
|
|
|
2022-04-11 22:42:08 +00:00
|
|
|
class CPakFile;
|
2023-07-30 19:18:25 +00:00
|
|
|
class CARAMDvdRequest;
|
2022-04-11 22:42:08 +00:00
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
struct SResInfo {
|
|
|
|
CAssetId x0_id;
|
|
|
|
bool x4_compressed : 1;
|
|
|
|
int x4_typeIdx; // CFactoryMgr::ETypeTable
|
2022-09-05 04:01:13 +00:00
|
|
|
uint x5_offsetDiv32 : 27;
|
|
|
|
uint x7_sizeDiv32 : 27;
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CResLoader {
|
|
|
|
public:
|
2022-09-05 04:01:13 +00:00
|
|
|
int GetPakCount() const;
|
2022-04-11 22:42:08 +00:00
|
|
|
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;
|
2022-09-14 05:24:12 +00:00
|
|
|
CInputStream* LoadNewResourceSync(const SObjectTag& tag, char* extBuf);
|
2023-07-31 15:58:47 +00:00
|
|
|
CInputStream* LoadNewResourceSync(const SObjectTag& tag, int, int, char* extBuf);
|
2023-07-31 13:35:09 +00:00
|
|
|
CARAMDvdRequest* LoadResourcePartAsync(const SObjectTag& tag, int, int, char*);
|
2023-07-30 19:18:25 +00:00
|
|
|
|
2022-11-08 23:04:51 +00:00
|
|
|
FourCC GetResourceTypeById(CAssetId) const;
|
2022-12-05 15:43:31 +00:00
|
|
|
uint ResourceSize(const SObjectTag& tag) const;
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
private:
|
2022-10-19 03:35:06 +00:00
|
|
|
rstl::list< unkptr > x0_aramList;
|
|
|
|
rstl::list< unkptr > x18_pakLoadedList;
|
|
|
|
rstl::list< unkptr > x30_pakLoadingList;
|
2022-04-10 00:17:06 +00:00
|
|
|
unkptr x48_curPak;
|
|
|
|
CAssetId x4c_cachedResId;
|
|
|
|
SResInfo* x50_cachedResInfo;
|
|
|
|
bool x54_forwardSeek;
|
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CRESLOADER
|