summaryrefslogtreecommitdiff
path: root/apps/recorder
diff options
context:
space:
mode:
authorFelix Arends <edx@rockbox.org>2002-07-04 21:24:09 +0000
committerFelix Arends <edx@rockbox.org>2002-07-04 21:24:09 +0000
commit4744d3bcf0465b57ae312131ee92c05eeca0c443 (patch)
treea67cef97876dd4e014db440c6287c098a9dd0537 /apps/recorder
parent5b4221b279fe375e285767ab9139f1bb6fb08ab4 (diff)
fixed cannot-lose-bug
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1335 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/tetris.c14
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)
if(block_touch(x + block_data[block][frame][1][i] * 4, y + block_data[block][frame][0][i] * 3))
{
/* Are we at the top of the frame? */
- if(y + block_data[block][frame][1][i] * 4 < start_y)
+ if(x + block_data[block][frame][1][i] * 4 >= max_x - 16)
{
/* Game over ;) */
return true;
@@ -354,16 +354,10 @@ void game_loop(void)
if(gameover())
{
- int w, h;
-
- lcd_getfontsize(TETRIS_TITLE_FONT, &w, &h);
- lcd_clearrect(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC,
- TETRIS_TITLE_XLOC+(w*sizeof(TETRIS_TITLE)),
- TETRIS_TITLE_YLOC-h);
- lcd_putsxy(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, "You lose!",
- TETRIS_TITLE_FONT);
+ lcd_clearrect(0, 52, LCD_WIDTH, LCD_HEIGHT - 52);
+ lcd_putsxy (2, 52, "You lose!", 0);
lcd_update();
- sleep(HZ);
+ sleep(HZ * 3);
return;
}