summaryrefslogtreecommitdiff
path: root/src/koopatlas/shop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas/shop.cpp')
-rw-r--r--src/koopatlas/shop.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/koopatlas/shop.cpp b/src/koopatlas/shop.cpp
index a5300f6..9da5fc0 100644
--- a/src/koopatlas/shop.cpp
+++ b/src/koopatlas/shop.cpp
@@ -311,13 +311,6 @@ void dWMShop_c::endState_HideWait() {
}
-/*void dWMShop_c::changeItem(int last, int current) {
-
- if (last) { layout.enableNonLoopAnim(last - 1 + 6); }
- if (current) { layout.enableNonLoopAnim(current - 1 + 12); }
-
-}*/
-
// Powerup Listing:
// 0 = Mushroom - 1
// 1 = Fireflower - 2
@@ -451,12 +444,14 @@ void dWMShop_c::buyItem(int item) {
for (int i = 0; i < 4; i++) {
block->player_coins[i] += (appliedItems[(int)COINS] * 50);
- /*for (;block->player_coins[i] < 100; block->player_coins[i] - 100) {
- block->player_coins[i] = 1 + block->player_coins[i];
+ while (block->player_coins[i] >= 100) {
+ block->player_coins[i] -= 100;
+ block->player_lives[i]++;
}
- block->player_lives[i] = Powerups[8] + block->player_lives[i];
- if (block->player_lives[i] > 99) { block->player_lives[i] = 99; }*/
+ block->player_lives[i] += appliedItems[(int)ONE_UP];
+ if (block->player_lives[i] > 99)
+ block->player_lives[i] = 99;
}
state.setState(&StateID_HideWait);