[Scummvm-cvs-logs] SF.net SVN: scummvm:[43044] scummvm/branches/gsoc2009-draci/engines/draci
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Tue Aug 4 17:41:27 CEST 2009
Revision: 43044
http://scummvm.svn.sourceforge.net/scummvm/?rev=43044&view=rev
Author: dkasak13
Date: 2009-08-04 15:41:27 +0000 (Tue, 04 Aug 2009)
Log Message:
-----------
* 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.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/font.cpp
scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
Modified: scummvm/branches/gsoc2009-draci/engines/draci/font.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/font.cpp 2009-08-04 14:53:43 UTC (rev 43043)
+++ scummvm/branches/gsoc2009-draci/engines/draci/font.cpp 2009-08-04 15:41:27 UTC (rev 43044)
@@ -158,6 +158,10 @@
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 @@
colour = kFontColour4;
break;
}
-
- // Paint pixel (if not transparent)
- if (colour != _transparent)
- ptr[x] = colour;
+
+ // Paint the pixel
+ ptr[x] = colour;
}
// Advance to next row
Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/game.cpp 2009-08-04 14:53:43 UTC (rev 43043)
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.cpp 2009-08-04 15:41:27 UTC (rev 43044)
@@ -54,7 +54,7 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list