summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
diff options
context:
space:
mode:
authorStevoisiak <Stevoisiak@gmail.com>2014-11-13 21:28:27 -0500
committerStevoisiak <Stevoisiak@gmail.com>2014-11-13 22:42:18 -0500
commitb25e1a2eb4fd20ba84103549a59ea4c4a8639641 (patch)
tree565229c96867d4c595bcf64a94b704c825c2ea84 /Source/Core/DiscIO
parent5fb94230cd6fab9b41420d51e27cd04a64f3dcaf (diff)
Various formatting and consistency fixes
Diffstat (limited to 'Source/Core/DiscIO')
-rw-r--r--Source/Core/DiscIO/CompressedBlob.h2
-rw-r--r--Source/Core/DiscIO/DiscScrubber.h4
-rw-r--r--Source/Core/DiscIO/VolumeDirectory.h2
-rw-r--r--Source/Core/DiscIO/VolumeWiiCrypted.cpp31
-rw-r--r--Source/Core/DiscIO/WiiWad.cpp4
5 files changed, 8 insertions, 35 deletions
diff --git a/Source/Core/DiscIO/CompressedBlob.h b/Source/Core/DiscIO/CompressedBlob.h
index 4a11559937..6f9b7cca3a 100644
--- a/Source/Core/DiscIO/CompressedBlob.h
+++ b/Source/Core/DiscIO/CompressedBlob.h
@@ -36,7 +36,7 @@ const u32 kBlobCookie = 0xB10BC001;
struct CompressedBlobHeader // 32 bytes
{
u32 magic_cookie; //0xB10BB10B
- u32 sub_type; // gc image, whatever
+ u32 sub_type; // GC image, whatever
u64 compressed_data_size;
u64 data_size;
u32 block_size;
diff --git a/Source/Core/DiscIO/DiscScrubber.h b/Source/Core/DiscIO/DiscScrubber.h
index 360c684dc3..0e5943ae2e 100644
--- a/Source/Core/DiscIO/DiscScrubber.h
+++ b/Source/Core/DiscIO/DiscScrubber.h
@@ -3,10 +3,10 @@
// Refer to the license.txt file included.
-// DiscScrubber removes the garbage data from discs (currently wii only) which
+// DiscScrubber removes the garbage data from discs (currently Wii only) which
// is on the disc due to encryption
-// It could be adapted to gc discs, but the gain is most likely negligible,
+// It could be adapted to GameCube discs, but the gain is most likely negligible,
// and having 1:1 backups of discs is always nice when they are reasonably sized
// Note: the technique is inspired by Wiiscrubber, but much simpler - intentionally :)
diff --git a/Source/Core/DiscIO/VolumeDirectory.h b/Source/Core/DiscIO/VolumeDirectory.h
index 6cfcd90004..9e0c8ba74c 100644
--- a/Source/Core/DiscIO/VolumeDirectory.h
+++ b/Source/Core/DiscIO/VolumeDirectory.h
@@ -86,7 +86,7 @@ private:
u32 m_totalNameSize;
- // gc has no shift, wii has 2 bit shift
+ // GameCube has no shift, Wii has 2 bit shift
u32 m_addressShift;
// first address on disk containing file data
diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
index 32313dd4c2..73488bbb9c 100644
--- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp
+++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp
@@ -46,18 +46,15 @@ bool CVolumeWiiCrypted::RAWRead( u64 _Offset, u64 _Length, u8* _pBuffer ) const
// Medal Of Honor Heroes 2 read this DVD offset for PartitionsInfo
// and, PartitionsInfo is not encrypted, let's read it directly.
if (!m_pReader->Read(_Offset, _Length, _pBuffer))
- {
return(false);
- }
- return true;
+ else
+ return true;
}
bool CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer) const
{
if (m_pReader == nullptr)
- {
return(false);
- }
while (_Length > 0)
{
@@ -118,16 +115,12 @@ void CVolumeWiiCrypted::GetTMD(u8* _pBuffer, u32 * _sz) const
std::string CVolumeWiiCrypted::GetUniqueID() const
{
if (m_pReader == nullptr)
- {
return std::string();
- }
char ID[7];
if (!Read(0, 6, (u8*)ID))
- {
return std::string();
- }
ID[6] = '\0';
@@ -149,16 +142,12 @@ IVolume::ECountry CVolumeWiiCrypted::GetCountry() const
std::string CVolumeWiiCrypted::GetMakerID() const
{
if (m_pReader == nullptr)
- {
return std::string();
- }
char makerID[3];
if (!Read(0x4, 0x2, (u8*)&makerID))
- {
return std::string();
- }
makerID[2] = '\0';
@@ -181,16 +170,12 @@ std::vector<std::string> CVolumeWiiCrypted::GetNames() const
u32 CVolumeWiiCrypted::GetFSTSize() const
{
if (m_pReader == nullptr)
- {
return 0;
- }
u32 size;
if (!Read(0x428, 0x4, (u8*)&size))
- {
return 0;
- }
return size;
}
@@ -198,16 +183,12 @@ u32 CVolumeWiiCrypted::GetFSTSize() const
std::string CVolumeWiiCrypted::GetApploaderDate() const
{
if (m_pReader == nullptr)
- {
return std::string();
- }
char date[16];
if (!Read(0x2440, 0x10, (u8*)&date))
- {
return std::string();
- }
date[10] = '\0';
@@ -217,25 +198,17 @@ std::string CVolumeWiiCrypted::GetApploaderDate() const
u64 CVolumeWiiCrypted::GetSize() const
{
if (m_pReader)
- {
return m_pReader->GetDataSize();
- }
else
- {
return 0;
- }
}
u64 CVolumeWiiCrypted::GetRawSize() const
{
if (m_pReader)
- {
return m_pReader->GetRawSize();
- }
else
- {
return 0;
- }
}
bool CVolumeWiiCrypted::CheckIntegrity() const
diff --git a/Source/Core/DiscIO/WiiWad.cpp b/Source/Core/DiscIO/WiiWad.cpp
index 47e072c8fb..51ad67c627 100644
--- a/Source/Core/DiscIO/WiiWad.cpp
+++ b/Source/Core/DiscIO/WiiWad.cpp
@@ -62,7 +62,7 @@ u8* WiiWAD::CreateWADEntry(DiscIO::IBlobReader& _rReader, u32 _Size, u64 _Offset
if (_Size > 0)
{
u8* pTmpBuffer = new u8[_Size];
- _dbg_assert_msg_(BOOT, pTmpBuffer!=nullptr, "WiiWAD: Cant allocate memory for WAD entry");
+ _dbg_assert_msg_(BOOT, pTmpBuffer!=nullptr, "WiiWAD: Can't allocate memory for WAD entry");
if (!_rReader.Read(_Offset, _Size, pTmpBuffer))
{
@@ -123,7 +123,7 @@ bool WiiWAD::IsWiiWAD(const std::string& name)
CBlobBigEndianReader big_endian_reader(*blob_reader);
bool result = false;
- // check for wii wad
+ // check for Wii wad
if (big_endian_reader.Read32(0x00) == 0x20)
{
u32 wad_type = big_endian_reader.Read32(0x04);