Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4667 → Rev 4668

/branches/dd/uspace/app/tetris/screen.c
62,6 → 62,8
static int curscore;
static int isset; /* true => terminal is in game mode */
 
static int use_color; /* true => use colors */
 
static const struct shape *lastshape;
 
 
77,11 → 79,14
 
static void start_standout(uint32_t color)
{
console_set_rgb_color(fphone(stdout), 0xf0f0f0, color);
fflush(stdout);
console_set_rgb_color(fphone(stdout), 0xf0f0f0,
use_color ? color : 0x000000);
}
 
static void resume_normal(void)
{
fflush(stdout);
console_set_rgb_color(fphone(stdout), 0, 0xf0f0f0);
}
 
114,6 → 119,7
 
void moveto(int r, int c)
{
fflush(stdout);
console_goto(fphone(stdout), c, r);
}
 
124,6 → 130,18
return console_get_size(fphone(stdout), &ws->ws_col, &ws->ws_row);
}
 
static int get_display_color_sup(void)
{
int rc;
int ccap;
 
rc = console_get_color_cap(fphone(stdout), &ccap);
if (rc != 0)
return 0;
 
return (ccap >= CONSOLE_CCAP_RGB);
}
 
/*
* Set up screen mode.
*/
138,6 → 156,8
Rows = ws.ws_row;
Cols = ws.ws_col;
}
 
use_color = get_display_color_sup();
if ((Rows < MINROWS) || (Cols < MINCOLS)) {
char smallscr[55];