aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-05 09:39:20 +0200
committerEugene Sandulenko2016-05-05 09:39:20 +0200
commit0f6d2b86de910963ffc2ad3aa416b96db6878bae (patch)
tree9caa2978589cd9835bda5c113f9c40e4f35e78a3 /engines/saga
parentd576abb3a27c41546ad9d44f90e6d6c8c80e8a34 (diff)
downloadscummvm-rg350-0f6d2b86de910963ffc2ad3aa416b96db6878bae.tar.gz
scummvm-rg350-0f6d2b86de910963ffc2ad3aa416b96db6878bae.tar.bz2
scummvm-rg350-0f6d2b86de910963ffc2ad3aa416b96db6878bae.zip
SAGA: Initialization for IsoMap
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/isomap.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index 77680178c1..e50378b9c0 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -97,6 +97,23 @@ IsoMap::IsoMap(SagaEngine *vm) : _vm(vm) {
_viewScroll.x = (128 - 8) * 16;
_viewScroll.y = (128 - 8) * 16 - 64;
_viewDiff = 1;
+ _platformHeight = 0;
+ _queueCount = _readCount = 0;
+
+ for (int i = 0; i < SAGA_DRAGON_SEARCH_DIAMETER; i++)
+ for (int j = 0; j < SAGA_DRAGON_SEARCH_DIAMETER; j++)
+ _dragonSearchArray.cell[i][j].visited = _dragonSearchArray.cell[i][j].direction = 0;
+
+ for (int i = 0; i < SAGA_SEARCH_DIAMETER; i++)
+ for (int j = 0; j < SAGA_SEARCH_DIAMETER; j++)
+ _searchArray.cell[i][j].visited = _searchArray.cell[i][j].direction = 0;
+
+ for (int i = 0; i < SAGA_SEARCH_QUEUE_SIZE; i++) {
+ memset(&_dragonSearchArray.queue[i], 0, sizeof(DragonTilePoint));
+ memset(&_searchArray.queue[i], 0, sizeof(TilePoint));
+ }
+
+ memset(&_tileMap, 0, sizeof(TileMapData));
}
void IsoMap::loadImages(const ByteArray &resourceData) {