diff options
author | Paul Gilbert | 2011-07-16 15:17:18 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-07-16 15:17:18 +1000 |
commit | c3f3120194151cdeb31d9b3622c76cd4e5b7ed6a (patch) | |
tree | befc674957aa5e322c87ecd5f47464557634bdcb /engines/cge/cge_main.cpp | |
parent | 453fbb7454b5e6d517febd29aea4e589c44247bf (diff) | |
download | scummvm-rg350-c3f3120194151cdeb31d9b3622c76cd4e5b7ed6a.tar.gz scummvm-rg350-c3f3120194151cdeb31d9b3622c76cd4e5b7ed6a.tar.bz2 scummvm-rg350-c3f3120194151cdeb31d9b3622c76cd4e5b7ed6a.zip |
CGE: Cleaned up room preview handling code and fixed memory leak
Diffstat (limited to 'engines/cge/cge_main.cpp')
-rw-r--r-- | engines/cge/cge_main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 3c926a3f89..e518c668f4 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -90,8 +90,6 @@ static char _usrFnam[15] = "\0ɱ%^þúȼ´ ÇÉ"; //-------------------------------------------------------------------------- -static BMP_PTR *_miniShpList = NULL; -static BMP_PTR _miniShp[] = { NULL, NULL }; static bool _finis = false; int _offUseCount; uint16 *_intStackPtr = false; @@ -1364,11 +1362,15 @@ void CGEEngine::runGame() { killMidi(); if (_mini && INI_FILE::exist("MINI.SPR")) { + _miniShp = new BMP_PTR[2]; + _miniShp[0] = _miniShp[1] = NULL; + uint8 *ptr = (uint8 *) &*_mini; if (ptr != NULL) { loadSprite("MINI", -1, 0, MINI_X, MINI_Y); expandSprite(_miniCave = _sprite); // NULL is ok if (_miniCave) { + _miniCave->_flags._kill = false; _miniCave->_flags._hide = true; _miniCave->moveShapes(ptr); _miniShp[0] = new Bitmap(*_miniCave->shp()); |