diff options
author | Denis Kasak | 2009-08-04 15:41:27 +0000 |
---|---|---|
committer | Denis Kasak | 2009-08-04 15:41:27 +0000 |
commit | 41d7590835cbee3c0befe41031e08f4ded969dc9 (patch) | |
tree | 85e9102a336ab35e52d482056d581c77f9a5c7eb /engines/draci | |
parent | 5e2eefd4feeec43b532aef9a598b41adebfbfd5e (diff) | |
download | scummvm-rg350-41d7590835cbee3c0befe41031e08f4ded969dc9.tar.gz scummvm-rg350-41d7590835cbee3c0befe41031e08f4ded969dc9.tar.bz2 scummvm-rg350-41d7590835cbee3c0befe41031e08f4ded969dc9.zip |
* Reverted change that subtracts 1 from font colour indexes for various speaking characters; they are 0-based after all.
* Fixed font blitting algorithm to allow for both white fonts and transparency.
svn-id: r43044
Diffstat (limited to 'engines/draci')
-rw-r--r-- | engines/draci/font.cpp | 11 | ||||
-rw-r--r-- | engines/draci/game.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp index a3a261e293..4902965aa3 100644 --- a/engines/draci/font.cpp +++ b/engines/draci/font.cpp @@ -158,6 +158,10 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, bool markDirty) con int curr = y * _maxCharWidth + x; int colour = _charData[charOffset + curr]; + // If pixel is transparent, skip it + if (colour == _transparent) + continue; + // Replace colour with font colours switch (colour) { @@ -177,10 +181,9 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, bool markDirty) con colour = kFontColour4; break; } - - // Paint pixel (if not transparent) - if (colour != _transparent) - ptr[x] = colour; + + // Paint the pixel + ptr[x] = colour; } // Advance to next row diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 08207d4574..58eb10a0ce 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -54,7 +54,7 @@ Game::Game(DraciEngine *vm) : _vm(vm) { for (i = 0; i < numPersons; ++i) { _persons[i]._x = personData.readUint16LE(); _persons[i]._y = personData.readUint16LE(); - _persons[i]._fontColour = personData.readByte() - 1; + _persons[i]._fontColour = personData.readByte(); } // Close persons file |