diff options
author | Nils Wallménius <nils@rockbox.org> | 2011-01-09 18:54:21 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2011-01-09 18:54:21 +0000 |
commit | be76de7b11a5629e11f52950b718a0152abf4722 (patch) | |
tree | d567fc4b9fe0fa8d5933062b99753d6f42f01160 /apps | |
parent | 6e3da841be4f0c7eda5d0daec19fc4919bd56d9f (diff) |
jewels: hopefully fix FS#11842, by checking if there are available moves after checking if we should advance to the next level.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29013 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/jewels.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 0df7c35d84..02f8143974 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -1433,7 +1433,6 @@ static int jewels_main(struct game_context* bj) { int button; int position; bool selected = false; - bool no_movesavail; int x=0, y=0; bool loaded = jewels_loadgame(bj); @@ -1443,8 +1442,6 @@ static int jewels_main(struct game_context* bj) { resume_file = false; while(true) { - no_movesavail = false; - /* refresh the board */ jewels_drawboard(bj); @@ -1470,7 +1467,6 @@ static int jewels_main(struct game_context* bj) { if(selected) { bj->score += jewels_swapjewels(bj, x, y, SWAP_LEFT); selected = false; - if (!jewels_movesavail(bj)) no_movesavail = true; } else { x = (x+BJ_WIDTH-1)%BJ_WIDTH; } @@ -1481,7 +1477,6 @@ static int jewels_main(struct game_context* bj) { if(selected) { bj->score += jewels_swapjewels(bj, x, y, SWAP_RIGHT); selected = false; - if (!jewels_movesavail(bj)) no_movesavail = true; } else { x = (x+1)%BJ_WIDTH; } @@ -1492,7 +1487,6 @@ static int jewels_main(struct game_context* bj) { if(selected) { bj->score += jewels_swapjewels(bj, x, y, SWAP_DOWN); selected = false; - if (!jewels_movesavail(bj)) no_movesavail = true; } else { y = (y+1)%(BJ_HEIGHT-1); } @@ -1503,7 +1497,6 @@ static int jewels_main(struct game_context* bj) { if(selected) { bj->score += jewels_swapjewels(bj, x, y, SWAP_UP); selected = false; - if (!jewels_movesavail(bj)) no_movesavail = true; } else { y = (y+(BJ_HEIGHT-1)-1)%(BJ_HEIGHT-1); } @@ -1569,7 +1562,7 @@ static int jewels_main(struct game_context* bj) { } } - if (no_movesavail) { + if (!jewels_movesavail(bj)) { switch(bj->type) { case GAME_TYPE_NORMAL: rb->splash(HZ*2, "Game Over!"); |