diff options
author | Strangerke | 2015-12-20 16:46:45 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:35:32 +0100 |
commit | 4dfc428bac7e80a89e9177786b806d8ad0436078 (patch) | |
tree | ae714d26db3b750f5511809e74733df49bb3ae82 /engines | |
parent | cc039ef1135dc6f751ef23e22c344b7b9456653c (diff) | |
download | scummvm-rg350-4dfc428bac7e80a89e9177786b806d8ad0436078.tar.gz scummvm-rg350-4dfc428bac7e80a89e9177786b806d8ad0436078.tar.bz2 scummvm-rg350-4dfc428bac7e80a89e9177786b806d8ad0436078.zip |
LAB: Some cleanup and refactoring
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lab/dispman.cpp | 6 | ||||
-rw-r--r-- | engines/lab/engine.cpp | 2 | ||||
-rw-r--r-- | engines/lab/intro.cpp | 72 | ||||
-rw-r--r-- | engines/lab/intro.h | 2 | ||||
-rw-r--r-- | engines/lab/processroom.cpp | 8 | ||||
-rw-r--r-- | engines/lab/tilepuzzle.cpp | 2 | ||||
-rw-r--r-- | engines/lab/tilepuzzle.h | 2 |
7 files changed, 47 insertions, 47 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index 32c33885af..d66d1a99cd 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -78,7 +78,7 @@ void DisplayMan::loadPict(const Common::String filename) { void DisplayMan::loadBackPict(const Common::String fileName, uint16 *highPal) { _fadePalette = highPal; _vm->_anim->_noPalChange = true; - readPict(fileName.c_str(), true); + readPict(fileName, true); for (uint16 i = 0; i < 16; i++) { highPal[i] = ((_vm->_anim->_diffPalette[i * 3] >> 2) << 8) + @@ -92,7 +92,7 @@ void DisplayMan::loadBackPict(const Common::String fileName, uint16 *highPal) { void DisplayMan::readPict(Common::String filename, bool playOnce, bool onlyDiffData, byte *memoryBuffer, uint16 maxHeight) { _vm->_anim->stopDiff(); - loadPict(filename.c_str()); + loadPict(filename); _vm->_music->updateMusic(); @@ -740,7 +740,7 @@ void DisplayMan::doScrollWipe(Common::String filename) { _vm->waitTOF(); } - readPict(filename.c_str(), true, true); + readPict(filename, true, true); setPalette(_vm->_anim->_diffPalette, 256); byte *mem = _vm->_anim->_rawDiffBM._planes[0]; diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 2d7725a145..cefc3579ea 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -466,7 +466,7 @@ void LabEngine::mainGameLoop() { case SPECIALBRICK: case SPECIALBRICKNOMOUSE: if (_mainDisplay) - _tilePuzzle->showTile(_curFileName.c_str(), (_closeDataPtr->_closeUpType == SPECIALBRICKNOMOUSE)); + _tilePuzzle->showTile(_curFileName, (_closeDataPtr->_closeUpType == SPECIALBRICKNOMOUSE)); break; default: _graphics->readPict(_curFileName.c_str(), false); diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index 4f9ba59217..6b28db9b34 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -214,7 +214,7 @@ void Intro::nReadPict(const Common::String filename, bool playOnce) { _vm->_anim->_doBlack = _introDoBlack; _vm->_anim->stopDiffEnd(); - _vm->_graphics->readPict(finalFileName.c_str(), playOnce); + _vm->_graphics->readPict(finalFileName, playOnce); } void Intro::introSequence() { @@ -228,12 +228,12 @@ void Intro::introSequence() { _vm->_anim->_doBlack = true; if (_vm->getPlatform() == Common::kPlatformDOS) { - nReadPict("EA0", true); - nReadPict("EA1", true); - nReadPict("EA2", true); - nReadPict("EA3", true); + nReadPict("EA0"); + nReadPict("EA1"); + nReadPict("EA2"); + nReadPict("EA3"); } else if (_vm->getPlatform() == Common::kPlatformWindows) { - nReadPict("WYRMKEEP", true); + nReadPict("WYRMKEEP"); // Wait 4 seconds for (uint16 i = 0; i < 4 * 1000 / 10; i++) { introEatMessages(); @@ -252,9 +252,9 @@ void Intro::introSequence() { _vm->_anim->_noPalChange = true; if (_vm->getPlatform() == Common::kPlatformDOS) - nReadPict("TNDcycle.pic", true); + nReadPict("TNDcycle.pic"); else - nReadPict("TNDcycle2.pic", true); + nReadPict("TNDcycle2.pic"); _vm->_anim->_noPalChange = false; _vm->_graphics->_fadePalette = palette; @@ -291,24 +291,24 @@ void Intro::introSequence() { _vm->_graphics->blackAllScreen(); _vm->_music->updateMusic(); - nReadPict("Title.A", true); - nReadPict("AB", true); + nReadPict("Title.A"); + nReadPict("AB"); musicDelay(); - nReadPict("BA", true); - nReadPict("AC", true); + nReadPict("BA"); + nReadPict("AC"); musicDelay(); if (_vm->getPlatform() == Common::kPlatformWindows) musicDelay(); // more credits on this page now - nReadPict("CA", true); - nReadPict("AD", true); + nReadPict("CA"); + nReadPict("AD"); musicDelay(); if (_vm->getPlatform() == Common::kPlatformWindows) musicDelay(); // more credits on this page now - nReadPict("DA", true); + nReadPict("DA"); musicDelay(); _vm->_music->updateMusic(); @@ -318,7 +318,7 @@ void Intro::introSequence() { TextFont *msgFont = _vm->_resource->getFont("F:Map.fon"); _vm->_anim->_noPalChange = true; - nReadPict("Intro.1", true); + nReadPict("Intro.1"); _vm->_anim->_noPalChange = false; for (uint16 i = 0; i < 16; i++) { @@ -337,28 +337,28 @@ void Intro::introSequence() { _vm->_music->updateMusic(); _introDoBlack = true; - nReadPict("Station1", true); + nReadPict("Station1"); doPictText("i.3", msgFont, false); - nReadPict("Station2", true); + nReadPict("Station2"); doPictText("i.4", msgFont, false); - nReadPict("Stiles4", true); + nReadPict("Stiles4"); doPictText("i.5", msgFont, false); - nReadPict("Stiles3", true); + nReadPict("Stiles3"); doPictText("i.6", msgFont, false); if (_vm->getPlatform() == Common::kPlatformWindows) - nReadPict("Platform2", true); + nReadPict("Platform2"); else - nReadPict("Platform", true); + nReadPict("Platform"); doPictText("i.7", msgFont, false); - nReadPict("Subway.1", true); + nReadPict("Subway.1"); doPictText("i.8", msgFont, false); - nReadPict("Subway.2", true); + nReadPict("Subway.2"); doPictText("i.9", msgFont, false); doPictText("i.10", msgFont, false); @@ -380,30 +380,30 @@ void Intro::introSequence() { doPictText("i.13", msgFont, false); _introDoBlack = false; - nReadPict("Daed0", true); + nReadPict("Daed0"); doPictText("i.14", msgFont, false); - nReadPict("Daed1", true); + nReadPict("Daed1"); doPictText("i.15", msgFont, false); - nReadPict("Daed2", true); + nReadPict("Daed2"); doPictText("i.16", msgFont, false); doPictText("i.17", msgFont, false); doPictText("i.18", msgFont, false); - nReadPict("Daed3", true); + nReadPict("Daed3"); doPictText("i.19", msgFont, false); doPictText("i.20", msgFont, false); - nReadPict("Daed4", true); + nReadPict("Daed4"); doPictText("i.21", msgFont, false); - nReadPict("Daed5", true); + nReadPict("Daed5"); doPictText("i.22", msgFont, false); doPictText("i.23", msgFont, false); doPictText("i.24", msgFont, false); - nReadPict("Daed6", true); + nReadPict("Daed6"); doPictText("i.25", msgFont, false); doPictText("i.26", msgFont, false); @@ -412,22 +412,22 @@ void Intro::introSequence() { doPictText("i.28", msgFont, false); _vm->_anim->stopDiffEnd(); - nReadPict("Daed8", true); + nReadPict("Daed8"); doPictText("i.29", msgFont, false); doPictText("i.30", msgFont, false); - nReadPict("Daed9", true); + nReadPict("Daed9"); doPictText("i.31", msgFont, false); doPictText("i.32", msgFont, false); doPictText("i.33", msgFont, false); - nReadPict("Daed9a", true); - nReadPict("Daed10", true); + nReadPict("Daed9a"); + nReadPict("Daed10"); doPictText("i.34", msgFont, false); doPictText("i.35", msgFont, false); doPictText("i.36", msgFont, false); - nReadPict("SubX", true); + nReadPict("SubX"); if (_quitIntro) { _vm->_graphics->setPen(0); diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 6f7bc97cfa..7eb4c6dc78 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -58,7 +58,7 @@ private: * Does a one second delay, but checks the music while doing it. */ void musicDelay(); - void nReadPict(const Common::String Filename, bool PlayOnce); + void nReadPict(const Common::String Filename, bool PlayOnce = true); LabEngine *_vm; bool _quitIntro, _introDoBlack; diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 496920bd3b..d3d37bee93 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -259,17 +259,17 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { break; case SHOWDIFF: - _graphics->readPict(actionList->_messages[0].c_str(), true); + _graphics->readPict(actionList->_messages[0], true); break; case SHOWDIFFCONT: - _graphics->readPict(actionList->_messages[0].c_str(), false); + _graphics->readPict(actionList->_messages[0], false); break; case LOADDIFF: if (actionList->_messages[0].size()) // Puts a file into memory - _graphics->loadPict(actionList->_messages[0].c_str()); + _graphics->loadPict(actionList->_messages[0]); break; @@ -291,7 +291,7 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { if (test != _curFileName) { _curFileName = test; - _graphics->readPict(_curFileName.c_str(), true); + _graphics->readPict(_curFileName, true); } } break; diff --git a/engines/lab/tilepuzzle.cpp b/engines/lab/tilepuzzle.cpp index c9214fde39..cb93f25ea6 100644 --- a/engines/lab/tilepuzzle.cpp +++ b/engines/lab/tilepuzzle.cpp @@ -251,7 +251,7 @@ void TilePuzzle::doTile(bool showsolution) { /** * Reads in a backdrop picture. */ -void TilePuzzle::showTile(const char *filename, bool showSolution) { +void TilePuzzle::showTile(const Common::String filename, bool showSolution) { _vm->_anim->_doBlack = true; _vm->_anim->_noPalChange = true; _vm->_graphics->readPict(filename, true); diff --git a/engines/lab/tilepuzzle.h b/engines/lab/tilepuzzle.h index a20f4ce04a..da159beeff 100644 --- a/engines/lab/tilepuzzle.h +++ b/engines/lab/tilepuzzle.h @@ -50,7 +50,7 @@ public: virtual ~TilePuzzle(); void mouseTile(Common::Point pos); - void showTile(const char *filename, bool showSolution); + void showTile(const Common::String filename, bool showSolution); void mouseCombination(Common::Point pos); void showCombination(const char *filename); void save(Common::OutSaveFile *file); |