diff options
author | Strangerke | 2015-12-17 18:46:46 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:07 +0100 |
commit | 25509777aa1770c07ab66729c371d28c825894ea (patch) | |
tree | 6ea05ae824ea618619bdae9630d3b2a16c0eed72 | |
parent | 054a7a1e19ffb3d5f5d298c0af3e0e33435d5ed7 (diff) | |
download | scummvm-rg350-25509777aa1770c07ab66729c371d28c825894ea.tar.gz scummvm-rg350-25509777aa1770c07ab66729c371d28c825894ea.tar.bz2 scummvm-rg350-25509777aa1770c07ab66729c371d28c825894ea.zip |
LAB: Get rid of flowTextScaled
-rw-r--r-- | engines/lab/dispman.cpp | 17 | ||||
-rw-r--r-- | engines/lab/dispman.h | 12 | ||||
-rw-r--r-- | engines/lab/intro.cpp | 2 | ||||
-rw-r--r-- | engines/lab/map.cpp | 6 | ||||
-rw-r--r-- | engines/lab/special.cpp | 6 |
5 files changed, 8 insertions, 35 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index 2db2bc1990..f2b3b46cc6 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -242,21 +242,6 @@ int DisplayMan::flowText( return len; } -int DisplayMan::flowTextScaled( - TextFont *font, // the TextAttr pointer - int16 spacing, // How much vertical spacing between the lines - byte penColor, // pen number to use for text - byte backPen, // the background color - bool fillBack, // Whether to fill the background - bool centerX, // Whether to center the text horizontally - bool centerY, // Whether to center the text vertically - bool output, // Whether to output any text - Common::Rect textRect, // Cords - const char *str) { - Common::Rect scaledRect = _vm->_utils->vgaRectScale(textRect.left, textRect.top, textRect.right, textRect.bottom); - return flowText(font, spacing, penColor, backPen, fillBack, centerX, centerY, output, scaledRect, str); -} - /** * Calls flowText, but flows it to memory. Same restrictions as flowText. */ @@ -320,7 +305,7 @@ int DisplayMan::longDrawMessage(const char *str) { createBox(198); _vm->_event->mouseShow(); - return flowTextScaled(_vm->_msgFont, 0, 1, 7, false, true, true, true, Common::Rect(6, 155, 313, 195), str); + return flowText(_vm->_msgFont, 0, 1, 7, false, true, true, true, _vm->_utils->vgaRectScale(6, 155, 313, 195), str); } /** diff --git a/engines/lab/dispman.h b/engines/lab/dispman.h index c00f18d9d7..2a86e344c1 100644 --- a/engines/lab/dispman.h +++ b/engines/lab/dispman.h @@ -106,18 +106,6 @@ public: Common::Rect textRect, // Cords const char *text); // The text itself - int flowTextScaled( - TextFont *font, // the TextAttr pointer - int16 spacing, // How much vertical spacing between the lines - byte penColor, // pen number to use for text - byte backPen, // the background color - bool fillBack, // Whether to fill the background - bool centerh, // Whether to center the text horizontally - bool centerv, // Whether to center the text vertically - bool output, // Whether to output any text - Common::Rect textRect, // Cords - const char *text); // The text itself - int flowTextToMem(Image *destIm, TextFont *font, // the TextAttr pointer int16 spacing, // How much vertical spacing between the lines diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index b2fa0b0786..45119f4a5d 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -103,7 +103,7 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { _vm->_graphics->setPen(7); _vm->_graphics->rectFillScaled(10, 10, 310, 190); - charDrawn = _vm->_graphics->flowTextScaled(msgFont, (!_vm->_isHiRes) * -1, 5, 7, false, false, true, true, Common::Rect(14, 11, 306, 189), (char *)curText); + charDrawn = _vm->_graphics->flowText(msgFont, (!_vm->_isHiRes) * -1, 5, 7, false, false, true, true, _vm->_utils->vgaRectScale(14, 11, 306, 189), (char *)curText); _vm->_graphics->fade(true, 0); } else charDrawn = _vm->_graphics->longDrawMessage((char *)curText); diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index cbd664e27e..78eaaf0d79 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -411,11 +411,11 @@ void LabEngine::drawMap(uint16 curRoom, uint16 curMsg, uint16 floorNum, bool fad if ((floorNum >= kFloorLower) && (floorNum <= kFloorCarnival)) { char *sptr = (char *)_resource->getStaticText(floorNum - 1).c_str(); - _graphics->flowTextScaled(_msgFont, 0, 5, 3, true, true, true, true, Common::Rect(14, 75, 134, 97), sptr); + _graphics->flowText(_msgFont, 0, 5, 3, true, true, true, true, _utils->vgaRectScale(14, 75, 134, 97), sptr); } if (_rooms[curMsg]._roomMsg) - _graphics->flowTextScaled(_msgFont, 0, 5, 3, true, true, true, true, Common::Rect(14, 148, 134, 186), _rooms[curMsg]._roomMsg); + _graphics->flowText(_msgFont, 0, 5, 3, true, true, true, true, _utils->vgaRectScale(14, 148, 134, 186), _rooms[curMsg]._roomMsg); if (fadeIn) _graphics->fade(true, 0); @@ -559,7 +559,7 @@ void LabEngine::processMap(uint16 curRoom) { _event->mouseHide(); _graphics->setPen(3); _graphics->rectFillScaled(13, 148, 135, 186); - _graphics->flowTextScaled(_msgFont, 0, 5, 3, true, true, true, true, Common::Rect(14, 148, 134, 186), sptr); + _graphics->flowText(_msgFont, 0, 5, 3, true, true, true, true, _utils->vgaRectScale(14, 148, 134, 186), sptr); if (_maps[oldMsg]._pageNumber == curFloor) drawRoomMap(oldMsg, (bool)(oldMsg == curRoom)); diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index c8cc616d30..5ed0919e82 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -95,10 +95,10 @@ void LabEngine::doWestPaper() { paperFont = _resource->getFont("P:Note.fon"); paperText = _resource->getText("Lab:Rooms/Col1"); - charsPrinted = _graphics->flowTextScaled(paperFont, -4, 0, 0, false, false, false, true, Common::Rect(45, y, 158, 148), paperText); + charsPrinted = _graphics->flowText(paperFont, -4, 0, 0, false, false, false, true, _utils->vgaRectScale(45, y, 158, 148), paperText); delete[] paperText; paperText = _resource->getText("Lab:Rooms/Col2"); - charsPrinted = _graphics->flowTextScaled(paperFont, -4, 0, 0, false, false, false, true, Common::Rect(162, y, 275, 148), paperText); + charsPrinted = _graphics->flowText(paperFont, -4, 0, 0, false, false, false, true, _utils->vgaRectScale(162, y, 275, 148), paperText); delete[] paperText; _graphics->closeFont(paperFont); @@ -172,7 +172,7 @@ void LabEngine::drawJournalText() { while (drawingToPage < _journalPage) { _music->updateMusic(); curText = (char *)(_journalText + charsDrawn); - charsDrawn += _graphics->flowTextScaled(_journalFont, -2, 2, 0, false, false, false, false, Common::Rect(52, 32, 152, 148), curText); + charsDrawn += _graphics->flowText(_journalFont, -2, 2, 0, false, false, false, false, _utils->vgaRectScale(52, 32, 152, 148), curText); _lastPage = (*curText == 0); |