From f8bf5ed867e0a4ebe4b7a30361217bfc85656dbc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 24 Dec 2015 13:07:18 +0200 Subject: LAB: Simplify flowText() a bit Since the extra image buffer is only used in one place, we can save ourselves one assignment --- engines/lab/dispman.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3