diff options
author | Treeki <treeki@gmail.com> | 2012-09-28 03:09:54 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-28 03:09:54 +0200 |
commit | 4bc93995778096106a3214fcd29dab7ff6e144c7 (patch) | |
tree | fe3b0c8c8031c6be6fd44ded23a699f1866d5536 /src/koopatlas | |
parent | 324f2f2b3b8dff9c6b9c297390c8307d181dac87 (diff) | |
download | kamek-4bc93995778096106a3214fcd29dab7ff6e144c7.tar.gz kamek-4bc93995778096106a3214fcd29dab7ff6e144c7.zip |
HUD numbers are now working
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/hud.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index 5379019..3255af8 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -192,7 +192,7 @@ int dWMHud_c::onCreate() { layout.disableAllAnimations(); layout.enableNonLoopAnim(SHOW_LIVES); - layout.enableNonLoopAnim(SHOW_FOOTER); + layout.resetAnim(SHOW_FOOTER); layout.resetAnim(SHOW_HEADER); static const char *tbNames[2] = {"MenuButtonInfo", "ItemsButtonInfo"}; @@ -236,6 +236,8 @@ int dWMHud_c::onCreate() { willShowFooter = false; loadFooterInfo(); + SaveBlock *save = GetSaveFile()->GetBlock(-1); + willShowFooter = (save->newerWorldName[0] != 0); if (!dScKoopatlas_c::instance->pathManager.isMoving) enteredNode(); @@ -347,14 +349,17 @@ void dWMHud_c::loadHeaderInfo() { // 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"Tower", // 21, tower - L"Tower2", // 22, tower 2 - L"Castle", // 23, castle - L"Fortress", // 24, fortress - L"FCastle", // 25, final castle + L"\x0B\x012F\xBEEF", // 21, tower + L"\x0B\x012F\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"Train", // 26, train - L"Airship", // 27, airship + L"\x0B\x0132\xBEEF", // 27, airship L"Palace", // 28, switch palace L"House", // 29, yoshi's house L"Key1", // 30, key 1 @@ -365,8 +370,8 @@ void dWMHud_c::loadHeaderInfo() { L"Key6", // 35, key 6 }; - int origWN = nodeForHeader->levelNumber[0]; - int origWL = nodeForHeader->levelNumber[1]; + int origWN = infEntry->displayWorld; + int origWL = infEntry->displayLevel; wchar_t levelNumber[16]; levelNumber[0] = (origWN >= 10) ? (origWN-10+'A') : (origWN+'0'); @@ -383,6 +388,16 @@ void dWMHud_c::loadHeaderInfo() { } LevelNumber->SetString(levelNumber); + + // make the picture shadowy + int sidx = 0; + while (levelNumber[sidx]) { + if (levelNumber[sidx] == 11) { + levelNumber[sidx+1] = 0x200 | (levelNumber[sidx+1]&0xFF); + sidx += 2; + } + sidx++; + } LevelNumberS->SetString(levelNumber); nw4r::ut::TextWriter tw2; |