diff options
| -rw-r--r-- | engines/director/frame.cpp | 25 | ||||
| -rw-r--r-- | engines/director/images.cpp | 4 | 
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());  | 
