DiscIO: Prefix class member variables with "m_"

This commit is contained in:
Lioncash
2014-09-01 15:48:02 -04:00
parent 5cc0bda3d5
commit 1977ea42ae
17 changed files with 211 additions and 202 deletions

View File

@ -19,16 +19,17 @@
namespace DiscIO
{
CVolumeWAD::CVolumeWAD(IBlobReader* _pReader)
: m_pReader(_pReader), OpeningBnrOffset(0), hdr_size(0), cert_size(0), tick_size(0), tmd_size(0), data_size(0)
: m_pReader(_pReader), m_opening_bnr_offset(0), m_hdr_size(0)
, m_cert_size(0), m_tick_size(0), m_tmd_size(0), m_data_size(0)
{
Read(0x00, 4, (u8*)&hdr_size);
Read(0x08, 4, (u8*)&cert_size);
Read(0x10, 4, (u8*)&tick_size);
Read(0x14, 4, (u8*)&tmd_size);
Read(0x18, 4, (u8*)&data_size);
Read(0x00, 4, (u8*)&m_hdr_size);
Read(0x08, 4, (u8*)&m_cert_size);
Read(0x10, 4, (u8*)&m_tick_size);
Read(0x14, 4, (u8*)&m_tmd_size);
Read(0x18, 4, (u8*)&m_data_size);
u32 TmdOffset = ALIGN_40(hdr_size) + ALIGN_40(cert_size) + ALIGN_40(tick_size);
OpeningBnrOffset = TmdOffset + ALIGN_40(tmd_size) + ALIGN_40(data_size);
u32 TmdOffset = ALIGN_40(m_hdr_size) + ALIGN_40(m_cert_size) + ALIGN_40(m_tick_size);
m_opening_bnr_offset = TmdOffset + ALIGN_40(m_tmd_size) + ALIGN_40(m_data_size);
// read the last digit of the titleID in the ticket
Read(TmdOffset + 0x0193, 1, &m_Country);
if (m_Country == 2) // SYSMENU
@ -62,7 +63,7 @@ IVolume::ECountry CVolumeWAD::GetCountry() const
std::string CVolumeWAD::GetUniqueID() const
{
std::string temp = GetMakerID();
u32 Offset = ALIGN_40(hdr_size) + ALIGN_40(cert_size);
u32 Offset = ALIGN_40(m_hdr_size) + ALIGN_40(m_cert_size);
char GameCode[8];
if (!Read(Offset + 0x01E0, 4, (u8*)GameCode))
@ -77,7 +78,7 @@ std::string CVolumeWAD::GetUniqueID() const
std::string CVolumeWAD::GetMakerID() const
{
u32 Offset = ALIGN_40(hdr_size) + ALIGN_40(cert_size) + ALIGN_40(tick_size);
u32 Offset = ALIGN_40(m_hdr_size) + ALIGN_40(m_cert_size) + ALIGN_40(m_tick_size);
char temp[3] = {1};
// Some weird channels use 0x0000 in place of the MakerID, so we need a check there
@ -91,7 +92,7 @@ std::string CVolumeWAD::GetMakerID() const
bool CVolumeWAD::GetTitleID(u8* _pBuffer) const
{
u32 Offset = ALIGN_40(hdr_size) + ALIGN_40(cert_size);
u32 Offset = ALIGN_40(m_hdr_size) + ALIGN_40(m_cert_size);
if (!Read(Offset + 0x01DC, 8, _pBuffer))
return false;
@ -119,7 +120,7 @@ std::vector<std::string> CVolumeWAD::GetNames() const
u16 temp[string_length];
if (footer_size < 0xF1 || !Read(0x9C + (i * bytes_length) + OpeningBnrOffset, bytes_length, (u8*)&temp))
if (footer_size < 0xF1 || !Read(0x9C + (i * bytes_length) + m_opening_bnr_offset, bytes_length, (u8*)&temp))
{
names.push_back("");
}