[ExtSaveData] More work
This commit is contained in:
@@ -2,13 +2,25 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
bool ExtSaveDataArchive::openFile(const FSPath& path) {
|
bool ExtSaveDataArchive::openFile(const FSPath& path) {
|
||||||
|
if (path.type != PathType::Binary) {
|
||||||
|
Helpers::panic("ExtSaveData accessed with a non-binary path in OpenFile. Type: %d", path.type);
|
||||||
|
}
|
||||||
|
|
||||||
Helpers::panic("ExtSaveDataArchive::OpenFile: Failed");
|
Helpers::panic("ExtSaveDataArchive::OpenFile: Failed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArchiveBase* ExtSaveDataArchive::openArchive(const FSPath& path) {
|
ArchiveBase* ExtSaveDataArchive::openArchive(const FSPath& path) {
|
||||||
Helpers::panic("ExtSaveDataArchive::OpenArchive: Failed. Path type: %d", path.type);
|
if (path.type != PathType::Binary || path.size != 12) {
|
||||||
return nullptr;
|
Helpers::panic("ExtSaveData accessed with an invalid path in OpenArchive");
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 mediaType = mem.read32(path.pointer);
|
||||||
|
u64 saveID = mem.read64(path.pointer + 4);
|
||||||
|
|
||||||
|
Helpers::panic("ExtSaveData: media type = %d\n", mediaType);
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<u32> ExtSaveDataArchive::readFile(FileSession* file, u64 offset, u32 size, u32 dataPointer) {
|
std::optional<u32> ExtSaveDataArchive::readFile(FileSession* file, u64 offset, u32 size, u32 dataPointer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user