aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/ai-funcs.cpp2
-rw-r--r--engines/hdb/gfx.cpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 25fd043d5b..5c8f929fd2 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -409,6 +409,8 @@ bool AI::cacheEntGfx(AIEntity *e, bool init) {
}
}
j++;
+
+ delete gfxFiles;
}
e->aiInit = aiEntList[i].initFunc;
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index b493bb625a..de897074e0 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -76,24 +76,25 @@ bool Gfx::init() {
// Setup Tile Lookup Array
_tLookupArray = new TileLookup[_numTiles];
- Common::Array<const char *> tileData = *g_hdb->_fileMan->findFiles("t32_", TYPE_TILE32);
+ Common::Array<const char *> *tileData = g_hdb->_fileMan->findFiles("t32_", TYPE_TILE32);
- assert((uint)_numTiles == tileData.size());
+ assert((uint)_numTiles == tileData->size());
int index = 0, skyIndex = 0;
for (; index < _numTiles; index++) {
- _tLookupArray[index].filename = tileData[index];
+ _tLookupArray[index].filename = tileData->operator[](index);
_tLookupArray[index].tData = NULL;
_tLookupArray[index].skyIndex = 0;
_tLookupArray[index].animIndex = index;
// Check if the loaded Tile is a Sky Tile
- if (strstr(tileData[index], "sky") && (skyIndex < kMaxSkies)) {
+ if (strstr(tileData->operator[](index), "sky") && (skyIndex < kMaxSkies)) {
_tLookupArray[index].skyIndex = skyIndex + 1;
_skyTiles[skyIndex] = index;
skyIndex++;
}
}
+ delete tileData;
// Add Animating Tile Info
int found = -1;