summaryrefslogtreecommitdiff
path: root/include/object
diff options
context:
space:
mode:
Diffstat (limited to 'include/object')
-rw-r--r--include/object/framebuffer.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/object/framebuffer.h b/include/object/framebuffer.h
new file mode 100644
index 0000000..6eac7e0
--- /dev/null
+++ b/include/object/framebuffer.h
@@ -0,0 +1,21 @@
+#pragma once
+
+class Framebuffer
+{
+ public:
+ unsigned char *data;
+
+ Framebuffer(unsigned char *data) : data(data) {}
+
+ constexpr static unsigned int const width = CONFIG_framebuffer_width;
+ constexpr static unsigned int const height = CONFIG_framebuffer_height;
+
+ void clear();
+ void fillBox(unsigned int x, unsigned int y, unsigned int w, unsigned int h);
+ void drawAt(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *image);
+
+ private:
+ Framebuffer(Framebuffer& copy);
+};
+
+extern Framebuffer fb;