[Scummvm-cvs-logs] CVS: scummvm/scumm nut_renderer.cpp,1.10,1.11
Max Horn
fingolfin at users.sourceforge.net
Tue Dec 31 12:18:16 CET 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv11941
Modified Files:
nut_renderer.cpp
Log Message:
hack to get actor text color right
Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- nut_renderer.cpp 31 Dec 2002 18:17:05 -0000 1.10
+++ nut_renderer.cpp 31 Dec 2002 20:17:46 -0000 1.11
@@ -44,7 +44,7 @@
src += 2;
length -= 2;
- for (; size_line != 0;) {
+ while (size_line != 0) {
num = *src++;
val = *src++;
memset(dst, val, num);
@@ -210,6 +210,18 @@
for (int32 ty = 0; ty < height; ty++) {
for (int32 tx = 0; tx < width; tx++) {
byte pixel = *src++;
+#if 1
+ // FIXME: This way, at least the actor speech colors are done right.
+ // However, we still don't draw any "shadows" behind the text, and indeed
+ // the character data doesn't seem to contain it. So how does CMI draw the
+ // font shadows? Either they are stored seperatly and we have to render them
+ // in addition to the normal font. Or maybe the created the shadows dynamically
+ // on the fly: if we draw the character several times in black, moved a bit
+ // each time, that would mostly create the shadow effect. But why would they
+ // do this, as it would increase the char drawing time by factor 5-6 ?
+ if (pixel != 0)
+ dst[tx] = color;
+#else
if (pixel != 0) {
if (pixel == 0x01)
pixel = (color == 0) ? 0xf : color;
@@ -217,6 +229,7 @@
pixel = 0x0;
dst[tx] = pixel;
}
+#endif
}
dst += _vm->_realWidth;
}
More information about the Scummvm-git-logs
mailing list