diff options
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/dispman.cpp | 10 | ||||
-rw-r--r-- | engines/lab/dispman.h | 6 | ||||
-rw-r--r-- | engines/lab/music.cpp | 4 | ||||
-rw-r--r-- | engines/lab/music.h | 2 | ||||
-rw-r--r-- | engines/lab/processroom.cpp | 30 | ||||
-rw-r--r-- | engines/lab/processroom.h | 2 |
6 files changed, 27 insertions, 27 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index f570493e99..bb07ba3f66 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -730,7 +730,7 @@ void DisplayMan::copyPage(uint16 width, uint16 height, uint16 nheight, uint16 st } } -void DisplayMan::doScrollWipe(char *filename) { +void DisplayMan::doScrollWipe(Common::String filename) { _vm->_event->mouseHide(); uint16 width = _vm->_utils->vgaScaleX(320); uint16 height = _vm->_utils->vgaScaleY(149) + _vm->_utils->svgaCord(2); @@ -740,7 +740,7 @@ void DisplayMan::doScrollWipe(char *filename) { _vm->waitTOF(); } - readPict(filename, true, true); + readPict(filename.c_str(), true, true); setPalette(_vm->_anim->_diffPalette, 256); byte *mem = _vm->_anim->_rawDiffBM._planes[0]; @@ -824,7 +824,7 @@ void DisplayMan::doScrollBounce() { _vm->_event->mouseShow(); } -void DisplayMan::doTransWipe(CloseDataPtr *closePtrList, char *filename) { +void DisplayMan::doTransWipe(CloseDataPtr *closePtrList, Common::String filename) { uint16 lastY, linesLast; if (_vm->_isHiRes) { @@ -860,7 +860,7 @@ void DisplayMan::doTransWipe(CloseDataPtr *closePtrList, char *filename) { setPen(0); } // for j - if (!filename) + if (!filename.size()) _vm->_curFileName = _vm->getPictName(closePtrList); else if (filename[0] > ' ') _vm->_curFileName = filename; @@ -911,7 +911,7 @@ void DisplayMan::doTransWipe(CloseDataPtr *closePtrList, char *filename) { delete[] bitMapBuffer; } -void DisplayMan::doTransition(TransitionType transitionType, CloseDataPtr *closePtrList, char *filename) { +void DisplayMan::doTransition(TransitionType transitionType, CloseDataPtr *closePtrList, Common::String filename) { switch (transitionType) { case kTransitionWipe: case kTransitionTransporter: diff --git a/engines/lab/dispman.h b/engines/lab/dispman.h index e9bba74b67..6be377d843 100644 --- a/engines/lab/dispman.h +++ b/engines/lab/dispman.h @@ -97,7 +97,7 @@ public: /** * Scrolls the display to a new picture from a black screen. */ - void doScrollWipe(char *filename); + void doScrollWipe(Common::String filename); /** * Does the scroll bounce. Assumes bitmap already in memory. @@ -107,12 +107,12 @@ public: /** * Does the transporter wipe. */ - void doTransWipe(CloseDataPtr *closePtrList, char *filename); + void doTransWipe(CloseDataPtr *closePtrList, Common::String filename); /** * Does a certain number of pre-programmed wipes. */ - void doTransition(TransitionType transitionType, CloseDataPtr *closePtrList, char *filename); + void doTransition(TransitionType transitionType, CloseDataPtr *closePtrList, Common::String filename); /** * Changes the front screen to black. diff --git a/engines/lab/music.cpp b/engines/lab/music.cpp index 8edd2a888b..a6f50b7cdf 100644 --- a/engines/lab/music.cpp +++ b/engines/lab/music.cpp @@ -258,7 +258,7 @@ void Music::checkRoomMusic() { /** * Changes the background music to something else. */ -void Music::changeMusic(const char *filename) { +void Music::changeMusic(const Common::String filename) { if (!_tFile) { _tFile = _file; _oldMusicOn = _musicOn; @@ -268,7 +268,7 @@ void Music::changeMusic(const char *filename) { _tLeftInFile = _leftInFile; } - _file = _vm->_resource->openDataFile(filename); + _file = _vm->_resource->openDataFile(filename.c_str()); // turn music off _musicOn = true; setMusic(false); diff --git a/engines/lab/music.h b/engines/lab/music.h index ba249e134b..820d403f81 100644 --- a/engines/lab/music.h +++ b/engines/lab/music.h @@ -80,7 +80,7 @@ public: public: Music(LabEngine *vm); - void changeMusic(const char *filename); + void changeMusic(const Common::String filename); void checkRoomMusic(); void freeMusic(); bool initMusic(const char *filename); diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 2a4d508b72..07e9633f44 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -243,38 +243,38 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { case PLAYSOUND: _music->_loopSoundEffect = false; _music->_waitTillFinished = true; - _music->readMusic((char *)actionList->_data, true); + _music->readMusic(actionList->_messages[0].c_str(), true); _music->_waitTillFinished = false; break; case PLAYSOUNDB: _music->_loopSoundEffect = false; _music->_waitTillFinished = false; - _music->readMusic((char *)actionList->_data, false); + _music->readMusic(actionList->_messages[0].c_str(), false); break; case PLAYSOUNDCONT: _music->_loopSoundEffect = true; - _music->readMusic((char *)actionList->_data, _music->_waitTillFinished); + _music->readMusic(actionList->_messages[0].c_str(), _music->_waitTillFinished); break; case SHOWDIFF: - _graphics->readPict((char *)actionList->_data, true); + _graphics->readPict(actionList->_messages[0].c_str(), true); break; case SHOWDIFFCONT: - _graphics->readPict((char *)actionList->_data, false); + _graphics->readPict(actionList->_messages[0].c_str(), false); break; case LOADDIFF: - if (actionList->_data) + if (actionList->_messages[0].size()) // Puts a file into memory - _graphics->loadPict((char *)actionList->_data); + _graphics->loadPict(actionList->_messages[0].c_str()); break; case TRANSITION: - _graphics->doTransition((TransitionType)actionList->_param1, closePtrList, (char *)actionList->_data); + _graphics->doTransition((TransitionType)actionList->_param1, closePtrList, actionList->_messages[0].c_str()); break; case NOUPDATE: @@ -307,7 +307,7 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { case SHOWMESSAGE: { _graphics->_doNotDrawMessage = false; - Common::String text = Common::String((char *)actionList->_data); + Common::String text = actionList->_messages[0]; if (_graphics->_longWinInFront) _graphics->longDrawMessage(text); else @@ -319,7 +319,7 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { case CSHOWMESSAGE: if (!*closePtrList) { - Common::String text = Common::String((char *)actionList->_data); + Common::String text = actionList->_messages[0]; _graphics->_doNotDrawMessage = false; _graphics->drawMessage(text); _graphics->_doNotDrawMessage = true; @@ -328,10 +328,10 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { break; case SHOWMESSAGES: { - char **str = (char **)actionList->_data; - _graphics->_doNotDrawMessage = false; - _graphics->drawMessage(Common::String(str[_utils->getRandom(actionList->_param1)])); - _graphics->_doNotDrawMessage = true; + Common::String *str = actionList->_messages; + _graphics->_doNotDrawMessage = false; + _graphics->drawMessage(str[_utils->getRandom(actionList->_param1)]); + _graphics->_doNotDrawMessage = true; } break; @@ -404,7 +404,7 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { break; case CHANGEMUSIC: - _music->changeMusic((const char *)actionList->_data); + _music->changeMusic(actionList->_messages[0]); _music->setMusicReset(false); break; diff --git a/engines/lab/processroom.h b/engines/lab/processroom.h index 49e328b3ec..60f696b7c2 100644 --- a/engines/lab/processroom.h +++ b/engines/lab/processroom.h @@ -113,7 +113,7 @@ struct Action { int16 _param1; int16 _param2; int16 _param3; - byte *_data; // Message, or a pointer to array of messages. + Common::String *_messages; Action *_nextAction; }; |