summaryrefslogtreecommitdiff
path: root/src/koopatlas/shop.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-20 15:30:05 +0200
committerTreeki <treeki@gmail.com>2012-09-20 15:30:05 +0200
commit05eb1400faaa957905fbbe8fa284df4ab1472a58 (patch)
tree7794b1d7af940bdf840739b4a7a96460e6933838 /src/koopatlas/shop.cpp
parenta7fc34dfdfee0c899712e0209885e40b19305d7f (diff)
downloadkamek-05eb1400faaa957905fbbe8fa284df4ab1472a58.tar.gz
kamek-05eb1400faaa957905fbbe8fa284df4ab1472a58.zip
cleaning up in preparation for the new HUD, plus a few other changes
Diffstat (limited to '')
-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 eed0222..29a96b0 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" },
@@ -373,7 +353,7 @@ void dWMShop_c::BuyItem(int item) {
layout.enableNonLoopAnim(item-1);
- int cash = getStarCoinCountShop();
+ int cash = getStarCoinCount();
int cost;
int Powerups[10];