From 98e2eb0beed4f57461956a10eeae014bf88a51c6 Mon Sep 17 00:00:00 2001 From: cflip Date: Sun, 23 Jan 2022 17:11:38 -0700 Subject: Simple tile editor --- bitmap.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bitmap.h (limited to 'bitmap.h') diff --git a/bitmap.h b/bitmap.h new file mode 100644 index 0000000..76f2f7a --- /dev/null +++ b/bitmap.h @@ -0,0 +1,22 @@ +#pragma once + +#include + +class Bitmap { +public: + Bitmap(int width, int height) + : width(width), height(height) + { + data = new uint32_t[width * height]; + } + + Bitmap(const char* image); + + ~Bitmap() { delete[] data; } + + void clear(uint32_t colour); + void blit(Bitmap const& other, int x, int y, int xc, int yc, int w, int h); + + uint32_t* data; + int width, height; +}; \ No newline at end of file -- cgit v1.2.3