diff options
author | Filippos Karapetis | 2015-12-12 03:28:06 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:00 +0100 |
commit | 8f5c91ee07b65f977ec556e22a5ddf8a916f776d (patch) | |
tree | 8a92424fa3581e94f8ca3413496fa5d5c72766ba /engines/lab/engine.cpp | |
parent | b77f726469fd6ff3ccad633b75fe432392c3201d (diff) | |
download | scummvm-rg350-8f5c91ee07b65f977ec556e22a5ddf8a916f776d.tar.gz scummvm-rg350-8f5c91ee07b65f977ec556e22a5ddf8a916f776d.tar.bz2 scummvm-rg350-8f5c91ee07b65f977ec556e22a5ddf8a916f776d.zip |
LAB: Move all the tile puzzle related functionality into its own class
Diffstat (limited to 'engines/lab/engine.cpp')
-rw-r--r-- | engines/lab/engine.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 4cfdd454f9..b80910e091 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -40,6 +40,7 @@ #include "lab/music.h" #include "lab/processroom.h" #include "lab/resource.h" +#include "lab/tilepuzzle.h" #include "lab/utils.h" namespace Lab { @@ -122,8 +123,7 @@ void LabEngine::freeScreens() { for (uint16 imgIdx = 0; imgIdx < 10; imgIdx++) { delete _invImages[imgIdx]; - delete _numberImages[imgIdx]; - _invImages[imgIdx] = _numberImages[imgIdx] = nullptr; + _invImages[imgIdx] = nullptr; } } @@ -459,13 +459,11 @@ void LabEngine::mainGameLoop() { if (_closeDataPtr) { if ((_closeDataPtr->_closeUpType == SPECIALLOCK) && _mainDisplay) - // LAB: Labyrinth specific code - showCombination(_curFileName); + _tilePuzzle->showCombination(_curFileName); else if (((_closeDataPtr->_closeUpType == SPECIALBRICK) || (_closeDataPtr->_closeUpType == SPECIALBRICKNOMOUSE)) && _mainDisplay) - // LAB: Labyrinth specific code - showTile(_curFileName, (bool)(_closeDataPtr->_closeUpType == SPECIALBRICKNOMOUSE)); + _tilePuzzle->showTile(_curFileName, (bool)(_closeDataPtr->_closeUpType == SPECIALBRICKNOMOUSE)); else _graphics->readPict(_curFileName, false); } else @@ -943,10 +941,9 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo if (_closeDataPtr) { if ((_closeDataPtr->_closeUpType == SPECIALLOCK) && _mainDisplay) - // LAB: Labyrinth specific code - mouseCombination(curPos); + _tilePuzzle->mouseCombination(curPos); else if ((_closeDataPtr->_closeUpType == SPECIALBRICK) && _mainDisplay) - mouseTile(curPos); + _tilePuzzle->mouseTile(curPos); else doit = true; } else |