summaryrefslogtreecommitdiff
path: root/uisimulator/tetris.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/tetris.c')
-rw-r--r--uisimulator/tetris.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/uisimulator/tetris.c b/uisimulator/tetris.c
index 2f02e042d4..8884fd8964 100644
--- a/uisimulator/tetris.c
+++ b/uisimulator/tetris.c
@@ -310,14 +310,14 @@ void game_loop(void)
310 sleep(10); 310 sleep(10);
311 } 311 }
312 if(gameover()) { 312 if(gameover()) {
313 char w, h; 313 int w, h;
314 314
315 lcd_fontsize(TETRIS_TITLE_FONT, &w, &h); 315 lcd_getfontsize(TETRIS_TITLE_FONT, &w, &h);
316 lcd_clearrect(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, 316 lcd_clearrect(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC,
317 TETRIS_TITLE_XLOC+(w*sizeof(TETRIS_TITLE)), 317 TETRIS_TITLE_XLOC+(w*sizeof(TETRIS_TITLE)),
318 TETRIS_TITLE_YLOC-h); 318 TETRIS_TITLE_YLOC-h);
319 lcd_puts(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, 319 lcd_putsxy(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, "You lose!",
320 "You lose!", TETRIS_TITLE_FONT); 320 TETRIS_TITLE_FONT);
321 lcd_update(); 321 lcd_update();
322 sleep(2); 322 sleep(2);
323 return; 323 return;
@@ -349,8 +349,8 @@ void tetris(void)
349 init_tetris(); 349 init_tetris();
350 350
351 draw_frame(start_x-1,start_x+max_x,start_y-1,start_y+max_y); 351 draw_frame(start_x-1,start_x+max_x,start_y-1,start_y+max_y);
352 lcd_puts(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, 352 lcd_putsxy(TETRIS_TITLE_XLOC, TETRIS_TITLE_YLOC, TETRIS_TITLE,
353 TETRIS_TITLE, TETRIS_TITLE_FONT); 353 TETRIS_TITLE_FONT);
354 lcd_update(); 354 lcd_update();
355 355
356 next_b = t_rand(blocks); 356 next_b = t_rand(blocks);