aboutsummaryrefslogtreecommitdiff
path: root/engines/director/cast.cpp
diff options
context:
space:
mode:
authorScott Percival2020-01-04 23:35:39 +0800
committerScott Percival2020-01-04 23:35:39 +0800
commit214042560531e069e7089f6058be5eb88397d15e (patch)
treee5e01d63bbd07edbe25e62d05b899fb1724fa13e /engines/director/cast.cpp
parent7fb14af6f97c80d1372bcdb9310e53f784350f69 (diff)
downloadscummvm-rg350-214042560531e069e7089f6058be5eb88397d15e.tar.gz
scummvm-rg350-214042560531e069e7089f6058be5eb88397d15e.tar.bz2
scummvm-rg350-214042560531e069e7089f6058be5eb88397d15e.zip
DIRECTOR: Fix palette for drawing operations
Diffstat (limited to 'engines/director/cast.cpp')
-rw-r--r--engines/director/cast.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 1d22da7228..8ec151cb1b 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 = (127 - stream.readByte()) & 0xff; // -128 -> 0, 127 -> 256
- _bgCol = (127 - stream.readByte()) & 0xff;
+ _fgCol = 0xff - (uint8)stream.readByte();
+ _bgCol = 0xff - (uint8)stream.readByte();
_fillType = stream.readByte();
_ink = static_cast<InkType>(_fillType & 0x3f);
_lineThickness = stream.readByte();
@@ -288,8 +288,8 @@ ShapeCast::ShapeCast(Common::ReadStreamEndian &stream, uint16 version) {
_shapeType = static_cast<ShapeType>(stream.readByte());
_initialRect = Score::readRect(stream);
_pattern = stream.readUint16BE();
- _fgCol = (127 - stream.readByte()) & 0xff; // -128 -> 0, 127 -> 256
- _bgCol = (127 - stream.readByte()) & 0xff;
+ _fgCol = 0xff - (uint8)stream.readByte();
+ _bgCol = 0xff - (uint8)stream.readByte();
_fillType = stream.readByte();
_ink = static_cast<InkType>(_fillType & 0x3f);
_lineThickness = stream.readByte();