Changes in uspace/app/tetris/screen.c [19f857a:9f1362d4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/screen.c
r19f857a r9f1362d4 53 53 #include <vfs/vfs.h> 54 54 #include <async.h> 55 #include <bool.h> 56 #include <io/console.h> 57 #include <io/style.h> 55 58 #include "screen.h" 56 59 #include "tetris.h" 57 #include <io/console.h>58 60 59 61 #define STOP (B_COLS - 3) … … 63 65 static int isset; /* true => terminal is in game mode */ 64 66 65 static int use_color;/* true => use colors */67 static bool use_color; /* true => use colors */ 66 68 67 69 static const struct shape *lastshape; … … 81 83 { 82 84 fflush(stdout); 83 console_set_rgb_color(fphone(stdout), 0xf 0f0f0,85 console_set_rgb_color(fphone(stdout), 0xffffff, 84 86 use_color ? color : 0x000000); 85 87 } … … 88 90 { 89 91 fflush(stdout); 90 console_set_ rgb_color(fphone(stdout), 0, 0xf0f0f0);92 console_set_style(fphone(stdout), STYLE_NORMAL); 91 93 } 92 94 … … 118 120 } 119 121 120 void moveto(i nt r, int c)122 void moveto(ipcarg_t r, ipcarg_t c) 121 123 { 122 124 fflush(stdout); 123 console_ goto(fphone(stdout), c, r);125 console_set_pos(fphone(stdout), c, r); 124 126 } 125 127 … … 131 133 } 132 134 133 static int get_display_color_sup(void) 134 { 135 int rc; 136 int ccap; 137 138 rc = console_get_color_cap(fphone(stdout), &ccap); 135 static bool get_display_color_sup(void) 136 { 137 ipcarg_t ccap; 138 int rc = console_get_color_cap(fphone(stdout), &ccap); 139 139 140 if (rc != 0) 140 return 0;141 141 return false; 142 142 143 return (ccap >= CONSOLE_CCAP_RGB); 143 144 } … … 308 309 * (We need its length in case we have to overwrite with blanks.) 309 310 */ 310 void scr_msg(char *s, intset)311 void scr_msg(char *s, bool set) 311 312 { 312 313 int l = str_size(s);
Note:
See TracChangeset
for help on using the changeset viewer.