diff options
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/drascula.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 1 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 12 |
3 files changed, 14 insertions, 2 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 8bf190ed2d..cf0453b87c 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -59,7 +59,6 @@ static const GameSettings drasculaSettings[] = { }; DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { - _charMap = 0; _itemLocations = 0; _polX = 0; @@ -101,6 +100,8 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam _rnd = new Common::RandomSource(); g_eventRec.registerRandomSource(*_rnd, "drascula"); + _console = 0; + int cd_num = ConfMan.getInt("cdrom"); if (cd_num >= 0) _system->getAudioCDManager()->openCD(cd_num); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 535a9005d2..9430e7b8e3 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -265,7 +265,6 @@ public: private: bool _fallBack; - }; class TextResourceParser { diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index c6dd9f29db..884697dec7 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -140,6 +140,18 @@ void DrasculaEngine::setupRoomsTable() { } void DrasculaEngine::freeRoomsTable() { + for (uint32 i = 0; i < _roomHandlers->roomParsers.size(); i++) + delete _roomHandlers->roomParsers[i]; + _roomHandlers->roomParsers.clear(); + + for (uint32 i = 0; i < _roomHandlers->roomPreupdaters.size(); i++) + delete _roomHandlers->roomPreupdaters[i]; + _roomHandlers->roomPreupdaters.clear(); + + for (uint32 i = 0; i < _roomHandlers->roomUpdaters.size(); i++) + delete _roomHandlers->roomUpdaters[i]; + _roomHandlers->roomUpdaters.clear(); + delete _roomHandlers; _roomHandlers = 0; } |