From ae8aa681d1f431ee163ba2907616cb8409433c36 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 28 Sep 2012 05:56:05 +0200 Subject: HUD now only shows star coins for real levels, and fixed a bug --- src/koopatlas/core.cpp | 3 --- src/koopatlas/hud.cpp | 13 +++++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') 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 -- cgit v1.2.3