aboutsummaryrefslogtreecommitdiff
path: root/src/lib/libkogata/draw.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-13 14:46:15 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-13 14:46:53 +0100
commit243e6d72928d1fc4cf20366eab9007980b945458 (patch)
treeb4b2a22d4ef4cbb33c8c17f904f82cde73093ea6 /src/lib/libkogata/draw.c
parentfb5efb630ab93893f8bb3036acbb591591a03032 (diff)
downloadkogata-243e6d72928d1fc4cf20366eab9007980b945458.tar.gz
kogata-243e6d72928d1fc4cf20366eab9007980b945458.zip
Begin implement terminal
Diffstat (limited to 'src/lib/libkogata/draw.c')
-rw-r--r--src/lib/libkogata/draw.c8
1 files changed, 8 insertions, 0 deletions
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