diff options
author | Filippos Karapetis | 2008-12-07 18:49:35 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-07 18:49:35 +0000 |
commit | 78fd335a4260a16664083fbf3333b8fba52e75ea (patch) | |
tree | 49fbddacfc7a9a97eb984451da285d58b0ac5f97 /engines/saga/font.cpp | |
parent | c2424b04a5964e4763a7d7c123317dec925c8214 (diff) | |
download | scummvm-rg350-78fd335a4260a16664083fbf3333b8fba52e75ea.tar.gz scummvm-rg350-78fd335a4260a16664083fbf3333b8fba52e75ea.tar.bz2 scummvm-rg350-78fd335a4260a16664083fbf3333b8fba52e75ea.zip |
More dirty rectangle related changes (dirty rectangle handling is still broken)
svn-id: r35281
Diffstat (limited to 'engines/saga/font.cpp')
-rw-r--r-- | engines/saga/font.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp index d9d8a4ab8a..58c37a9e74 100644 --- a/engines/saga/font.cpp +++ b/engines/saga/font.cpp @@ -30,6 +30,7 @@ #include "saga/rscfile.h" #include "saga/font.h" +#include "saga/render.h" namespace Saga { @@ -304,15 +305,15 @@ void Font::outFont(const FontStyle &drawFont, const char *text, size_t count, co const byte *textPointer; byte *c_dataPointer; int c_code; - int charRow; + int charRow = 0; Point textPoint(point); byte *outputPointer; byte *outputPointer_min; byte *outputPointer_max; - int row; - int rowLimit; + int row = 0; + int rowLimit = 0; int c_byte_len; int c_byte; @@ -406,6 +407,10 @@ void Font::outFont(const FontStyle &drawFont, const char *text, size_t count, co // Advance tracking position textPoint.x += drawFont.fontCharEntry[c_code].tracking; } // end per-character processing + + rowLimit = (_vm->_gfx->getBackBufferHeight() < (textPoint.y + drawFont.header.charHeight)) ? _vm->_gfx->getBackBufferHeight() : textPoint.y + drawFont.header.charHeight; + // TODO: for now we add a dirty rect that ends at the right of the screen + _vm->_render->addDirtyRect(Common::Rect(textPoint.x, textPoint.y, _vm->_gfx->getBackBufferWidth(), rowLimit)); } |