From 243e6d72928d1fc4cf20366eab9007980b945458 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 13 Mar 2015 14:46:15 +0100 Subject: Begin implement terminal --- src/lib/libkogata/draw.c | 8 ++++++++ src/lib/libkogata/gip.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lib/libkogata') diff --git a/src/lib/libkogata/draw.c b/src/lib/libkogata/draw.c index b9ef9bc..0536c03 100644 --- a/src/lib/libkogata/draw.c +++ b/src/lib/libkogata/draw.c @@ -208,6 +208,14 @@ void g_blit_region(fb_t *dst, int x, int y, fb_t *src, fb_region_t reg) { } } +void g_scroll_up(fb_t *dst, int l) { + for (unsigned y = 0; y < dst->geom.height - l; y++) { + memcpy(dst->data + y * dst->geom.pitch, + dst->data + (y + l) * dst->geom.pitch, + dst->geom.pitch); + } +} + // ---- Text manipulation #define FONT_ASCII_BITMAP 1 diff --git a/src/lib/libkogata/gip.c b/src/lib/libkogata/gip.c index 852cc05..cdfeb71 100644 --- a/src/lib/libkogata/gip.c +++ b/src/lib/libkogata/gip.c @@ -137,7 +137,7 @@ void giph_msg_header(mainloop_fd_t *fd) { ASSERT(fd == &h->mainloop_item); int code = h->msg_buf.code; - dbg_printf("Got GIP header, code %d\n", code); + /*dbg_printf("Got GIP header, code %d\n", code);*/ noarg_gip_callback_t use_cb = 0; if (code == GIPC_RESET) { -- cgit v1.2.3