scummvm/engines/lab/special.cpp

479 lines
16 KiB
C++
Raw Normal View History

2014-10-06 14:50:05 +02:00
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
/*
* This code is based on Labyrinth of Time code with assistance of
*
* Copyright (c) 1993 Terra Nova Development
* Copyright (c) 2004 The Wyrmkeep Entertainment Co.
*
*/
2014-12-25 19:13:52 +01:00
#include "lab/lab.h"
2015-12-08 21:10:54 +01:00
#include "lab/anim.h"
#include "lab/dispman.h"
#include "lab/eventman.h"
2015-12-08 21:10:54 +01:00
#include "lab/image.h"
#include "lab/labsets.h"
#include "lab/music.h"
#include "lab/processroom.h"
2015-12-08 21:10:54 +01:00
#include "lab/resource.h"
#include "lab/utils.h"
2014-10-06 14:50:05 +02:00
namespace Lab {
2015-12-08 09:19:00 +01:00
#define BRIDGE0 148
#define BRIDGE1 104
#define DIRTY 175
#define NONEWS 135
#define NOCLEAN 152
2014-12-22 10:03:05 +01:00
void LabEngine::doNotes() {
TextFont *noteFont = _resource->getFont("F:Note.fon");
Common::String noteText = _resource->getText("Lab:Rooms/Notes");
2014-10-06 14:50:05 +02:00
Common::Rect textRect = Common::Rect(_utils->vgaScaleX(25) + _utils->svgaCord(15), _utils->vgaScaleY(50), _utils->vgaScaleX(295) - _utils->svgaCord(15), _utils->vgaScaleY(148));
_graphics->flowText(noteFont, -2 + _utils->svgaCord(1), 0, 0, false, false, true, true, textRect, noteText.c_str());
2015-12-10 07:04:59 +01:00
_graphics->setPalette(_anim->_diffPalette, 256);
2015-12-19 13:08:54 +01:00
_graphics->closeFont(&noteFont);
2014-10-06 14:50:05 +02:00
}
void LabEngine::doWestPaper() {
TextFont *paperFont = _resource->getFont("F:News22.fon");
Common::String paperText = _resource->getText("Lab:Rooms/Date");
Common::Rect textRect = Common::Rect(_utils->vgaScaleX(57), _utils->vgaScaleY(77) + _utils->svgaCord(2), _utils->vgaScaleX(262), _utils->vgaScaleY(91));
_graphics->flowText(paperFont, 0, 0, 0, false, true, false, true, textRect, paperText.c_str());
2015-12-19 13:08:54 +01:00
_graphics->closeFont(&paperFont);
2014-10-06 14:50:05 +02:00
paperFont = _resource->getFont("F:News32.fon");
paperText = _resource->getText("Lab:Rooms/Headline");
2015-12-10 10:51:02 +01:00
int fileLen = paperText.size() - 1;
textRect = Common::Rect(_utils->vgaScaleX(57), _utils->vgaScaleY(86) - _utils->svgaCord(2), _utils->vgaScaleX(262), _utils->vgaScaleY(118));
int charsPrinted = _graphics->flowText(paperFont, -8, 0, 0, false, true, false, true, textRect, paperText.c_str());
2015-12-10 10:51:02 +01:00
uint16 y;
if (charsPrinted < fileLen) {
2015-12-10 07:04:59 +01:00
y = 130 - _utils->svgaCord(5);
textRect = Common::Rect(_utils->vgaScaleX(57), _utils->vgaScaleY(86) - _utils->svgaCord(2), _utils->vgaScaleX(262), _utils->vgaScaleY(132));
_graphics->flowText(paperFont, -8 - _utils->svgaCord(1), 0, 0, false, true, false, true, textRect, paperText.c_str());
2014-10-06 14:50:05 +02:00
} else
2015-12-10 07:04:59 +01:00
y = 115 - _utils->svgaCord(5);
2015-12-10 10:51:02 +01:00
2015-12-19 13:08:54 +01:00
_graphics->closeFont(&paperFont);
paperFont = _resource->getFont("F:Note.fon");
paperText = _resource->getText("Lab:Rooms/Col1");
2015-12-22 00:43:53 +01:00
_graphics->flowText(paperFont, -4, 0, 0, false, false, false, true, _utils->vgaRectScale(45, y, 158, 148), paperText.c_str());
paperText = _resource->getText("Lab:Rooms/Col2");
2015-12-22 00:43:53 +01:00
_graphics->flowText(paperFont, -4, 0, 0, false, false, false, true, _utils->vgaRectScale(162, y, 275, 148), paperText.c_str());
2014-10-06 14:50:05 +02:00
_graphics->closeFont(&paperFont);
2015-12-10 07:04:59 +01:00
_graphics->setPalette(_anim->_diffPalette, 256);
2014-10-06 14:50:05 +02:00
}
void LabEngine::loadJournalData() {
2015-12-19 13:08:54 +01:00
if (_journalFont)
_graphics->closeFont(&_journalFont);
_journalFont = _resource->getFont("F:Journal.fon");
updateMusicAndEvents();
2014-10-06 14:50:05 +02:00
2015-12-19 14:14:11 +01:00
Common::String filename = "Lab:Rooms/j0";
2015-12-10 10:51:02 +01:00
bool bridge = _conditions->in(BRIDGE0) || _conditions->in(BRIDGE1);
bool dirty = _conditions->in(DIRTY);
bool news = !_conditions->in(NONEWS);
bool clean = !_conditions->in(NOCLEAN);
2014-10-06 14:50:05 +02:00
if (bridge && clean && news)
2015-12-19 14:14:11 +01:00
filename += '8';
2014-10-06 14:50:05 +02:00
else if (clean && news)
2015-12-19 14:14:11 +01:00
filename += '9';
2014-10-06 14:50:05 +02:00
else if (bridge && clean)
2015-12-19 14:14:11 +01:00
filename += '6';
2014-10-06 14:50:05 +02:00
else if (clean)
2015-12-19 14:14:11 +01:00
filename += '7';
2014-10-06 14:50:05 +02:00
else if (bridge && dirty && news)
2015-12-19 14:14:11 +01:00
filename += '4';
2014-10-06 14:50:05 +02:00
else if (dirty && news)
2015-12-19 14:14:11 +01:00
filename += '5';
2014-10-06 14:50:05 +02:00
else if (bridge && dirty)
2015-12-19 14:14:11 +01:00
filename += '2';
2014-10-06 14:50:05 +02:00
else if (dirty)
2015-12-19 14:14:11 +01:00
filename += '3';
2014-10-06 14:50:05 +02:00
else if (bridge)
2015-12-19 14:14:11 +01:00
filename += '1';
2014-10-06 14:50:05 +02:00
_journalText = _resource->getText(filename);
_journalTextTitle = _resource->getText("Lab:Rooms/jt");
2014-10-06 14:50:05 +02:00
2015-12-10 07:04:59 +01:00
Common::File *journalFile = _resource->openDataFile("P:JImage");
_journalButtonList.push_back(_event->createButton( 80, _utils->vgaScaleY(162) + _utils->svgaCord(1), 0, VKEY_LTARROW, new Image(journalFile, this), new Image(journalFile, this))); // back
_journalButtonList.push_back(_event->createButton(194, _utils->vgaScaleY(162) + _utils->svgaCord(1), 2, 0, new Image(journalFile, this), new Image(journalFile, this))); // cancel
_journalButtonList.push_back(_event->createButton(144, _utils->vgaScaleY(164) - _utils->svgaCord(1), 1, VKEY_RTARROW, new Image(journalFile, this), new Image(journalFile, this))); // forward
2015-12-03 15:06:45 +02:00
delete journalFile;
_anim->_noPalChange = true;
2015-12-13 22:55:10 +01:00
_journalBackImage->_imageData = new byte[_graphics->_screenWidth * _graphics->_screenHeight];
_graphics->readPict("P:Journal.pic", true, false, _journalBackImage->_imageData);
_anim->_noPalChange = false;
// Keep a copy of the blank journal
_blankJournal = new byte[_graphics->_screenWidth * _graphics->_screenHeight];
2015-12-13 22:55:10 +01:00
memcpy(_blankJournal, _journalBackImage->_imageData, _graphics->_screenWidth * _graphics->_screenHeight);
2015-12-13 22:55:10 +01:00
_screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
2014-10-06 14:50:05 +02:00
}
void LabEngine::drawJournalText() {
2015-12-10 10:51:02 +01:00
uint16 drawingToPage = 1;
int charsDrawn = 0;
const char *curText = _journalText.c_str();
2014-10-06 14:50:05 +02:00
while (drawingToPage < _journalPage) {
updateMusicAndEvents();
curText = _journalText.c_str() + charsDrawn;
2015-12-17 18:46:46 +01:00
charsDrawn += _graphics->flowText(_journalFont, -2, 2, 0, false, false, false, false, _utils->vgaRectScale(52, 32, 152, 148), curText);
2014-10-06 14:50:05 +02:00
_lastPage = (*curText == 0);
2014-10-06 14:50:05 +02:00
if (_lastPage)
_journalPage = (drawingToPage / 2) * 2;
2014-10-06 14:50:05 +02:00
else
2015-12-10 10:51:02 +01:00
drawingToPage++;
2014-10-06 14:50:05 +02:00
}
if (_journalPage <= 1) {
curText = _journalTextTitle.c_str();
_graphics->flowTextToMem(_journalBackImage, _journalFont, -2, 2, 0, false, true, true, true, _utils->vgaRectScale(52, 32, 152, 148), curText);
2014-10-06 14:50:05 +02:00
} else {
curText = _journalText.c_str() + charsDrawn;
charsDrawn += _graphics->flowTextToMem(_journalBackImage, _journalFont, -2, 2, 0, false, false, false, true, _utils->vgaRectScale(52, 32, 152, 148), curText);
2014-10-06 14:50:05 +02:00
}
updateMusicAndEvents();
curText = _journalText.c_str() + charsDrawn;
_lastPage = (*curText == 0);
_graphics->flowTextToMem(_journalBackImage, _journalFont, -2, 2, 0, false, false, false, true, _utils->vgaRectScale(171, 32, 271, 148), curText);
2014-10-06 14:50:05 +02:00
}
void LabEngine::turnPage(bool fromLeft) {
2015-12-10 10:51:02 +01:00
if (fromLeft) {
for (int i = 0; i < _graphics->_screenWidth; i += 8) {
updateMusicAndEvents();
waitTOF();
2015-12-13 22:55:10 +01:00
_screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
_journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false);
2014-10-06 14:50:05 +02:00
}
} else {
for (int i = (_graphics->_screenWidth - 8); i > 0; i -= 8) {
updateMusicAndEvents();
waitTOF();
2015-12-13 22:55:10 +01:00
_screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
_journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false);
2014-10-06 14:50:05 +02:00
}
}
}
void LabEngine::drawJournal(uint16 wipenum, bool needFade) {
_event->mouseHide();
updateMusicAndEvents();
2014-10-06 14:50:05 +02:00
drawJournalText();
_graphics->loadBackPict("P:Journal.pic", _highPalette);
2014-10-06 14:50:05 +02:00
if (wipenum == 0)
2015-12-13 22:55:10 +01:00
_journalBackImage->blitBitmap(0, 0, _screenImage, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight, false);
2014-10-06 14:50:05 +02:00
else
turnPage((wipenum == 1));
2014-10-06 14:50:05 +02:00
_event->toggleButton(_event->getButton(0), 15, (_journalPage > 0)); // back button
_event->toggleButton(_event->getButton(2), 15, (!_lastPage)); // forward button
2014-10-06 14:50:05 +02:00
if (needFade)
_graphics->fade(true, 0);
2014-10-06 14:50:05 +02:00
// Reset the journal background, so that all the text that has been blitted on it is erased
2015-12-13 22:55:10 +01:00
memcpy(_journalBackImage->_imageData, _blankJournal, _graphics->_screenWidth * _graphics->_screenHeight);
2014-10-06 14:50:05 +02:00
eatMessages();
_event->mouseShow();
2014-10-06 14:50:05 +02:00
}
void LabEngine::processJournal() {
2014-10-06 14:50:05 +02:00
while (1) {
2015-12-08 11:27:34 +01:00
// Make sure we check the music at least after every message
updateMusicAndEvents();
2015-12-13 15:37:39 +02:00
IntuiMessage *msg = _event->getMsg();
if (g_engine->shouldQuit()) {
_quitLab = true;
return;
}
2014-10-06 14:50:05 +02:00
if (!msg)
updateMusicAndEvents();
else {
2015-12-10 10:51:02 +01:00
uint32 msgClass = msg->_msgClass;
2015-12-16 23:27:32 +02:00
uint16 buttonId = msg->_code;
2014-10-06 14:50:05 +02:00
2015-12-18 00:41:24 +02:00
if ((msgClass == kMessageRightClick) ||
((msgClass == kMessageRawKey) && (buttonId == Common::KEYCODE_ESCAPE)))
2014-10-06 14:50:05 +02:00
return;
2015-12-18 00:41:24 +02:00
else if (msgClass == kMessageButtonUp) {
2015-12-16 23:27:32 +02:00
if (buttonId == 0) {
if (_journalPage >= 2) {
_journalPage -= 2;
2014-10-06 14:50:05 +02:00
drawJournal(1, false);
}
2015-12-16 23:27:32 +02:00
} else if (buttonId == 1) {
2014-10-06 14:50:05 +02:00
return;
2015-12-16 23:27:32 +02:00
} else if (buttonId == 2) {
if (!_lastPage) {
_journalPage += 2;
2014-10-06 14:50:05 +02:00
drawJournal(2, false);
}
}
}
}
}
}
void LabEngine::doJournal() {
_graphics->blackAllScreen();
2015-12-13 22:51:23 +01:00
_lastPage = false;
2014-10-06 14:50:05 +02:00
2015-12-13 22:55:10 +01:00
_screenImage->_width = _journalBackImage->_width = _graphics->_screenWidth;
_screenImage->_height = _journalBackImage->_height = _graphics->_screenHeight;
_journalBackImage->_imageData = nullptr;
_screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
2014-10-06 14:50:05 +02:00
updateMusicAndEvents();
2014-12-25 19:13:52 +01:00
loadJournalData();
2015-12-13 19:36:56 +02:00
_event->attachButtonList(&_journalButtonList);
drawJournal(0, true);
_event->mouseShow();
2014-10-06 14:50:05 +02:00
processJournal();
_event->attachButtonList(nullptr);
_graphics->fade(false, 0);
_event->mouseHide();
2015-12-08 17:34:12 +02:00
delete[] _blankJournal;
2015-12-13 22:55:10 +01:00
delete[] _journalBackImage->_imageData;
2015-12-22 00:12:12 +01:00
_blankJournal = _journalBackImage->_imageData = nullptr;
2015-12-13 19:36:56 +02:00
_event->freeButtonList(&_journalButtonList);
2015-12-19 13:08:54 +01:00
_graphics->closeFont(&_journalFont);
2014-10-06 14:50:05 +02:00
2015-12-13 22:55:10 +01:00
_screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
2014-10-06 14:50:05 +02:00
2015-12-14 22:50:09 +01:00
_graphics->setPen(0);
2015-12-06 14:36:49 +01:00
_graphics->rectFill(0, 0, _graphics->_screenWidth - 1, _graphics->_screenHeight - 1);
_graphics->blackScreen();
2014-10-06 14:50:05 +02:00
}
void LabEngine::drawMonText(char *text, TextFont *monitorFont, Common::Rect textRect, bool isinteractive) {
uint16 drawingToPage = 0, yspacing = 0;
int charsDrawn = 0;
2015-12-10 10:51:02 +01:00
char *curText = text;
2014-10-06 14:50:05 +02:00
_event->mouseHide();
2014-10-06 14:50:05 +02:00
if (*text == '%') {
text++;
uint16 numlines = (*text - '0') * 10;
2014-10-06 14:50:05 +02:00
text++;
numlines += (*text - '0');
text += 2;
uint16 fheight = _graphics->textHeight(monitorFont);
textRect.left = _monitorButton->_width + _utils->vgaScaleX(3);
2015-12-13 19:36:56 +02:00
_monitorButtonHeight = _monitorButton->_height + _utils->vgaScaleY(3);
2014-10-06 14:50:05 +02:00
2015-12-13 19:36:56 +02:00
if (_monitorButtonHeight > fheight)
yspacing = _monitorButtonHeight - fheight;
2014-10-06 14:50:05 +02:00
else
2015-12-13 19:36:56 +02:00
_monitorButtonHeight = fheight;
2014-10-06 14:50:05 +02:00
2015-12-14 22:50:09 +01:00
_graphics->setPen(0);
_graphics->rectFill(0, 0, _graphics->_screenWidth - 1, textRect.bottom);
2014-10-06 14:50:05 +02:00
for (uint16 i = 0; i < numlines; i++)
2015-12-13 19:36:56 +02:00
_monitorButton->drawImage(0, i * _monitorButtonHeight);
2014-10-06 14:50:05 +02:00
} else if (isinteractive) {
2015-12-14 22:50:09 +01:00
_graphics->setPen(0);
_graphics->rectFill(0, 0, _graphics->_screenWidth - 1, textRect.bottom);
2014-10-06 14:50:05 +02:00
} else {
2015-12-14 22:50:09 +01:00
_graphics->setPen(0);
_graphics->rectFill(textRect);
2014-10-06 14:50:05 +02:00
}
while (drawingToPage < _monitorPage) {
updateMusicAndEvents();
curText = text + charsDrawn;
charsDrawn += _graphics->flowText(monitorFont, yspacing, 0, 0, false, false, false, false, textRect, curText);
_lastPage = (*curText == 0);
2014-10-06 14:50:05 +02:00
if (_lastPage)
_monitorPage = drawingToPage;
2014-10-06 14:50:05 +02:00
else
2015-12-10 10:51:02 +01:00
drawingToPage++;
2014-10-06 14:50:05 +02:00
}
curText = text + charsDrawn;
_lastPage = (*curText == 0);
charsDrawn = _graphics->flowText(monitorFont, yspacing, 2, 0, false, false, false, true, textRect, curText);
_event->mouseShow();
2014-10-06 14:50:05 +02:00
}
void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isInteractive, Common::Rect textRect) {
Common::String startFileName = _monitorTextFilename;
CloseDataPtr startClosePtr = _closeDataPtr, lastClosePtr[10];
2014-10-06 14:50:05 +02:00
uint16 depth = 0;
lastClosePtr[0] = _closeDataPtr;
2014-10-06 14:50:05 +02:00
while (1) {
if (isInteractive) {
if (!_closeDataPtr)
_closeDataPtr = startClosePtr;
2014-10-06 14:50:05 +02:00
Common::String test;
if (_closeDataPtr == startClosePtr)
2015-12-10 10:51:02 +01:00
test = startFileName;
2014-10-06 14:50:05 +02:00
else
2015-12-10 10:51:02 +01:00
test = _closeDataPtr->_graphicName;
2014-10-06 14:50:05 +02:00
if (test != _monitorTextFilename) {
_monitorPage = 0;
_monitorTextFilename = test;
2014-10-06 14:50:05 +02:00
2015-12-20 16:04:20 +01:00
Common::String text = _resource->getText(_monitorTextFilename);
_graphics->fade(false, 0);
drawMonText((char *)text.c_str(), monitorFont, textRect, isInteractive);
_graphics->fade(true, 0);
2014-10-06 14:50:05 +02:00
}
}
2015-12-08 11:27:34 +01:00
// Make sure we check the music at least after every message
updateMusicAndEvents();
2015-12-13 15:37:39 +02:00
IntuiMessage *msg = _event->getMsg();
if (g_engine->shouldQuit()) {
_quitLab = true;
return;
}
2014-10-06 14:50:05 +02:00
if (!msg) {
updateMusicAndEvents();
2014-10-06 14:50:05 +02:00
} else {
2015-12-10 10:51:02 +01:00
uint32 msgClass = msg->_msgClass;
2015-12-18 00:58:36 +02:00
uint16 mouseX = msg->_mouse.x;
uint16 mouseY = msg->_mouse.y;
2015-12-10 10:51:02 +01:00
uint16 code = msg->_code;
2015-12-18 00:41:24 +02:00
if ((msgClass == kMessageRightClick) ||
((msgClass == kMessageRawKey) && (code == Common::KEYCODE_ESCAPE)))
2014-10-06 14:50:05 +02:00
return;
2015-12-18 00:41:24 +02:00
else if (msgClass == kMessageLeftClick) {
2015-12-10 07:04:59 +01:00
if ((mouseY >= _utils->vgaScaleY(171)) && (mouseY <= _utils->vgaScaleY(200))) {
if (mouseX <= _utils->vgaScaleX(31)) {
2014-10-06 14:50:05 +02:00
return;
} else if (mouseX <= _utils->vgaScaleX(59)) {
if (isInteractive) {
_monitorPage = 0;
2014-10-06 14:50:05 +02:00
if (depth) {
depth--;
_closeDataPtr = lastClosePtr[depth];
2014-10-06 14:50:05 +02:00
}
} else if (_monitorPage > 0) {
_monitorPage = 0;
drawMonText(ntext, monitorFont, textRect, isInteractive);
2014-10-06 14:50:05 +02:00
}
} else if (mouseX < _utils->vgaScaleX(259)) {
return;
} else if (mouseX <= _utils->vgaScaleX(289)) {
if (!_lastPage) {
_monitorPage += 1;
drawMonText(ntext, monitorFont, textRect, isInteractive);
}
} else if (_monitorPage >= 1) {
// mouseX between 290 and 320 (scaled)
_monitorPage -= 1;
drawMonText(ntext, monitorFont, textRect, isInteractive);
2014-10-06 14:50:05 +02:00
}
} else if (isInteractive) {
CloseDataPtr tmpClosePtr = _closeDataPtr;
2015-12-13 19:36:56 +02:00
mouseY = 64 + (mouseY / _monitorButtonHeight) * 42;
mouseX = 101;
setCurrentClose(Common::Point(mouseX, mouseY), &_closeDataPtr, false);
2014-10-06 14:50:05 +02:00
if (tmpClosePtr != _closeDataPtr) {
lastClosePtr[depth] = tmpClosePtr;
2014-10-06 14:50:05 +02:00
depth++;
}
}
}
}
}
}
2015-12-20 17:21:55 +01:00
void LabEngine::doMonitor(const Common::String background, const Common::String textfile, bool isinteractive, Common::Rect textRect) {
Common::Rect scaledRect = _utils->vgaRectScale(textRect.left, textRect.top, textRect.right, textRect.bottom);
_monitorTextFilename = textfile;
2014-10-06 14:50:05 +02:00
_graphics->blackAllScreen();
_graphics->readPict("P:Mon/Monitor.1");
_graphics->readPict("P:Mon/NWD1");
_graphics->readPict("P:Mon/NWD2");
_graphics->readPict("P:Mon/NWD3");
_graphics->blackAllScreen();
2014-10-06 14:50:05 +02:00
_monitorPage = 0;
_lastPage = false;
2015-12-14 08:59:16 +01:00
_graphics->_fadePalette = _highPalette;
2014-10-06 14:50:05 +02:00
TextFont *monitorFont = _resource->getFont("F:Map.fon");
2015-12-10 07:04:59 +01:00
Common::File *buttonFile = _resource->openDataFile("P:MonImage");
2015-12-13 22:51:23 +01:00
_monitorButton = new Image(buttonFile, this);
2015-12-05 18:14:50 +02:00
delete buttonFile;
2014-10-06 14:50:05 +02:00
Common::String ntext = _resource->getText(textfile);
_graphics->loadBackPict(background, _highPalette);
drawMonText((char *)ntext.c_str(), monitorFont, scaledRect, isinteractive);
_event->mouseShow();
_graphics->fade(true, 0);
processMonitor((char *)ntext.c_str(), monitorFont, isinteractive, scaledRect);
_graphics->fade(false, 0);
_event->mouseHide();
2015-12-19 13:08:54 +01:00
_graphics->closeFont(&monitorFont);
2014-10-06 14:50:05 +02:00
2015-12-14 22:50:09 +01:00
_graphics->setPen(0);
2015-12-06 14:36:49 +01:00
_graphics->rectFill(0, 0, _graphics->_screenWidth - 1, _graphics->_screenHeight - 1);
_graphics->blackAllScreen();
_graphics->freePict();
2014-10-06 14:50:05 +02:00
}
} // End of namespace Lab