aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-24 00:12:59 +0200
committerEugene Sandulenko2016-08-24 00:12:59 +0200
commit754907f40888c0cc0a2150550182b31804c4e891 (patch)
tree8c7d1a9b36597ebeda7bcb4de60ce3f636454000 /engines/director
parent1bbbb14b30b68319248ce4ead40a1e9a46f1e5f1 (diff)
downloadscummvm-rg350-754907f40888c0cc0a2150550182b31804c4e891.tar.gz
scummvm-rg350-754907f40888c0cc0a2150550182b31804c4e891.tar.bz2
scummvm-rg350-754907f40888c0cc0a2150550182b31804c4e891.zip
DIRECTOR: Gather statistic on correct bitmap sizes
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/frame.cpp25
-rw-r--r--engines/director/images.cpp4
2 files changed, 27 insertions, 2 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 1409120dd3..7e272d16a0 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -516,6 +516,21 @@ void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId) {
}
}
+static const int corrections[] = {
+ 1026, 27, 27, // Macro
+ 1027, 164, 170, // House
+ 1028, 154, 154, // Macromind Director
+ 1029, 158, 158, // Upper inscription
+ 1030, 54, 54, // lift
+ 1031, 116, 116, // Lower inscription
+ 1032, 113, 113, // Lower inscription 2
+ 1039, 50, 50,
+ 1041, 110, 110, // descr
+ 1042, 120, 121, // descr 2
+ 1065, 27, 27, // car
+ 0, 0, 0
+};
+
Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId, int w, int h) {
uint16 imgId = spriteId + 1024;
Image::ImageDecoder *img = NULL;
@@ -534,6 +549,16 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId, int w, int h) {
if (_vm->_currentScore->getArchive()->hasResource(MKTAG('B', 'I', 'T', 'D'), imgId)) {
if (_vm->getVersion() < 4) {
+ bool c = false;
+ for (int i = 0; corrections[i]; i += 3)
+ if (corrections[i] == imgId) {
+ w = corrections[i + 2];
+ c = true;
+ break;
+ }
+
+ if (!c)
+ warning("%d, %d, %d,", imgId, w, w);
img = new BITDDecoder(w, h);
} else {
img = new Image::BitmapDecoder();
diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index 6295d5bc52..db429af7e9 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -104,9 +104,9 @@ bool DIBDecoder::loadStream(Common::SeekableReadStream &stream) {
BITDDecoder::BITDDecoder(int w, int h) {
int oldw = w;
- w += 8 - (w + 7) % 8;
+ //w += 8 - (w + 7) % 8;
- warning("W: %d -> %d, %d", oldw, w, h);
+ //warning("W: %d -> %d, %d", oldw, w, h);
_surface = new Graphics::Surface();
_surface->create(w, h, Graphics::PixelFormat::createFormatCLUT8());