diff options
author | Treeki <treeki@gmail.com> | 2012-09-20 15:30:05 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-20 15:30:05 +0200 |
commit | 05eb1400faaa957905fbbe8fa284df4ab1472a58 (patch) | |
tree | 7794b1d7af940bdf840739b4a7a96460e6933838 /src/koopatlas/starcoin.cpp | |
parent | a7fc34dfdfee0c899712e0209885e40b19305d7f (diff) | |
download | kamek-05eb1400faaa957905fbbe8fa284df4ab1472a58.tar.gz kamek-05eb1400faaa957905fbbe8fa284df4ab1472a58.zip |
cleaning up in preparation for the new HUD, plus a few other changes
Diffstat (limited to 'src/koopatlas/starcoin.cpp')
-rw-r--r-- | src/koopatlas/starcoin.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
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 <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); |