Merge pull request #4917 from vitor-k/long-title

Allow displaying the long_title of the game
This commit is contained in:
Weiyi Wang 2019-09-20 12:59:04 -04:00 committed by GitHub
commit 176b8b4a0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 18 deletions

View file

@ -48,6 +48,10 @@ std::array<u16, 0x40> SMDH::GetShortTitle(Loader::SMDH::TitleLanguage language)
return titles[static_cast<int>(language)].short_title;
}
std::array<u16, 0x80> SMDH::GetLongTitle(Loader::SMDH::TitleLanguage language) const {
return titles[static_cast<int>(language)].long_title;
}
std::vector<SMDH::GameRegion> SMDH::GetRegions() const {
constexpr u32 REGION_COUNT = 7;
std::vector<GameRegion> result;

View file

@ -86,6 +86,13 @@ struct SMDH {
*/
std::array<u16, 0x40> GetShortTitle(Loader::SMDH::TitleLanguage language) const;
/**
* Gets the long game title from SMDH
* @param language title language
* @return UTF-16 array of the long title
*/
std::array<u16, 0x80> GetLongTitle(Loader::SMDH::TitleLanguage language) const;
std::vector<GameRegion> GetRegions() const;
};
static_assert(sizeof(SMDH) == 0x36C0, "SMDH structure size is wrong");