Changeset 7122bc7 in mainline for uspace/app/tetris/screen.c
- Timestamp:
- 2009-01-01T13:58:05Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fb69f39
- Parents:
- 9805cde
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/screen.c
r9805cde r7122bc7 51 51 #include <string.h> 52 52 #include <unistd.h> 53 #include <io/stream.h>54 53 #include <console.h> 55 54 … … 74 73 } 75 74 76 static int con_phone;77 78 79 75 static void start_standout(void) 80 76 { … … 89 85 void clear_screen(void) 90 86 { 91 async_msg_0(con_phone, CONSOLE_CLEAR);87 console_clear(); 92 88 moveto(0, 0); 93 89 } … … 101 97 102 98 resume_normal(); 103 async_msg_0(con_phone, CONSOLE_CLEAR);99 console_clear(); 104 100 curscore = -1; 105 101 memset((char *)curscreen, 0, sizeof(curscreen)); … … 112 108 scr_init(void) 113 109 { 114 con_phone = get_cons_phone(); 115 async_msg_1(con_phone, CONSOLE_CURSOR_VISIBILITY, 0); 110 console_cursor_visibility(0); 116 111 resume_normal(); 117 112 scr_clear(); … … 120 115 void moveto(int r, int c) 121 116 { 122 async_msg_2(con_phone, CONSOLE_GOTO,r, c);117 console_goto(r, c); 123 118 } 124 119 125 120 static void fflush(void) 126 121 { 127 async_msg_0(con_phone, CONSOLE_FLUSH);122 console_flush(); 128 123 } 129 124 … … 132 127 static int get_display_size(winsize_t *ws) 133 128 { 134 return async_req_0_2(con_phone, CONSOLE_GETSIZE, &ws->ws_row, 135 &ws->ws_col); 129 return console_get_size(&ws->ws_row, &ws->ws_col); 136 130 } 137 131
Note:
See TracChangeset
for help on using the changeset viewer.