mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-25 06:44:59 +00:00
DiscIO: Make functions static
This commit is contained in:
parent
f8bf35e6f0
commit
1f7b2545b9
7 changed files with 14 additions and 12 deletions
|
@ -222,9 +222,9 @@ private:
|
||||||
std::vector<u8>* disc_header);
|
std::vector<u8>* disc_header);
|
||||||
|
|
||||||
// FST creation
|
// FST creation
|
||||||
void WriteEntryData(std::vector<u8>* fst_data, u32* entry_offset, u8 type, u32 name_offset,
|
static void WriteEntryData(std::vector<u8>* fst_data, u32* entry_offset, u8 type, u32 name_offset,
|
||||||
u64 data_offset, u64 length, u32 address_shift);
|
u64 data_offset, u64 length, u32 address_shift);
|
||||||
void WriteEntryName(std::vector<u8>* fst_data, u32* name_offset, const std::string& name,
|
static void WriteEntryName(std::vector<u8>* fst_data, u32* name_offset, const std::string& name,
|
||||||
u64 name_table_offset);
|
u64 name_table_offset);
|
||||||
void WriteDirectory(std::vector<u8>* fst_data, std::vector<FSTBuilderNode>* parent_entries,
|
void WriteDirectory(std::vector<u8>* fst_data, std::vector<FSTBuilderNode>* parent_entries,
|
||||||
u32* fst_offset, u32* name_offset, u64* data_offset, u32 parent_entry_index,
|
u32* fst_offset, u32* name_offset, u64* data_offset, u32 parent_entry_index,
|
||||||
|
|
|
@ -39,8 +39,10 @@ private:
|
||||||
void MarkAsUsed(u64 offset, u64 size);
|
void MarkAsUsed(u64 offset, u64 size);
|
||||||
void MarkAsUsedE(u64 partition_data_offset, u64 offset, u64 size);
|
void MarkAsUsedE(u64 partition_data_offset, u64 offset, u64 size);
|
||||||
u64 ToClusterOffset(u64 offset) const;
|
u64 ToClusterOffset(u64 offset) const;
|
||||||
bool ReadFromVolume(const Volume& disc, u64 offset, u32& buffer, const Partition& partition);
|
static bool ReadFromVolume(const Volume& disc, u64 offset, u32& buffer,
|
||||||
bool ReadFromVolume(const Volume& disc, u64 offset, u64& buffer, const Partition& partition);
|
const Partition& partition);
|
||||||
|
static bool ReadFromVolume(const Volume& disc, u64 offset, u64& buffer,
|
||||||
|
const Partition& partition);
|
||||||
bool ParseDisc(const Volume& disc);
|
bool ParseDisc(const Volume& disc);
|
||||||
bool ParsePartitionData(const Volume& disc, const Partition& partition);
|
bool ParsePartitionData(const Volume& disc, const Partition& partition);
|
||||||
void ParseFileSystemData(u64 partition_data_offset, const FileInfo& directory);
|
void ParseFileSystemData(u64 partition_data_offset, const FileInfo& directory);
|
||||||
|
|
|
@ -305,7 +305,7 @@ std::unique_ptr<FileInfo> FileSystemGCWii::FindFileInfo(std::string_view path) c
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<FileInfo> FileSystemGCWii::FindFileInfo(std::string_view path,
|
std::unique_ptr<FileInfo> FileSystemGCWii::FindFileInfo(std::string_view path,
|
||||||
const FileInfo& file_info) const
|
const FileInfo& file_info)
|
||||||
{
|
{
|
||||||
// Given a path like "directory1/directory2/fileA.bin", this function will
|
// Given a path like "directory1/directory2/fileA.bin", this function will
|
||||||
// find directory1 and then call itself to search for "directory2/fileA.bin".
|
// find directory1 and then call itself to search for "directory2/fileA.bin".
|
||||||
|
|
|
@ -102,7 +102,7 @@ private:
|
||||||
// Maps the end offset of files to FST indexes
|
// Maps the end offset of files to FST indexes
|
||||||
mutable std::map<u64, u32> m_offset_file_info_cache;
|
mutable std::map<u64, u32> m_offset_file_info_cache;
|
||||||
|
|
||||||
std::unique_ptr<FileInfo> FindFileInfo(std::string_view path, const FileInfo& file_info) const;
|
static std::unique_ptr<FileInfo> FindFileInfo(std::string_view path, const FileInfo& file_info);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace DiscIO
|
} // namespace DiscIO
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
private:
|
private:
|
||||||
bool ReadNANDBin(const std::string& path_to_bin, std::function<std::string()> get_otp_dump_path);
|
bool ReadNANDBin(const std::string& path_to_bin, std::function<std::string()> get_otp_dump_path);
|
||||||
bool FindSuperblock();
|
bool FindSuperblock();
|
||||||
std::string GetPath(const NANDFSTEntry& entry, const std::string& parent_path);
|
static std::string GetPath(const NANDFSTEntry& entry, const std::string& parent_path);
|
||||||
std::string FormatDebugString(const NANDFSTEntry& entry);
|
std::string FormatDebugString(const NANDFSTEntry& entry);
|
||||||
void ProcessEntry(u16 entry_number, const std::string& parent_path);
|
void ProcessEntry(u16 entry_number, const std::string& parent_path);
|
||||||
std::vector<u8> GetEntryData(const NANDFSTEntry& entry);
|
std::vector<u8> GetEntryData(const NANDFSTEntry& entry);
|
||||||
|
@ -84,7 +84,7 @@ private:
|
||||||
template <>
|
template <>
|
||||||
struct fmt::formatter<DiscIO::NANDImporter::NANDFSTEntry>
|
struct fmt::formatter<DiscIO::NANDImporter::NANDFSTEntry>
|
||||||
{
|
{
|
||||||
constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
|
static constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const DiscIO::NANDImporter::NANDFSTEntry& entry, FormatContext& ctx) const
|
auto format(const DiscIO::NANDImporter::NANDFSTEntry& entry, FormatContext& ctx) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ Country VolumeDisc::GetCountry(const Partition& partition) const
|
||||||
return CountryCodeToCountry(country_byte, GetVolumeType(), region, revision);
|
return CountryCodeToCountry(country_byte, GetVolumeType(), region, revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
Region VolumeDisc::RegionCodeToRegion(std::optional<u32> region_code) const
|
Region VolumeDisc::RegionCodeToRegion(std::optional<u32> region_code)
|
||||||
{
|
{
|
||||||
if (!region_code)
|
if (!region_code)
|
||||||
return Region::Unknown;
|
return Region::Unknown;
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
bool IsNKit() const override;
|
bool IsNKit() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Region RegionCodeToRegion(std::optional<u32> region_code) const;
|
static Region RegionCodeToRegion(std::optional<u32> region_code);
|
||||||
void AddGamePartitionToSyncHash(Common::SHA1::Context* context) const;
|
void AddGamePartitionToSyncHash(Common::SHA1::Context* context) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue