diff options
author | Treeki <treeki@gmail.com> | 2012-10-25 00:40:27 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-25 00:40:27 +0200 |
commit | 47795a5f0eee896df557e4e3481068e510fe51fb (patch) | |
tree | 3f0ed1a6f61baab8e6ed9c94f2507cb9c4d161c8 /src/koopatlas/shop.cpp | |
parent | 63bde25084daafeb0aeaa584d3624f0c77ec043d (diff) | |
download | kamek-47795a5f0eee896df557e4e3481068e510fe51fb.tar.gz kamek-47795a5f0eee896df557e4e3481068e510fe51fb.zip |
shop improved
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/shop.cpp | 17 |
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); |