mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DiscIO: Remove C/I/S prefixes from class names
These prefixes were inconsistent with the rest of Dolphin.
I'm also renaming VolumeWiiCrypted to VolumeWii because of 1113b13
.
This commit is contained in:
@ -24,16 +24,16 @@
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
CVolumeGC::CVolumeGC(std::unique_ptr<IBlobReader> reader) : m_pReader(std::move(reader))
|
||||
VolumeGC::VolumeGC(std::unique_ptr<BlobReader> reader) : m_pReader(std::move(reader))
|
||||
{
|
||||
_assert_(m_pReader);
|
||||
}
|
||||
|
||||
CVolumeGC::~CVolumeGC()
|
||||
VolumeGC::~VolumeGC()
|
||||
{
|
||||
}
|
||||
|
||||
bool CVolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer, const Partition& partition) const
|
||||
bool VolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer, const Partition& partition) const
|
||||
{
|
||||
if (partition != PARTITION_NONE)
|
||||
return false;
|
||||
@ -41,7 +41,7 @@ bool CVolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer, const Partition& pa
|
||||
return m_pReader->Read(_Offset, _Length, _pBuffer);
|
||||
}
|
||||
|
||||
std::string CVolumeGC::GetGameID(const Partition& partition) const
|
||||
std::string VolumeGC::GetGameID(const Partition& partition) const
|
||||
{
|
||||
static const std::string NO_UID("NO_UID");
|
||||
|
||||
@ -56,19 +56,19 @@ std::string CVolumeGC::GetGameID(const Partition& partition) const
|
||||
return DecodeString(ID);
|
||||
}
|
||||
|
||||
Region CVolumeGC::GetRegion() const
|
||||
Region VolumeGC::GetRegion() const
|
||||
{
|
||||
const std::optional<u8> country_code = ReadSwapped<u8>(3, PARTITION_NONE);
|
||||
return country_code ? RegionSwitchGC(*country_code) : Region::UNKNOWN_REGION;
|
||||
}
|
||||
|
||||
Country CVolumeGC::GetCountry(const Partition& partition) const
|
||||
Country VolumeGC::GetCountry(const Partition& partition) const
|
||||
{
|
||||
const std::optional<u8> country_code = ReadSwapped<u8>(3, partition);
|
||||
return country_code ? CountrySwitch(*country_code) : Country::COUNTRY_UNKNOWN;
|
||||
}
|
||||
|
||||
std::string CVolumeGC::GetMakerID(const Partition& partition) const
|
||||
std::string VolumeGC::GetMakerID(const Partition& partition) const
|
||||
{
|
||||
char makerID[2];
|
||||
if (!Read(0x4, 0x2, (u8*)&makerID, partition))
|
||||
@ -77,13 +77,13 @@ std::string CVolumeGC::GetMakerID(const Partition& partition) const
|
||||
return DecodeString(makerID);
|
||||
}
|
||||
|
||||
std::optional<u16> CVolumeGC::GetRevision(const Partition& partition) const
|
||||
std::optional<u16> VolumeGC::GetRevision(const Partition& partition) const
|
||||
{
|
||||
std::optional<u8> revision = ReadSwapped<u8>(7, partition);
|
||||
return revision ? *revision : std::optional<u16>();
|
||||
}
|
||||
|
||||
std::string CVolumeGC::GetInternalName(const Partition& partition) const
|
||||
std::string VolumeGC::GetInternalName(const Partition& partition) const
|
||||
{
|
||||
char name[0x60];
|
||||
if (Read(0x20, 0x60, (u8*)name, partition))
|
||||
@ -92,37 +92,37 @@ std::string CVolumeGC::GetInternalName(const Partition& partition) const
|
||||
return "";
|
||||
}
|
||||
|
||||
std::map<Language, std::string> CVolumeGC::GetShortNames() const
|
||||
std::map<Language, std::string> VolumeGC::GetShortNames() const
|
||||
{
|
||||
LoadBannerFile();
|
||||
return m_short_names;
|
||||
}
|
||||
|
||||
std::map<Language, std::string> CVolumeGC::GetLongNames() const
|
||||
std::map<Language, std::string> VolumeGC::GetLongNames() const
|
||||
{
|
||||
LoadBannerFile();
|
||||
return m_long_names;
|
||||
}
|
||||
|
||||
std::map<Language, std::string> CVolumeGC::GetShortMakers() const
|
||||
std::map<Language, std::string> VolumeGC::GetShortMakers() const
|
||||
{
|
||||
LoadBannerFile();
|
||||
return m_short_makers;
|
||||
}
|
||||
|
||||
std::map<Language, std::string> CVolumeGC::GetLongMakers() const
|
||||
std::map<Language, std::string> VolumeGC::GetLongMakers() const
|
||||
{
|
||||
LoadBannerFile();
|
||||
return m_long_makers;
|
||||
}
|
||||
|
||||
std::map<Language, std::string> CVolumeGC::GetDescriptions() const
|
||||
std::map<Language, std::string> VolumeGC::GetDescriptions() const
|
||||
{
|
||||
LoadBannerFile();
|
||||
return m_descriptions;
|
||||
}
|
||||
|
||||
std::vector<u32> CVolumeGC::GetBanner(int* width, int* height) const
|
||||
std::vector<u32> VolumeGC::GetBanner(int* width, int* height) const
|
||||
{
|
||||
LoadBannerFile();
|
||||
*width = m_image_width;
|
||||
@ -130,7 +130,7 @@ std::vector<u32> CVolumeGC::GetBanner(int* width, int* height) const
|
||||
return m_image_buffer;
|
||||
}
|
||||
|
||||
std::string CVolumeGC::GetApploaderDate(const Partition& partition) const
|
||||
std::string VolumeGC::GetApploaderDate(const Partition& partition) const
|
||||
{
|
||||
char date[16];
|
||||
if (!Read(0x2440, 0x10, (u8*)&date, partition))
|
||||
@ -139,32 +139,32 @@ std::string CVolumeGC::GetApploaderDate(const Partition& partition) const
|
||||
return DecodeString(date);
|
||||
}
|
||||
|
||||
BlobType CVolumeGC::GetBlobType() const
|
||||
BlobType VolumeGC::GetBlobType() const
|
||||
{
|
||||
return m_pReader->GetBlobType();
|
||||
}
|
||||
|
||||
u64 CVolumeGC::GetSize() const
|
||||
u64 VolumeGC::GetSize() const
|
||||
{
|
||||
return m_pReader->GetDataSize();
|
||||
}
|
||||
|
||||
u64 CVolumeGC::GetRawSize() const
|
||||
u64 VolumeGC::GetRawSize() const
|
||||
{
|
||||
return m_pReader->GetRawSize();
|
||||
}
|
||||
|
||||
std::optional<u8> CVolumeGC::GetDiscNumber(const Partition& partition) const
|
||||
std::optional<u8> VolumeGC::GetDiscNumber(const Partition& partition) const
|
||||
{
|
||||
return ReadSwapped<u8>(6, partition);
|
||||
}
|
||||
|
||||
Platform CVolumeGC::GetVolumeType() const
|
||||
Platform VolumeGC::GetVolumeType() const
|
||||
{
|
||||
return Platform::GAMECUBE_DISC;
|
||||
}
|
||||
|
||||
void CVolumeGC::LoadBannerFile() const
|
||||
void VolumeGC::LoadBannerFile() const
|
||||
{
|
||||
// If opening.bnr has been loaded already, return immediately
|
||||
if (m_banner_loaded)
|
||||
@ -173,7 +173,7 @@ void CVolumeGC::LoadBannerFile() const
|
||||
m_banner_loaded = true;
|
||||
|
||||
GCBanner banner_file;
|
||||
std::unique_ptr<IFileSystem> file_system(CreateFileSystem(this, PARTITION_NONE));
|
||||
std::unique_ptr<FileSystem> file_system(CreateFileSystem(this, PARTITION_NONE));
|
||||
if (!file_system)
|
||||
return;
|
||||
|
||||
@ -206,7 +206,7 @@ void CVolumeGC::LoadBannerFile() const
|
||||
ExtractBannerInformation(banner_file, is_bnr1);
|
||||
}
|
||||
|
||||
void CVolumeGC::ExtractBannerInformation(const GCBanner& banner_file, bool is_bnr1) const
|
||||
void VolumeGC::ExtractBannerInformation(const GCBanner& banner_file, bool is_bnr1) const
|
||||
{
|
||||
u32 number_of_languages = 0;
|
||||
Language start_language = Language::LANGUAGE_UNKNOWN;
|
||||
|
Reference in New Issue
Block a user