2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CPAKFILE_HPP__
|
|
|
|
#define __URDE_CPAKFILE_HPP__
|
2015-08-23 06:42:29 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "CStringExtras.hpp"
|
|
|
|
#include "CDvdFile.hpp"
|
|
|
|
#include "CDvdRequest.hpp"
|
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-23 06:42:29 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
class CPakFile : public CDvdFile
|
|
|
|
{
|
|
|
|
friend class CResLoader;
|
|
|
|
public:
|
|
|
|
struct SResInfo
|
|
|
|
{
|
2015-08-23 23:58:07 +00:00
|
|
|
FourCC x0_type;
|
|
|
|
u32 x4_offset;
|
|
|
|
u32 x8_size;
|
|
|
|
bool xb_compressed;
|
2015-08-23 06:42:29 +00:00
|
|
|
};
|
|
|
|
private:
|
2017-02-08 06:48:43 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x28_24_samusPak;
|
|
|
|
bool x28_25_aramFile;
|
|
|
|
bool x28_26_worldPak;
|
|
|
|
bool x28_27_worldPakInitialized;
|
|
|
|
};
|
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class EAsyncPhase
|
2015-08-23 06:42:29 +00:00
|
|
|
{
|
2015-11-21 01:16:07 +00:00
|
|
|
Warmup = 0,
|
|
|
|
InitialHeader = 1,
|
|
|
|
DataLoad = 2,
|
|
|
|
Loaded = 3
|
2015-08-23 06:42:29 +00:00
|
|
|
} x2c_asyncLoadPhase;
|
2015-10-29 07:52:15 +00:00
|
|
|
IDvdRequest* x34_dvdReq;
|
2015-08-23 06:42:29 +00:00
|
|
|
std::vector<std::pair<std::string, SObjectTag>> x4c_nameList;
|
|
|
|
std::vector<u32> x5c_depList;
|
|
|
|
std::vector<std::pair<u32, SResInfo>> x6c_resList;
|
|
|
|
public:
|
2017-02-08 06:48:43 +00:00
|
|
|
CPakFile(const std::string& filename, bool samusPak, bool worldPak);
|
|
|
|
const std::vector<u32>& GetDepList() const { return x5c_depList; }
|
|
|
|
const SObjectTag* GetResIdByName(const char* name) const;
|
|
|
|
const SResInfo* GetResInfoForLoad(u32 id) { return nullptr; }
|
|
|
|
const SResInfo* GetResInfo(u32 id) const { return nullptr; }
|
|
|
|
u32 GetFakeStaticSize() const { return 0; }
|
2015-08-25 07:04:50 +00:00
|
|
|
void DataLoad() {}
|
|
|
|
void InitialHeaderLoad() {}
|
|
|
|
void Warmup() {}
|
2017-02-08 06:48:43 +00:00
|
|
|
void AsyncIdle();
|
2015-08-23 06:42:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CPAKFILE_HPP__
|