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/lab.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/lab.cpp')
-rw-r--r-- | engines/lab/lab.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index 7a80f64f9c..be5b9556e1 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -43,6 +43,7 @@ #include "lab/music.h" #include "lab/processroom.h" #include "lab/resource.h" +#include "lab/tilepuzzle.h" #include "lab/utils.h" namespace Lab { @@ -86,6 +87,7 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) _anim = nullptr; _graphics = nullptr; _rooms = nullptr; + _tilePuzzle = nullptr; _utils = nullptr; _lastTooLong = false; @@ -97,12 +99,8 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) for (int i = 0; i < 10; i++) { _invImages[i] = nullptr; - _numberImages[i] = nullptr; } - for (int i = 0; i < 16; i++) - _tiles[i] = nullptr; - _curFileName = nullptr; _nextFileName = nullptr; _newFileName = nullptr; @@ -128,8 +126,6 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) _imgXMark = nullptr; _maps = nullptr; - initTilePuzzle(); - //const Common::FSNode gameDataDir(ConfMan.get("path")); //SearchMan.addSubDirectoryMatching(gameDataDir, "game"); //SearchMan.addSubDirectoryMatching(gameDataDir, "game/pict"); @@ -147,6 +143,7 @@ LabEngine::~LabEngine() { delete _anim; delete _graphics; delete[] _rooms; + delete _tilePuzzle; delete _utils; delete _imgMap; delete _imgRoom; @@ -164,9 +161,6 @@ LabEngine::~LabEngine() { delete _imgMapWest; delete _imgXMark; delete _maps; - - for (int i = 0; i < 16; i++) - delete _tiles[i]; } Common::Error LabEngine::run() { @@ -180,6 +174,7 @@ Common::Error LabEngine::run() { _music = new Music(this); _graphics = new DisplayMan(this); _anim = new Anim(this); + _tilePuzzle = new TilePuzzle(this); _utils = new Utils(this); if (getPlatform() == Common::kPlatformWindows) { |