From 324f2f2b3b8dff9c6b9c297390c8307d181dac87 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 28 Sep 2012 02:14:22 +0200 Subject: various fixes to stuff on map HUD --- src/koopatlas/hud.cpp | 18 ++++++++---------- src/koopatlas/hud.h | 1 + 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/koopatlas') diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index 3d2eb04..5379019 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -207,11 +207,12 @@ int dWMHud_c::onCreate() { static const char *pictureNames[] = { "Header_Centre", "Header_Right", "Footer", "NormalExitFlag", "SecretExitFlag", + "StarCoinOff0", "StarCoinOff1", "StarCoinOff2", "StarCoinOn0", "StarCoinOn1", "StarCoinOn2", "P_marioFace_00", "P_luigiFace_00", "P_BkinoFace_00", "P_YkinoFace_00" }; - layout.getPictures(pictureNames, &Header_Centre, 12); + layout.getPictures(pictureNames, &Header_Centre, 15); static const char *textBoxNames[] = { "LevelName", "LevelNameS", @@ -277,8 +278,7 @@ int dWMHud_c::onExecute() { updatePressableButtonThingies(); int scCount = getStarCoinCount(); - int scLength = 3; - WriteNumberToTextBox(&scCount, &scLength, StarCoinCounter, false); + WriteNumberToTextBox(&scCount, StarCoinCounter, false); layout.execAnimations(); layout.update(); @@ -393,9 +393,8 @@ void dWMHud_c::loadHeaderInfo() { if (LevelNumber->tagProc != 0) tw2.tagProcessor = LevelNumber->tagProc; - float spacing = 4.0f; float currentPos = tw2.CalcStringWidth(levelNumber, wcslen(levelNumber)); - currentPos += LevelNumber->trans.x + spacing; + currentPos += LevelNumber->trans.x + 12.0f; // INFO int w = nodeForHeader->levelNumber[0] - 1; @@ -406,19 +405,18 @@ void dWMHud_c::loadHeaderInfo() { NormalExitFlag->trans.x = currentPos; NormalExitFlag->SetVisible(conds & COND_NORMAL); if (conds & COND_NORMAL) - currentPos += NormalExitFlag->size.x + spacing; + currentPos += NormalExitFlag->size.x; SecretExitFlag->trans.x = currentPos; SecretExitFlag->SetVisible(conds & COND_SECRET); if (conds & COND_SECRET) - currentPos += SecretExitFlag->size.x + spacing; + currentPos += SecretExitFlag->size.x; for (int i = 0; i < 3; i++) { bool flag = (conds & (COND_COIN1 << i)); - StarCoinOn[i]->trans.x = currentPos; StarCoinOn[i]->SetVisible(flag); - if (flag) - currentPos += StarCoinOn[i]->size.x + spacing; + StarCoinOff[i]->trans.x = currentPos; + currentPos += StarCoinOff[i]->size.x + 4.0f; } // SIZE THING diff --git a/src/koopatlas/hud.h b/src/koopatlas/hud.h index 05ad07c..5996b88 100644 --- a/src/koopatlas/hud.h +++ b/src/koopatlas/hud.h @@ -67,6 +67,7 @@ class dWMHud_c : public dBase_c { nw4r::lyt::Picture *Header_Centre, *Header_Right, *Footer, *NormalExitFlag, *SecretExitFlag, + *StarCoinOff[3], *StarCoinOn[3], *P_marioFace_00, *P_luigiFace_00, *P_BkinoFace_00, *P_YkinoFace_00; -- cgit v1.2.3