From 3ea7aa9b77ce34207e4f636a2b2134dfaf4a8257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= <159546+serprex@users.noreply.github.com> Date: Sun, 4 Oct 2026 17:27:08 +0000 Subject: [PATCH] Fix boss rush name being garbage with non-PAL encoding (#7304) --- soh/soh/Enhancements/boss-rush/BossRush.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/soh/soh/Enhancements/boss-rush/BossRush.cpp b/soh/soh/Enhancements/boss-rush/BossRush.cpp index 7e7e970c40..b35c30b2bd 100644 --- a/soh/soh/Enhancements/boss-rush/BossRush.cpp +++ b/soh/soh/Enhancements/boss-rush/BossRush.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -6,6 +7,7 @@ #include #include "BossRush.h" +#include "soh/SaveManager.h" #include "soh/ShipInit.hpp" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" @@ -569,11 +571,11 @@ void BossRush_HandleCompleteBoss(PlayState* play) { extern "C" void BossRush_InitSave() { - // Set player name to Lonk for the few textboxes that show up during Boss Rush. Player can't input their own name. - std::array brPlayerName = { 21, 50, 49, 46, 62, 62, 62, 62 }; - for (int i = 0; i < ARRAY_COUNT(gSaveContext.playerName); i++) { - gSaveContext.playerName[i] = brPlayerName[i]; - } + // Set player name to Link using PAL charset for few textboxes that show up during Boss Rush. + static const u8 brPlayerName[] = { 0x15, 0x12, 0x17, 0x14, 0x3E, 0x3E, 0x3E, 0x3E }; + static_assert(sizeof(brPlayerName) == sizeof(gSaveContext.playerName)); + std::copy(std::begin(brPlayerName), std::end(brPlayerName), gSaveContext.playerName); + gSaveContext.ship.filenameLanguage = NAME_LANGUAGE_PAL; gSaveContext.ship.quest.id = QUEST_BOSSRUSH; gSaveContext.ship.quest.data.bossRush.isPaused = true;