diff options
author | Treeki <treeki@gmail.com> | 2012-09-28 02:14:22 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-28 02:14:22 +0200 |
commit | 324f2f2b3b8dff9c6b9c297390c8307d181dac87 (patch) | |
tree | f84a4579fe3fd3d46b8c03abef7eb276d6ee5247 | |
parent | 908766204ce347afd46ed179a9a40e1adadf41b2 (diff) | |
download | kamek-324f2f2b3b8dff9c6b9c297390c8307d181dac87.tar.gz kamek-324f2f2b3b8dff9c6b9c297390c8307d181dac87.zip |
various fixes to stuff on map HUD
Diffstat (limited to '')
-rwxr-xr-x | include/game.h | 1 | ||||
-rw-r--r-- | kamek_pal.x | 1 | ||||
-rw-r--r-- | src/koopatlas/hud.cpp | 18 | ||||
-rw-r--r-- | src/koopatlas/hud.h | 1 |
4 files changed, 11 insertions, 10 deletions
diff --git a/include/game.h b/include/game.h index fd0dd3c..e383cf7 100755 --- a/include/game.h +++ b/include/game.h @@ -3253,6 +3253,7 @@ namespace mHeap { };
void WriteNumberToTextBox(int *number, const int *fieldLength, nw4r::lyt::TextBox *textBox, bool unk); // 800B3B60
+void WriteNumberToTextBox(int *number, nw4r::lyt::TextBox *textBox, bool unk); // 800B3BE0
namespace EGG {
class MsgRes {
diff --git a/kamek_pal.x b/kamek_pal.x index 4f08ae9..78ff6bf 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -22,6 +22,7 @@ SECTIONS { InsertIntIntoTextBox1 = 0x800B3BE0; WriteNumberToTextBox__FPiPCiPQ34nw4r3lyt7TextBoxb = 0x800B3B60; + WriteNumberToTextBox__FPiPQ34nw4r3lyt7TextBoxb = 0x800B3BE0; __ct__20daJrClownForPlayer_cFv = 0x80810480; __dt__20daJrClownForPlayer_cFv = 0x80810540; /* Beans indeed. */ 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; |