summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/newer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/newer.cpp b/src/newer.cpp
index dd0d99c..dd0dc2c 100644
--- a/src/newer.cpp
+++ b/src/newer.cpp
@@ -61,10 +61,16 @@ void getNewerLevelNumberString(int world, int level, wchar_t *dest) {
int getUnspentStarCoinCount() {
SaveBlock *save = GetSaveFile()->GetBlock(-1);
+ int coinsSpent = save->credits_hiscore;
+ return getStarCoinCount() - coinsSpent;
+}
+
+int getStarCoinCount() {
+ SaveBlock *save = GetSaveFile()->GetBlock(-1);
int coinsEarned = 0;
for (int w = 0; w < 10; w++) {
- for (int l = 0; l < 10; l++) {
+ for (int l = 0; l < 42; l++) {
u32 conds = save->GetLevelCondition(w, l);
if (conds & COND_COIN1) { coinsEarned++; }
@@ -75,9 +81,3 @@ int getUnspentStarCoinCount() {
return coinsEarned;
}
-
-int getStarCoinCount() {
- SaveBlock *save = GetSaveFile()->GetBlock(-1);
- int coinsSpent = save->credits_hiscore;
- return getUnspentStarCoinCount() - coinsSpent;
-}