aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/gfxbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction/gfxbase.cpp')
-rw-r--r--engines/parallaction/gfxbase.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index ae14dd3ae7..c1085299d8 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -28,6 +28,7 @@
#include "disk.h"
#include "common/algorithm.h"
+#include "parallaction/parallaction.h"
namespace Parallaction {
@@ -68,6 +69,13 @@ byte *GfxObj::getData(uint f) {
return _frames->getData(f);
}
+uint GfxObj::getRawSize(uint f) {
+ return _frames->getRawSize(f);
+}
+uint GfxObj::getSize(uint f) {
+ return _frames->getSize(f);
+}
+
void GfxObj::setFlags(uint32 flags) {
_flags |= flags;
@@ -157,7 +165,11 @@ void Gfx::drawGfxObjects(Graphics::Surface &surf) {
obj->getRect(obj->frame, rect);
rect.moveTo(obj->x, obj->y);
data = obj->getData(obj->frame);
- blt(rect, data, &surf, obj->layer, 0);
+ if (obj->getSize(obj->frame) == obj->getRawSize(obj->frame)) {
+ blt(rect, data, &surf, obj->layer, 0);
+ } else {
+ unpackBlt(rect, data, obj->getRawSize(obj->frame), &surf, obj->layer, 0);
+ }
}
}
}