aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/cast.cpp4
-rw-r--r--engines/director/frame.cpp9
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 8ec151cb1b..4042f453bf 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -276,8 +276,8 @@ ShapeCast::ShapeCast(Common::ReadStreamEndian &stream, uint16 version) {
_shapeType = static_cast<ShapeType>(stream.readByte());
_initialRect = Score::readRect(stream);
_pattern = stream.readUint16BE();
- _fgCol = 0xff - (uint8)stream.readByte();
- _bgCol = 0xff - (uint8)stream.readByte();
+ _fgCol = (127 - stream.readByte()) & 0xff; // -128 -> 0, 127 -> 256
+ _bgCol = (127 - stream.readByte()) & 0xff;
_fillType = stream.readByte();
_ink = static_cast<InkType>(_fillType & 0x3f);
_lineThickness = stream.readByte();
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 672e856b97..66cb7fd21f 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -197,8 +197,13 @@ void Frame::readChannels(Common::ReadStreamEndian *stream) {
sprite._scriptId = stream->readByte();
sprite._spriteType = stream->readByte();
sprite._enabled = sprite._spriteType != 0;
- sprite._foreColor = 0xff - (uint8)stream->readByte();
- sprite._backColor = 0xff - (uint8)stream->readByte();
+ if (_vm->getVersion() >= 4) {
+ sprite._foreColor = 0xff - (uint8)stream->readByte();
+ sprite._backColor = 0xff - (uint8)stream->readByte();
+ } else {
+ sprite._foreColor = (127 - stream->readByte()) & 0xff; // -128 -> 0, 127 -> 256
+ sprite._backColor = (127 - stream->readByte()) & 0xff;
+ }
sprite._flags = stream->readUint16();
sprite._ink = static_cast<InkType>(sprite._flags & 0x3f);