From 47795a5f0eee896df557e4e3481068e510fe51fb Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 25 Oct 2012 00:40:27 +0200 Subject: shop improved --- src/koopatlas/shop.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/koopatlas') 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); -- cgit v1.2.3