diff options
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r-- | src/koopatlas/hud.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index dceddb8..50899a7 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -227,19 +227,9 @@ void dWMHud_c::loadHeaderInfo() { } // LEVEL NAME - wchar_t convertedLevelName[100]; - const char *sourceLevelName = levelInfo->getNameForLevel(infEntry); - int charCount = 0; - - while (*sourceLevelName != 0 && charCount < 99) { - convertedLevelName[charCount] = *sourceLevelName; - sourceLevelName++; - charCount++; - } - convertedLevelName[charCount] = 0; - - LevelName->SetString(convertedLevelName); - LevelNameS->SetString(convertedLevelName); + dScript::Res_c *bmg = GetBMG(); + Newer_WriteBMGToTextBox(LevelName, bmg, 8000+infEntry->worldSlot+1, infEntry->levelSlot+1, 0); + Newer_WriteBMGToTextBox(LevelNameS, bmg, 8000+infEntry->worldSlot+1, infEntry->levelSlot+1, 0); // a hack because I don't feel like editing the rlyt LevelName->size.x = LevelNameS->size.x = 400.0f; @@ -326,7 +316,7 @@ void dWMHud_c::loadHeaderInfo() { if (LevelName->tagProc != 0) tw.tagProcessor = LevelName->tagProc; - float width = tw.CalcStringWidth(convertedLevelName, charCount); + float width = tw.CalcStringWidth(LevelName->stringBuf, LevelName->stringLength); float totalWidth = width + LevelName->trans.x - 20.0f; if (totalWidth < currentPos) totalWidth = currentPos; |