aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-24 13:07:18 +0200
committerFilippos Karapetis2015-12-24 13:07:18 +0200
commitf8bf5ed867e0a4ebe4b7a30361217bfc85656dbc (patch)
tree29d5c36c94e06adf293e4d892ec6616146d41fb4 /engines
parent8b45875e245f8eba2403987cdb4ba128720048a9 (diff)
downloadscummvm-rg350-f8bf5ed867e0a4ebe4b7a30361217bfc85656dbc.tar.gz
scummvm-rg350-f8bf5ed867e0a4ebe4b7a30361217bfc85656dbc.tar.bz2
scummvm-rg350-f8bf5ed867e0a4ebe4b7a30361217bfc85656dbc.zip
LAB: Simplify flowText() a bit
Since the extra image buffer is only used in one place, we can save ourselves one assignment
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/dispman.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index b6ffbf8b2e..376c8ad6d9 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -149,11 +149,10 @@ int DisplayMan::flowText(TextFont *font, int16 spacing, byte penColor, byte back
bool fillBack, bool centerh, bool centerv, bool output, Common::Rect textRect, const char *str, Image *targetImage) {
byte *saveDisplayBuffer = _currentDisplayBuffer;
- uint32 bytesPerPage = _screenBytesPerPage;
if (targetImage) {
_currentDisplayBuffer = targetImage->_imageData;
- _screenBytesPerPage = (uint32)targetImage->_width * (int32)targetImage->_height;
+ assert(_screenBytesPerPage == (uint32)(targetImage->_width * targetImage->_height));
}
if (fillBack)
@@ -201,7 +200,6 @@ int DisplayMan::flowText(TextFont *font, int16 spacing, byte penColor, byte back
len--;
- _screenBytesPerPage = bytesPerPage;
_currentDisplayBuffer = saveDisplayBuffer;
return len;