2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 19:44:55 +00:00

Tons of save-related fixes

This commit is contained in:
Jack Andersen
2017-02-07 20:48:43 -10:00
parent 356788fb9e
commit b8613d61f8
17 changed files with 219 additions and 95 deletions

View File

@@ -22,7 +22,17 @@ public:
bool xb_compressed;
};
private:
bool x28_b24_ctFlag;
union
{
struct
{
bool x28_24_samusPak;
bool x28_25_aramFile;
bool x28_26_worldPak;
bool x28_27_worldPakInitialized;
};
u32 _dummy = 0;
};
enum class EAsyncPhase
{
Warmup = 0,
@@ -35,41 +45,16 @@ private:
std::vector<u32> x5c_depList;
std::vector<std::pair<u32, SResInfo>> x6c_resList;
public:
CPakFile(const std::string& filename, bool flag) : CDvdFile(filename.c_str()) {}
const std::vector<u32>& GetDepList() const {return x5c_depList;}
const SObjectTag* GetResIdByName(const char* name) const
{
for (const std::pair<std::string, SObjectTag>& p : x4c_nameList)
if (!CStringExtras::CompareCaseInsensitive(p.first.c_str(), name))
return &p.second;
return nullptr;
}
const SResInfo* GetResInfoForLoad(u32 id) {return nullptr;}
const SResInfo* GetResInfo(u32 id) const {return nullptr;}
u32 GetFakeStaticSize() const {return 0;}
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; }
void DataLoad() {}
void InitialHeaderLoad() {}
void Warmup() {}
void AsyncIdle()
{
if (x2c_asyncLoadPhase == EAsyncPhase::Loaded)
return;
if (x34_dvdReq && x34_dvdReq->IsComplete())
return;
switch (x2c_asyncLoadPhase)
{
case EAsyncPhase::Warmup:
Warmup();
break;
case EAsyncPhase::InitialHeader:
InitialHeaderLoad();
break;
case EAsyncPhase::DataLoad:
DataLoad();
break;
default: break;
}
}
void AsyncIdle();
};
}