aboutsummaryrefslogtreecommitdiff
path: root/engines/chewy
diff options
context:
space:
mode:
authorFilippos Karapetis2016-10-05 10:47:56 +0300
committerFilippos Karapetis2016-10-05 10:47:56 +0300
commit384b61a9fbf71eeee093fc47168650b1f4bee283 (patch)
treefb4b09cffb9b8580247c663b8bb9dcb951598a16 /engines/chewy
parent18d6c501fc8f1af50e0e945406233af7ae94a75a (diff)
downloadscummvm-rg350-384b61a9fbf71eeee093fc47168650b1f4bee283.tar.gz
scummvm-rg350-384b61a9fbf71eeee093fc47168650b1f4bee283.tar.bz2
scummvm-rg350-384b61a9fbf71eeee093fc47168650b1f4bee283.zip
CHEWY: Optimize font drawing
Thanks to _sev for the suggestion
Diffstat (limited to 'engines/chewy')
-rw-r--r--engines/chewy/text.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index e877b99f83..5a4a526eee 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -162,9 +162,10 @@ Font::Font(Common::String filename) {
for (uint n = 0; n < _count; n++) {
for (uint y = 0; y < _height; y++) {
+ p = (byte *)_fontSurface.getBasePtr(n * _width, y);
+
for (uint x = n * _width; x < n * _width + _width; x++) {
- p = (byte *)_fontSurface.getBasePtr(x, y);
- *p = (cur & (1 << bitIndex)) ? 0 : 0xFF;
+ *p++ = (cur & (1 << bitIndex)) ? 0 : 0xFF;
bitIndex--;
if (bitIndex < 0) {