diff options
author | Felix Arends <edx@rockbox.org> | 2002-07-04 21:24:09 +0000 |
---|---|---|
committer | Felix Arends <edx@rockbox.org> | 2002-07-04 21:24:09 +0000 |
commit | 4744d3bcf0465b57ae312131ee92c05eeca0c443 (patch) | |
tree | a67cef97876dd4e014db440c6287c098a9dd0537 | |
parent | 5b4221b279fe375e285767ab9139f1bb6fb08ab4 (diff) | |
download | rockbox-4744d3bcf0465b57ae312131ee92c05eeca0c443.tar.gz rockbox-4744d3bcf0465b57ae312131ee92c05eeca0c443.zip |
fixed cannot-lose-bug
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1335 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/recorder/tetris.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/apps/recorder/tetris.c b/apps/recorder/tetris.c index a0a2f4b95a..e9653d1774 100644 --- a/apps/recorder/tetris.c +++ b/apps/recorder/tetris.c | |||
@@ -178,7 +178,7 @@ bool gameover(void) | |||
178 | if(block_touch(x + block_data[block][frame][1][i] * 4, y + block_data[block][frame][0][i] * 3)) | 178 | if(block_touch(x + block_data[block][frame][1][i] * 4, y + block_data[block][frame][0][i] * 3)) |
179 | { | 179 | { |
180 | /* Are we at the top of the frame? */ | 180 | /* Are we at the top of the frame? */ |
181 | if(y + block_data[block][frame][1][i] * 4 < start_y) | 181 | if(x + block_data[block][frame][1][i] * 4 >= max_x - 16) |
182 | { | 182 | { |
183 | /* Game over ;) */ | 183 | /* Game over ;) */ |
184 | return true; | 184 | return true; |
@@ -354,16 +354,10 @@ void game_loop(void) | |||
354 | 354 | ||
355 | if(gameover()) | 355 | if(gameover()) |
356 | { | 356 | { |
357 | int w, h; | 357 | lcd_clearrect(0, 52, LCD_WIDTH, LCD_HEIGHT - 52); |
358 | 358 | lcd_putsxy (2, 52, "You lose!", 0); | |
359 | lcd_getfontsize(TETRIS_TITLE_FONT, &w, &h); | ||
360 | lcd_clearrect(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, | ||
361 | TETRIS_TITLE_XLOC+(w*sizeof(TETRIS_TITLE)), | ||
362 | TETRIS_TITLE_YLOC-h); | ||
363 | lcd_putsxy(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, "You lose!", | ||
364 | TETRIS_TITLE_FONT); | ||
365 | lcd_update(); | 359 | lcd_update(); |
366 | sleep(HZ); | 360 | sleep(HZ * 3); |
367 | return; | 361 | return; |
368 | } | 362 | } |
369 | 363 | ||