diff options
author | Max Horn | 2010-03-09 23:35:30 +0000 |
---|---|---|
committer | Max Horn | 2010-03-09 23:35:30 +0000 |
commit | da81c58af12467d3138caf8ee1664d7bbf290d60 (patch) | |
tree | d39cde3df244aa30c088d940e42fb07a21f60c16 /engines/drascula/drascula.cpp | |
parent | d9c4ee9376bde0a744ceae9fe6536664ffa08ac3 (diff) | |
download | scummvm-rg350-da81c58af12467d3138caf8ee1664d7bbf290d60.tar.gz scummvm-rg350-da81c58af12467d3138caf8ee1664d7bbf290d60.tar.bz2 scummvm-rg350-da81c58af12467d3138caf8ee1664d7bbf290d60.zip |
DRASCULA: Some cleanup; turn some global C++ objects into members of DrasculaEngine
svn-id: r48215
Diffstat (limited to 'engines/drascula/drascula.cpp')
-rw-r--r-- | engines/drascula/drascula.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 7aef05357f..7954ada562 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -102,12 +102,16 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam _lang = kEnglish; _keyBufferHead = _keyBufferTail = 0; + + _roomHandlers = 0; } DrasculaEngine::~DrasculaEngine() { delete _rnd; stopSound(); + freeRoomsTable(); + free(_charMap); free(_itemLocations); free(_polX); @@ -748,15 +752,15 @@ void DrasculaEngine::updateEvents() { } void DrasculaEngine::delay(int ms) { - _system->delayMillis(ms * 2); // originaly was 1 + _system->delayMillis(ms * 2); // originally was 1 } void DrasculaEngine::pause(int duration) { - _system->delayMillis(duration * 30); // was originaly 2 + _system->delayMillis(duration * 30); // was originally 2 } int DrasculaEngine::getTime() { - return _system->getMillis() / 20; // originaly was 1 + return _system->getMillis() / 20; // originally was 1 } void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) { @@ -1029,7 +1033,7 @@ void DrasculaEngine::freeTexts(char **ptr) { if (!ptr) return; - free(ptr[0]); + free(*ptr); free(ptr); } |