diff options
author | Treeki <treeki@gmail.com> | 2012-09-28 05:56:05 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-28 05:56:05 +0200 |
commit | ae8aa681d1f431ee163ba2907616cb8409433c36 (patch) | |
tree | 2d9c2ba38048e3152d8f3caa078b6bdfbdbda937 /src/koopatlas | |
parent | 26f5315e65c74c269b6eb1a190cb54fcf19d16a7 (diff) | |
download | kamek-ae8aa681d1f431ee163ba2907616cb8409433c36.tar.gz kamek-ae8aa681d1f431ee163ba2907616cb8409433c36.zip |
HUD now only shows star coins for real levels, and fixed a bug
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/core.cpp | 3 | ||||
-rw-r--r-- | src/koopatlas/hud.cpp | 13 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index cb13119..a48a565 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -975,9 +975,6 @@ void dScKoopatlas_c::startLevel(dLevelInfo_c::entry_s *entry) { sl.level1 = entry->levelSlot; sl.level2 = entry->levelSlot; - // hopefully this will fix the Star Coin issues - SetSomeConditionShit(entry->worldSlot, entry->levelSlot, 2); - ActivateWipe(WIPE_MARIO); DoStartLevel(GetGameMgr(), &sl); diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index 3255af8..7bc69a6 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -346,6 +346,9 @@ void dWMHud_c::loadHeaderInfo() { LevelName->SetString(convertedLevelName); LevelNameS->SetString(convertedLevelName); + // a hack because I don't feel like editing the rlyt + LevelName->size.x = LevelNameS->size.x = 400.0f; + // LEVEL NUMBER static const wchar_t *numberKinds[] = { // 0-19 are handled by code @@ -427,11 +430,17 @@ void dWMHud_c::loadHeaderInfo() { if (conds & COND_SECRET) currentPos += SecretExitFlag->size.x; + // are star coins enabled or not? + bool haveSC = (infEntry->flags & 2); + for (int i = 0; i < 3; i++) { bool flag = (conds & (COND_COIN1 << i)); StarCoinOn[i]->SetVisible(flag); - StarCoinOff[i]->trans.x = currentPos; - currentPos += StarCoinOff[i]->size.x + 4.0f; + StarCoinOff[i]->SetVisible(haveSC); + if (haveSC) { + StarCoinOff[i]->trans.x = currentPos; + currentPos += StarCoinOff[i]->size.x + 4.0f; + } } // SIZE THING |