Changeset 0c25c10 in mainline for uspace/app/tetris/screen.c
- Timestamp:
- 2009-06-03T19:32:07Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 69e68e3
- Parents:
- cbff4c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/screen.c
rcbff4c2 r0c25c10 51 51 #include <string.h> 52 52 #include <unistd.h> 53 #include <console.h> 54 53 #include <vfs/vfs.h> 55 54 #include <async.h> 56 55 #include "screen.h" 57 56 #include "tetris.h" 58 #include <i pc/console.h>57 #include <io/console.h> 59 58 60 59 static cell curscreen[B_SIZE]; /* 1 => standout (or otherwise marked) */ … … 65 64 /* 66 65 * putstr() is for unpadded strings (either as in termcap(5) or 67 * simply literal strings); 66 * simply literal strings); 68 67 */ 69 68 static inline void putstr(char *s) … … 75 74 static void start_standout(void) 76 75 { 77 console_set_rgb_color( 0xf0f0f0, 0);76 console_set_rgb_color(fphone(stdout), 0xf0f0f0, 0); 78 77 } 79 78 80 79 static void resume_normal(void) 81 80 { 82 console_set_rgb_color( 0, 0xf0f0f0);81 console_set_rgb_color(fphone(stdout), 0, 0xf0f0f0); 83 82 } 84 83 85 84 void clear_screen(void) 86 85 { 87 console_clear( );86 console_clear(fphone(stdout)); 88 87 moveto(0, 0); 89 88 } … … 97 96 98 97 resume_normal(); 99 console_clear( );98 console_clear(fphone(stdout)); 100 99 curscore = -1; 101 100 memset((char *)curscreen, 0, sizeof(curscreen)); … … 108 107 scr_init(void) 109 108 { 110 console_cursor_visibility( 0);109 console_cursor_visibility(fphone(stdout), 0); 111 110 resume_normal(); 112 111 scr_clear(); … … 115 114 void moveto(int r, int c) 116 115 { 117 console_goto( r, c);116 console_goto(fphone(stdout), c, r); 118 117 } 119 118 … … 122 121 static int get_display_size(winsize_t *ws) 123 122 { 124 return console_get_size( &ws->ws_row, &ws->ws_col);123 return console_get_size(fphone(stdout), &ws->ws_col, &ws->ws_row); 125 124 } 126 125
Note:
See TracChangeset
for help on using the changeset viewer.