Get rid of banner loaders and move their functionality to volumes

Having some data available in banner loaders and some other data
data available in volumes gets messy, especially with GetNames(),
which is available in both but returns different results
depending on which one is used. This change drops support
for reading names and descriptions from Wii save data.
This commit is contained in:
JosJuice
2015-04-10 22:10:49 +02:00
parent 235ecfbed7
commit ee694e327a
23 changed files with 393 additions and 791 deletions

View File

@ -192,16 +192,20 @@ int CVolumeWiiCrypted::GetRevision() const
return revision;
}
std::string CVolumeWiiCrypted::GetName() const
{
char name_buffer[0x60];
if (m_pReader != nullptr && Read(0x20, 0x60, (u8*)&name_buffer, false))
return DecodeString(name_buffer);
return "";
}
std::map<IVolume::ELanguage, std::string> CVolumeWiiCrypted::GetNames() const
{
// TODO: Read opening.bnr
std::map<IVolume::ELanguage, std::string> names;
auto const string_decoder = CVolumeGC::GetStringDecoder(GetCountry());
char name[0xFF] = {};
if (m_pReader != nullptr && Read(0x20, 0x60, (u8*)&name, true))
names[IVolume::ELanguage::LANGUAGE_UNKNOWN] = string_decoder(name);
names[IVolume::ELanguage::LANGUAGE_UNKNOWN] = GetName();
return names;
}