Changeset 0c25c10 in mainline for uspace/app/tetris/screen.c


Ignore:
Timestamp:
2009-06-03T19:32:07Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
69e68e3
Parents:
cbff4c2
Message:

update for latest I/O changes

File:
1 edited

Legend:

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

    rcbff4c2 r0c25c10  
    5151#include <string.h>
    5252#include <unistd.h>
    53 #include <console.h>
    54 
     53#include <vfs/vfs.h>
    5554#include <async.h>
    5655#include "screen.h"
    5756#include "tetris.h"
    58 #include <ipc/console.h>
     57#include <io/console.h>
    5958
    6059static cell curscreen[B_SIZE];  /* 1 => standout (or otherwise marked) */
     
    6564/*
    6665 * putstr() is for unpadded strings (either as in termcap(5) or
    67  * simply literal strings); 
     66 * simply literal strings);
    6867 */
    6968static inline void putstr(char *s)
     
    7574static void start_standout(void)
    7675{
    77         console_set_rgb_color(0xf0f0f0, 0);
     76        console_set_rgb_color(fphone(stdout), 0xf0f0f0, 0);
    7877}
    7978
    8079static void resume_normal(void)
    8180{
    82         console_set_rgb_color(0, 0xf0f0f0);
     81        console_set_rgb_color(fphone(stdout), 0, 0xf0f0f0);
    8382}
    8483
    8584void clear_screen(void)
    8685{
    87         console_clear();
     86        console_clear(fphone(stdout));
    8887        moveto(0, 0);
    8988}
     
    9796
    9897        resume_normal();
    99         console_clear();
     98        console_clear(fphone(stdout));
    10099        curscore = -1;
    101100        memset((char *)curscreen, 0, sizeof(curscreen));
     
    108107scr_init(void)
    109108{
    110         console_cursor_visibility(0);
     109        console_cursor_visibility(fphone(stdout), 0);
    111110        resume_normal();
    112111        scr_clear();
     
    115114void moveto(int r, int c)
    116115{
    117         console_goto(r, c);
     116        console_goto(fphone(stdout), c, r);
    118117}
    119118
     
    122121static int get_display_size(winsize_t *ws)
    123122{
    124         return console_get_size(&ws->ws_row, &ws->ws_col);
     123        return console_get_size(fphone(stdout), &ws->ws_col, &ws->ws_row);
    125124}
    126125
Note: See TracChangeset for help on using the changeset viewer.