Skip to content

Commit

Permalink
CHEWY: Optimize font drawing
Browse files Browse the repository at this point in the history
Thanks to _sev for the suggestion
  • Loading branch information
bluegr committed Oct 5, 2016
1 parent 18d6c50 commit 384b61a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/chewy/text.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 384b61a

Please sign in to comment.