diff options
author | Treeki <treeki@gmail.com> | 2012-10-10 03:02:02 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-10 03:02:02 +0200 |
commit | c1c7f656efdecd6da7923de46eb113699f256ff6 (patch) | |
tree | 40669ad810c1e347d504712b379e7ea6809e036c /src/koopatlas/hud.cpp | |
parent | 22189497b8711cb7766e4329096be8f47bcf4851 (diff) | |
download | kamek-c1c7f656efdecd6da7923de46eb113699f256ff6.tar.gz kamek-c1c7f656efdecd6da7923de46eb113699f256ff6.zip |
bit of refactoring, and added PreGame
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r-- | src/koopatlas/hud.cpp | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index 701053e..a32d32a 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -1,4 +1,5 @@ #include "koopatlas/hud.h" +#include <newer.h> dTexMapColouriser_c::dTexMapColouriser_c() { @@ -351,52 +352,8 @@ void dWMHud_c::loadHeaderInfo() { LevelName->size.x = LevelNameS->size.x = 400.0f; // LEVEL NUMBER - static const wchar_t *numberKinds[] = { - // 0-19 are handled by code - // To insert a picturefont character: - // \x0B\x01YY\xZZZZ - // YY is the character code, ZZZZ is ignored - L"A", // 20, alternate - L"\x0B\x0148\xBEEF", // 21, tower - L"\x0B\x0148\xBEEF" L"2", // 22, tower 2 - L"\x0B\x012E\xBEEF", // 23, castle - L"\x0B\x012F\xBEEF", // 24, fortress - L"\x0B\x013D\xBEEF", // 25, final castle - L"\x0B\x014D\xBEEF", // 26, train - L"\x0B\x0132\xBEEF", // 27, airship - L"Palace", // 28, switch palace - L"\x0B\x0147\xBEEF", // 29, yoshi's house - L"\x0B\x014E\xBEEF" L"1", // 30, key 1 - L"\x0B\x014E\xBEEF" L"2", // 31, key 2 - L"\x0B\x014E\xBEEF" L"3", // 32, key 3 - L"\x0B\x014E\xBEEF" L"4", // 33, key 4 - L"\x0B\x014E\xBEEF" L"5", // 34, key 5 - L"\x0B\x014E\xBEEF" L"6", // 35, key 6 - L"\x0B\x0138\xBEEF", // 36, music house - L"\x0B\x0133\xBEEF", // 37, shop - L"\x0B\x0139\xBEEF", // 38, challenge house - L"\x0B\x0151\xBEEF", // 39, red switch palace - L"\x0B\x0152\xBEEF", // 40, blue switch palace - L"\x0B\x0153\xBEEF", // 41, yellow switch palace - L"\x0B\x0154\xBEEF", // 42, green switch palace - }; - - int origWN = infEntry->displayWorld; - int origWL = infEntry->displayLevel; - wchar_t levelNumber[16]; - levelNumber[0] = (origWN >= 10) ? (origWN-10+'A') : (origWN+'0'); - levelNumber[1] = '-'; - if (origWL >= 20) { - wcscpy(&levelNumber[2], numberKinds[origWL-20]); - } else if (origWL >= 10) { - levelNumber[2] = '1'; - levelNumber[3] = ('0' - 10) + origWL; - levelNumber[4] = 0; - } else { - levelNumber[2] = '0' + origWL; - levelNumber[3] = 0; - } + getNewerLevelNumberString(infEntry->displayWorld, infEntry->displayLevel, levelNumber); LevelNumber->SetString(levelNumber); |