summaryrefslogtreecommitdiff
path: root/src/koopatlas/hud.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-11-17 20:42:06 +0100
committerTreeki <treeki@gmail.com>2013-11-17 20:42:06 +0100
commitc220e400436703c71adf2b49a04a863b72c41d29 (patch)
tree5d615b6834ee24233549a5ee4860f363c6e50185 /src/koopatlas/hud.cpp
parentd55debf80b417793ce924ec977ed3a16413fd5d6 (diff)
downloadkamek-c220e400436703c71adf2b49a04a863b72c41d29.tar.gz
kamek-c220e400436703c71adf2b49a04a863b72c41d29.zip
broken translations and shit, possibly final commit before public releaselevel-select
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r--src/koopatlas/hud.cpp18
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;