Move DiscIO enums to a new file

At first there weren't many enums in Volume.h, but the number has been
growing, and I'm planning to add one more for regions. To not make
Volume.h too large, and to avoid needing to include Volume.h in code
that doesn't use volume objects, I'm moving the enums to a new file.
I'm also turning them into enum classes while I'm at it.
This commit is contained in:
JosJuice
2016-07-06 20:33:05 +02:00
parent baf9abe911
commit 0a15aaaa12
49 changed files with 665 additions and 574 deletions

View File

@ -16,6 +16,7 @@
#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Enums.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeWad.h"
@ -54,10 +55,10 @@ bool CVolumeWAD::Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt) cons
return m_pReader->Read(_Offset, _Length, _pBuffer);
}
IVolume::ECountry CVolumeWAD::GetCountry() const
Country CVolumeWAD::GetCountry() const
{
if (!m_pReader)
return COUNTRY_UNKNOWN;
return Country::COUNTRY_UNKNOWN;
// read the last digit of the titleID in the ticket
u8 country_code;
@ -114,16 +115,16 @@ u16 CVolumeWAD::GetRevision() const
return Common::swap16(revision);
}
IVolume::EPlatform CVolumeWAD::GetVolumeType() const
Platform CVolumeWAD::GetVolumeType() const
{
return WII_WAD;
return Platform::WII_WAD;
}
std::map<IVolume::ELanguage, std::string> CVolumeWAD::GetLongNames() const
std::map<Language, std::string> CVolumeWAD::GetLongNames() const
{
std::vector<u8> name_data(NAMES_TOTAL_BYTES);
if (!Read(m_opening_bnr_offset + 0x9C, NAMES_TOTAL_BYTES, name_data.data()))
return std::map<IVolume::ELanguage, std::string>();
return std::map<Language, std::string>();
return ReadWiiNames(name_data);
}