Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4581 → Rev 4718

/branches/network/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;
 
 
78,7 → 80,8
static void start_standout(uint32_t color)
{
fflush(stdout);
console_set_rgb_color(fphone(stdout), 0xf0f0f0, color);
console_set_rgb_color(fphone(stdout), 0xf0f0f0,
use_color ? color : 0x000000);
}
 
static void resume_normal(void)
127,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.
*/
141,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];
/branches/network/uspace/app/tetris/shapes.c
87,7 → 87,7
*/
int fits_in(const struct shape *shape, int pos)
{
int *o = shape->off;
const int *o = shape->off;
if ((board[pos]) || (board[pos + *o++]) || (board[pos + *o++]) ||
(board[pos + *o]))
102,7 → 102,7
*/
void place(const struct shape *shape, int pos, int onoff)
{
int *o = shape->off;
const int *o = shape->off;
board[pos] = onoff ? shape->color : 0x000000;
board[pos + *o++] = onoff ? shape->color : 0x000000;
/branches/network/uspace/app/tetris/tetris.c
237,7 → 237,7
{
int pos;
int c;
char *keys;
const char *keys;
int level = 2;
char key_write[6][10];
int i;