diff options
Diffstat (limited to 'engines/hdb/map.cpp')
-rw-r--r-- | engines/hdb/map.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp index 5f76a0dacb..8f53524cb8 100644 --- a/engines/hdb/map.cpp +++ b/engines/hdb/map.cpp @@ -217,7 +217,22 @@ int Map::loadTiles() { } void Map::restartSystem() { - warning("STUB: Map::restartSystem()"); + _listBGAnimFast.clear(); + _listBGAnimMedium.clear(); + _listBGAnimSlow.clear(); + _listFGAnimFast.clear(); + _listFGAnimMedium.clear(); + _listFGAnimSlow.clear(); + + delete _background; + _background = NULL; + delete _foreground; + _foreground = NULL; + delete _iconList; + _iconList = NULL; + + _width = _height = 0; + _animCycle = 0; free(_mapExplosions); free(_mapExpBarrels); @@ -227,6 +242,10 @@ void Map::restartSystem() { _mapExpBarrels = NULL; _mapLaserBeams = NULL; + // mark all in-memory tiles as being in memory, but able to be freed + g_hdb->_gfx->markTileCacheFreeable(); + g_hdb->_gfx->markGfxCacheFreeable(); + _mapLoaded = false; } |