diff options
author | Adam Boot <rotator@gmail.com> | 2008-05-30 23:07:03 +0000 |
---|---|---|
committer | Adam Boot <rotator@gmail.com> | 2008-05-30 23:07:03 +0000 |
commit | e0a6a70b99da5f097cfe85ea88b9569d22bcb778 (patch) | |
tree | 22ae993b5df0d14e9de0639c16bd37a0b73b0ea7 | |
parent | 785aa5cf64deaa1a2093c8f1eef8c056484fd66f (diff) |
Minor correction to Jewels scoring on level advance
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17664 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/jewels.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index a0e6479a10..117cb10904 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -1249,7 +1249,7 @@ static unsigned int jewels_initlevel(struct game_context* bj) { * jewels_nextlevel() advances the game to the next level and returns * points earned. ******************************************************************************/ -static unsigned int jewels_nextlevel(struct game_context* bj) { +static void jewels_nextlevel(struct game_context* bj) { int i, x, y; unsigned int points = 0; @@ -1286,7 +1286,8 @@ static unsigned int jewels_nextlevel(struct game_context* bj) { break; } - return jewels_initlevel(bj); + points += jewels_initlevel(bj); + bj->score += points; } /***************************************************************************** @@ -1886,12 +1887,13 @@ static int jewels_main(struct game_context* bj) { switch(bj->type) { case GAME_TYPE_NORMAL: - if(bj->score >= LEVEL_PTS) bj->score = jewels_nextlevel(bj); + if(bj->score >= LEVEL_PTS) + jewels_nextlevel(bj); break; case GAME_TYPE_PUZZLE: if(jewels_puzzle_is_finished(bj)) - bj->score += jewels_nextlevel(bj); + jewels_nextlevel(bj); break; } } |