Changeset 7122bc7 in mainline for uspace/app/tetris/screen.c


Ignore:
Timestamp:
2009-01-01T13:58:05Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fb69f39
Parents:
9805cde
Message:

More console IPC wrapper functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tetris/screen.c

    r9805cde r7122bc7  
    5151#include <string.h>
    5252#include <unistd.h>
    53 #include <io/stream.h>
    5453#include <console.h>
    5554
     
    7473}
    7574
    76 static int con_phone;
    77 
    78 
    7975static void start_standout(void)
    8076{
     
    8985void clear_screen(void)
    9086{
    91         async_msg_0(con_phone, CONSOLE_CLEAR);
     87        console_clear();
    9288        moveto(0, 0);
    9389}
     
    10197
    10298        resume_normal();
    103         async_msg_0(con_phone, CONSOLE_CLEAR);
     99        console_clear();
    104100        curscore = -1;
    105101        memset((char *)curscreen, 0, sizeof(curscreen));
     
    112108scr_init(void)
    113109{
    114         con_phone = get_cons_phone();
    115         async_msg_1(con_phone, CONSOLE_CURSOR_VISIBILITY, 0);
     110        console_cursor_visibility(0);
    116111        resume_normal();
    117112        scr_clear();
     
    120115void moveto(int r, int c)
    121116{
    122         async_msg_2(con_phone, CONSOLE_GOTO, r, c);
     117        console_goto(r, c);
    123118}
    124119
    125120static void fflush(void)
    126121{
    127         async_msg_0(con_phone, CONSOLE_FLUSH);
     122        console_flush();
    128123}
    129124
     
    132127static int get_display_size(winsize_t *ws)
    133128{
    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);
    136130}
    137131
Note: See TracChangeset for help on using the changeset viewer.