DirectoryBlob: Use DiscContent for ReadNonPartition too

ReadPartition and ReadNonPartition are now unified into
ReadInternal, with a parameter controlling whether
the read is in a partition or not.
This commit is contained in:
JosJuice
2017-06-08 18:43:52 +02:00
parent a0fa350ca6
commit 3f9eec9ae4
2 changed files with 20 additions and 63 deletions

View File

@ -75,8 +75,7 @@ public:
private:
DirectoryBlobReader(File::IOFile dol_file, const std::string& root_directory);
bool ReadPartition(u64 offset, u64 length, u8* buffer);
bool ReadNonPartition(u64 offset, u64 length, u8* buffer);
bool ReadInternal(u64 offset, u64 length, u8* buffer, const std::set<DiscContent>& contents);
void SetDiskTypeWii();
void SetDiskTypeGC();
@ -89,10 +88,6 @@ private:
void BuildFST();
// writing to read buffer
void WriteToBuffer(u64 source_start_address, u64 source_length, const u8* source, u64* address,
u64* length, u8** buffer) const;
void PadToAddress(u64 start_address, u64* address, u64* length, u8** buffer) const;
void Write32(u32 data, u32 offset, std::vector<u8>* const buffer);
@ -107,6 +102,7 @@ private:
std::string m_root_directory;
std::set<DiscContent> m_virtual_disc;
std::set<DiscContent> m_nonpartition_contents;
bool m_is_wii = false;