summaryrefslogtreecommitdiff
path: root/apps/recorder/tetris.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/tetris.c')
-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)
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