DiscIO: Add parameters to BlobReader::SupportsReadWiiDecrypted

It's possible (but rare) for a WIA or RVZ file to support
this for some partitions but not all, and for the game and
the blob code to disagree on how large a partition is.
This commit is contained in:
JosJuice
2020-08-29 15:12:02 +02:00
parent 800b2480ec
commit 047bb80337
7 changed files with 72 additions and 34 deletions

View File

@ -59,7 +59,7 @@ public:
std::string GetCompressionMethod() const override;
bool Read(u64 offset, u64 size, u8* out_ptr) override;
bool SupportsReadWiiDecrypted() const override;
bool SupportsReadWiiDecrypted(u64 offset, u64 size, u64 partition_data_offset) const override;
bool ReadWiiDecrypted(u64 offset, u64 size, u8* out_ptr, u64 partition_data_offset) override;
static ConversionResultCode Convert(BlobReader* infile, const VolumeDisc* infile_volume,
@ -224,6 +224,8 @@ private:
bool Initialize(const std::string& path);
bool HasDataOverlap() const;
const PartitionEntry* GetPartition(u64 partition_data_offset, u32* partition_first_sector) const;
bool ReadFromGroups(u64* offset, u64* size, u8** out_ptr, u64 chunk_size, u32 sector_size,
u64 data_offset, u64 data_size, u32 group_index, u32 number_of_groups,
u32 exception_lists);