Avoid trying to decode Korean trainername and rival name.

We don't support the character set, neither in libpokemegb and PokeMe64.

The Korean character set is a lot more complex than the other ones. But it would also require the inclusion of a lot of additional character glyphs in PokeMe64
in order to show the characters. Right now I don't feel like doing that for a localization that won't be used by many in combination with PokeMe64.

So instead of showing the trainer name and rival name, I will just replace it with "player" and "rival". It's not an amazing solution, but it's the best I'm willing to do for now.
This commit is contained in:
Philippe Symons 2025-01-26 19:44:06 +01:00
parent 8912fab54f
commit 020b4b7f8a

View File

@ -628,6 +628,12 @@ const char *Gen2GameReader::getTrainerName() const
{
static char result[20];
uint8_t encodedPlayerName[0xB];
if(localization_ == Gen2LocalizationLanguage::KOREAN)
{
return "player";
}
saveManager_.seek(0x200B);
saveManager_.readUntil(encodedPlayerName, 0x50, 0xB);
@ -641,6 +647,11 @@ const char *Gen2GameReader::getRivalName() const
uint8_t encodedPlayerName[0xB];
const uint32_t savOffset = gen2_getSRAMOffsets(gameType_, localization_).rivalName;
if(localization_ == Gen2LocalizationLanguage::KOREAN)
{
return "rival";
}
saveManager_.seek(savOffset);
saveManager_.readUntil(encodedPlayerName, 0x50, 0xB);