aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/gfx.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-11 08:09:11 +0300
committerEugene Sandulenko2013-09-06 14:48:17 +0300
commitf18e318f788d126b6c39232afaf0012ef401d55d (patch)
tree0ded7bb7305ca6bb2147bc46fd81574dbf39a596 /engines/fullpipe/gfx.cpp
parentc2103bb9cd4b8b2958ea99c7797df2cd4f0905d5 (diff)
downloadscummvm-rg350-f18e318f788d126b6c39232afaf0012ef401d55d.tar.gz
scummvm-rg350-f18e318f788d126b6c39232afaf0012ef401d55d.tar.bz2
scummvm-rg350-f18e318f788d126b6c39232afaf0012ef401d55d.zip
FULLPIPE: Bitmap loading
Diffstat (limited to 'engines/fullpipe/gfx.cpp')
-rw-r--r--engines/fullpipe/gfx.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 15a3defa59..b06968e77f 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -24,8 +24,24 @@
#include "fullpipe/objects.h"
+#include "common/memstream.h"
+
namespace Fullpipe {
+void Bitmap::load(Common::ReadStream *s) {
+ x = s->readUint32LE();
+ y = s->readUint32LE();
+ width = s->readUint32LE();
+ height = s->readUint32LE();
+ s->readUint32LE(); // pixels
+ type = s->readUint32LE();
+ field_18 = s->readUint32LE();
+ flags = s->readUint32LE();
+
+ debug(9, "x: %d y: %d w: %d h: %d", x, y, width, height);
+ debug(9, "type: %d field_18: %d flags: 0x%x", type, field_18, flags);
+}
+
Background::Background() {
_x = 0;
_y = 0;
@@ -227,6 +243,27 @@ void Picture::setAOIDs() {
warning("STUB: Picture::setAOIDs()");
}
+void Picture::init() {
+ _bitmap = new Bitmap();
+
+ getDibInfo();
+
+ _bitmap->flags |= 0x1000000;
+}
+
+void Picture::getDibInfo() {
+ int off = _dataSize & ~0xf;
+
+ if (_dataSize != off) {
+ warning("Uneven data size: 0x%x", _dataSize);
+ }
+
+ Common::MemoryReadStream *s = new Common::MemoryReadStream(_data + off, 32);
+
+ _bitmap->load(s);
+ _bitmap->pixels = _data;
+}
+
BigPicture::BigPicture() {
}