diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-15 15:10:41 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-15 15:10:41 +0200 |
commit | c19dcac092c594598e1ef3ab745189adf84b32d0 (patch) | |
tree | f955409767637cca47a681bf7909a399ab80e930 /include/object | |
parent | 4b0d2a30c0068ace46ae0cda442b01ae06a86e19 (diff) |
add framebuffer and pervasive aurora mb test app
Diffstat (limited to 'include/object')
-rw-r--r-- | include/object/framebuffer.h | 21 |
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; |