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