Test
This commit is contained in:
@@ -2379,9 +2379,9 @@ void display_score(WINDOW *w, tetris_game *tg)
|
|||||||
{
|
{
|
||||||
wclear(w);
|
wclear(w);
|
||||||
box(w, 0, 0);
|
box(w, 0, 0);
|
||||||
wprintw(w, "Score\n%d\n", tg->points);
|
wprintw(w, (char *)"Score\n%d\n", tg->points);
|
||||||
wprintw(w, "Level\n%d\n", tg->level);
|
wprintw(w, (char *)"Level\n%d\n", tg->level);
|
||||||
wprintw(w, "Lines\n%d\n", tg->lines_remaining);
|
wprintw(w, (char *)"Lines\n%d\n", tg->lines_remaining);
|
||||||
wnoutrefresh(w);
|
wnoutrefresh(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2395,7 +2395,7 @@ void save(tetris_game *game, WINDOW *w)
|
|||||||
wclear(w);
|
wclear(w);
|
||||||
box(w, 0, 0); // return the border
|
box(w, 0, 0); // return the border
|
||||||
wmove(w, 1, 1);
|
wmove(w, 1, 1);
|
||||||
wprintw(w, "Save and exit? [Y/n] ");
|
wprintw(w, (char *)"Save and exit? [Y/n] ");
|
||||||
wrefresh(w);
|
wrefresh(w);
|
||||||
timeout(-1);
|
timeout(-1);
|
||||||
if (getch() == 'n') {
|
if (getch() == 'n') {
|
||||||
@@ -2407,8 +2407,8 @@ void save(tetris_game *game, WINDOW *w)
|
|||||||
fclose(f);
|
fclose(f);
|
||||||
tg_delete(game);
|
tg_delete(game);
|
||||||
endwin();
|
endwin();
|
||||||
printf("Game saved to \"tetris.save\".\n");
|
fprintf(stderr,"Game saved to \"tetris.save\".\n");
|
||||||
printf("Resume by passing the filename as an argument to this program.\n");
|
fprintf(stderr,"Resume by passing the filename as an argument to this program.\n");
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -168,6 +168,12 @@ char *unctrl(char c);
|
|||||||
#define leaveok(win,bf) 0
|
#define leaveok(win,bf) 0
|
||||||
#define halfdelay(x) 0
|
#define halfdelay(x) 0
|
||||||
#define nocbreak() 0
|
#define nocbreak() 0
|
||||||
|
#define init_color(a,b,c) 0
|
||||||
|
#define start_color() 0
|
||||||
|
#define box(a,b,c) 0
|
||||||
|
#define A_REVERSE 0
|
||||||
|
#define COLOR_PAIR(a) 0
|
||||||
|
#define timeout(x) 0
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
|
|||||||
Reference in New Issue
Block a user