aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/smush
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-02-03 05:50:35 +0000
committerTorbjörn Andersson2007-02-03 05:50:35 +0000
commitea4053567806ab80037fdd5060503731e6991362 (patch)
tree1405ea18dc820b2eca8bcc2f9a434e3d05e21a26 /engines/scumm/smush
parent5395c4a2f4463ec2f3f9fdcc42d6f0a37f085620 (diff)
downloadscummvm-rg350-ea4053567806ab80037fdd5060503731e6991362.tar.gz
scummvm-rg350-ea4053567806ab80037fdd5060503731e6991362.tar.bz2
scummvm-rg350-ea4053567806ab80037fdd5060503731e6991362.zip
Applied the revised NUT font renderer patch #1635584, which combines cyx's
patch for correct (not to mention more efficient) rendering of CMI's shadowed letters, while retaining most of the memory savings of my original patch. This time, SMUSH and INSANE fonts also benefit from it. svn-id: r25345
Diffstat (limited to 'engines/scumm/smush')
-rw-r--r--engines/scumm/smush/smush_font.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/smush/smush_font.cpp b/engines/scumm/smush/smush_font.cpp
index de7fe9c460..0b194544d8 100644
--- a/engines/scumm/smush/smush_font.cpp
+++ b/engines/scumm/smush/smush_font.cpp
@@ -30,7 +30,7 @@
namespace Scumm {
SmushFont::SmushFont(ScummEngine *vm, const char *filename, bool use_original_colors, bool new_colors) :
- NutRenderer(vm, filename, false),
+ NutRenderer(vm, filename),
_color(-1),
_new_colors(new_colors),
_original(use_original_colors) {
@@ -65,7 +65,7 @@ int SmushFont::getStringHeight(const char *str) {
int SmushFont::drawChar(byte *buffer, int dst_width, int x, int y, byte chr) {
int w = _chars[chr].width;
int h = _chars[chr].height;
- const byte *src = _chars[chr].src;
+ const byte *src = unpackChar(chr);
byte *dst = buffer + dst_width * y + x;
assert(dst_width == _vm->_screenWidth);
@@ -74,7 +74,7 @@ int SmushFont::drawChar(byte *buffer, int dst_width, int x, int y, byte chr) {
for (int j = 0; j < h; j++) {
for (int i = 0; i < w; i++) {
int8 value = *src++;
- if (value)
+ if (value != _chars[chr].transparency)
dst[i] = value;
}
dst += dst_width;
@@ -89,7 +89,7 @@ int SmushFont::drawChar(byte *buffer, int dst_width, int x, int y, byte chr) {
dst[i] = 0xFF;
} else if (value == -31) {
dst[i] = 0;
- } else if (value) {
+ } else if (value != _chars[chr].transparency) {
dst[i] = value;
}
}
@@ -101,7 +101,7 @@ int SmushFont::drawChar(byte *buffer, int dst_width, int x, int y, byte chr) {
int8 value = *src++;
if (value == 1) {
dst[i] = color;
- } else if (value) {
+ } else if (value != _chars[chr].transparency) {
dst[i] = 0;
}
}