Ejemplo n.º 1
0
void scroll_window(WINDOW* wnd)
{
	int x, y;
	int wx, wy;

	for(y=0;y<wnd->height-1;y++){
		wy = wnd->y + y;
		for(x=0;x<wnd->width;x++){
			wx = wnd->x + x;
			WORD w = peek_screen(wx,wy+1);
			poke_screen(wx,wy,w);
		}
	}
	wy = wnd->y + wnd->height - 1;
	for(x=0;x<wnd->width;x++){
		wx = wnd->x + x;
		poke_screen(wx,wy,0);
	}
	wnd->cursor_x = 0;
	wnd->cursor_y = wnd->height - 1;
}
Ejemplo n.º 2
0
void scroll_window(WINDOW* wnd) {
    int x, y;
    int wx, wy;
    volatile int flag;

    DISABLE_INTR(flag);
    for (y = 0; y < wnd->height - 1; y++) {
        wy = wnd->y + y;
        for (x = 0; x < wnd->width; x++) {
            wx = wnd->x + x;
            WORD ch = peek_screen(wx, wy + 1);
            poke_screen(wx, wy, ch);
        }
    }
    wy = wnd->y + wnd->height - 1;
    for (x = 0; x < wnd->width; x++) {
        wx = wnd->x + x;
        poke_screen(wx, wy, 0);
    }
    wnd->cursor_x = 0;
    wnd->cursor_y = wnd->height - 1;
    ENABLE_INTR(flag);
}