summaryrefslogtreecommitdiff
path: root/src/koopatlas/shop.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-09-26 11:51:03 -0500
committerColin Noga <Tempus@chronometry.ca>2012-09-26 11:51:03 -0500
commitf9afbf1109b30bbc6011e81109b7e11961a4361a (patch)
tree46883b3ccd9ab82b439c192a657e0632414e906a /src/koopatlas/shop.cpp
parent3268b1fab87a34897289faa8a1f5ee0679f74e19 (diff)
parent46b65dfd76411bec6f8356c581f337f8a1944013 (diff)
downloadkamek-f9afbf1109b30bbc6011e81109b7e11961a4361a.tar.gz
kamek-f9afbf1109b30bbc6011e81109b7e11961a4361a.zip
Merge remote-tracking branch 'origin/new-hud' into level-select
Diffstat (limited to 'src/koopatlas/shop.cpp')
-rw-r--r--src/koopatlas/shop.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/koopatlas/shop.cpp b/src/koopatlas/shop.cpp
index 211ab49..cd20ddb 100644
--- a/src/koopatlas/shop.cpp
+++ b/src/koopatlas/shop.cpp
@@ -1,26 +1,6 @@
#include "koopatlas/shop.h"
-int getStarCoinCountShop() {
- 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;
-}
-
-
const char* Produce[10][4] = {
{ "I_kinoko", "g3d/I_kinoko.brres", "I_kinoko", "wait2" },
{ "I_fireflower", "g3d/I_fireflower.brres", "I_fireflower", "wait2" },
@@ -381,7 +361,7 @@ void dWMShop_c::BuyItem(int item) {
layout.enableNonLoopAnim(item-1);
- int cash = getStarCoinCountShop();
+ int cash = getStarCoinCount();
int cost;
int Powerups[10];