diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-09-26 11:51:03 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-09-26 11:51:03 -0500 |
commit | f9afbf1109b30bbc6011e81109b7e11961a4361a (patch) | |
tree | 46883b3ccd9ab82b439c192a657e0632414e906a /src/koopatlas/starcoin.cpp | |
parent | 3268b1fab87a34897289faa8a1f5ee0679f74e19 (diff) | |
parent | 46b65dfd76411bec6f8356c581f337f8a1944013 (diff) | |
download | kamek-f9afbf1109b30bbc6011e81109b7e11961a4361a.tar.gz kamek-f9afbf1109b30bbc6011e81109b7e11961a4361a.zip |
Merge remote-tracking branch 'origin/new-hud' into level-select
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/starcoin.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/koopatlas/starcoin.cpp b/src/koopatlas/starcoin.cpp index 54b7218..3842f87 100644 --- a/src/koopatlas/starcoin.cpp +++ b/src/koopatlas/starcoin.cpp @@ -1,26 +1,6 @@ #include "koopatlas/starcoin.h" #include <game.h> -int getStarCoinCountCoins() { - SaveBlock *save = GetSaveFile()->GetBlock(-1); - int coinsSpent = save->credits_hiscore; - int coinsEarned = 0; - - for (int w = 0; w < 10; w++) { - for (int l = 0; l < 10; l++) { - u32 conds = save->GetLevelCondition(w, l); - - if (conds & COND_COIN1) { coinsEarned++; } - if (conds & COND_COIN2) { coinsEarned++; } - if (conds & COND_COIN3) { coinsEarned++; } - } - } - - int coinsLeft = coinsEarned - coinsSpent; - return coinsLeft; -} - - /*****************************************************************************/ // Starcoin Layout // @@ -227,7 +207,7 @@ void dWMStarCoin::LoadCoinsForWorld(int world) { // Display Total Star Coin Count - int myCoins = getStarCoinCountCoins(); + int myCoins = getStarCoinCount(); char myCoinsStr [4]; sprintf(myCoinsStr, "%03d", myCoins); @@ -346,10 +326,10 @@ void dWMStarCoin::setText(const char *str, const char *name) { nw4r::ut::TextWriter tw; tw.font = box->font; tw.SetFontSize(box->fontSizeX, box->fontSizeY); - tw.somethingRelatedToLineHeight = box->lineSpace; + tw.lineSpace = box->lineSpace; tw.charSpace = box->charSpace; if (box->tagProc != 0) - tw.tagProcessorMaybe = box->tagProc; + tw.tagProcessor = box->tagProc; float width = tw.CalcStringWidth(newString, wlength); SpammyReport("Text width: %f\n", width); |