From 05eb1400faaa957905fbbe8fa284df4ab1472a58 Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 20 Sep 2012 15:30:05 +0200 Subject: cleaning up in preparation for the new HUD, plus a few other changes --- src/koopatlas/starcoin.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'src/koopatlas/starcoin.cpp') diff --git a/src/koopatlas/starcoin.cpp b/src/koopatlas/starcoin.cpp index 54b7218..d4bdbd8 100644 --- a/src/koopatlas/starcoin.cpp +++ b/src/koopatlas/starcoin.cpp @@ -1,26 +1,6 @@ #include "koopatlas/starcoin.h" #include -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); -- cgit v1.2.3 From badb2bf6bc25f47e711fc483e0c551b4fc18759f Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 21 Sep 2012 00:08:14 +0200 Subject: fixes, header cleanups, and part of the code for the new HUD --- src/koopatlas/starcoin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/koopatlas/starcoin.cpp') diff --git a/src/koopatlas/starcoin.cpp b/src/koopatlas/starcoin.cpp index d4bdbd8..3842f87 100644 --- a/src/koopatlas/starcoin.cpp +++ b/src/koopatlas/starcoin.cpp @@ -326,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); -- cgit v1.2.3