aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/bitmap.h
diff options
context:
space:
mode:
authorMatthew Stewart2018-02-23 02:11:40 -0500
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commitcd45502501787c8003cfd86b7adf48a6f86d68de (patch)
tree1d2a917fba484f3a5c7b4333ed290cb430bc3f92 /engines/startrek/bitmap.h
parentc71a8a6d2acb3be145731e6af344cb16a38c6b46 (diff)
downloadscummvm-rg350-cd45502501787c8003cfd86b7adf48a6f86d68de.tar.gz
scummvm-rg350-cd45502501787c8003cfd86b7adf48a6f86d68de.tar.bz2
scummvm-rg350-cd45502501787c8003cfd86b7adf48a6f86d68de.zip
STARTREK: Implement draw modes 2 and 3 for sprites
Diffstat (limited to 'engines/startrek/bitmap.h')
-rw-r--r--engines/startrek/bitmap.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/engines/startrek/bitmap.h b/engines/startrek/bitmap.h
new file mode 100644
index 0000000000..d30aee1e79
--- /dev/null
+++ b/engines/startrek/bitmap.h
@@ -0,0 +1,34 @@
+#ifndef STARTREK_BITMAP_H
+#define STARTREK_BITMAP_H
+
+#include "common/stream.h"
+
+namespace StarTrek {
+
+struct Bitmap {
+ uint16 xoffset;
+ uint16 yoffset;
+ uint16 width;
+ uint16 height;
+ byte *pixels;
+
+ Bitmap(Common::ReadStreamEndian *stream);
+ Bitmap(int w, int h);
+ ~Bitmap();
+
+protected:
+ Bitmap() : xoffset(0),yoffset(0),width(0),height(0),pixels(nullptr) {}
+};
+
+
+// TextBitmap is the same as Bitmap, except it stores character indices in its "pixels"
+// array instead of actual pixels.
+// A consequence of this is that the pixels array is smaller than otherwise expected
+// (since width/height still reflect the actual size when drawn).
+struct TextBitmap : Bitmap {
+ TextBitmap(int w, int h);
+};
+
+}
+
+#endif