aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/draci/font.cpp')
-rw-r--r--engines/draci/font.cpp11
1 files changed, 7 insertions, 4 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