aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kurushin2005-09-03 14:49:43 +0000
committerAndrew Kurushin2005-09-03 14:49:43 +0000
commite0e93168c38787a1aefc3d1f3e9bc49f07147e8e (patch)
tree22eac9710eaf4170ce26e85ebfc628c286c498fe
parentd8ab18ebb4fb249a181a66676281e63714fb8de7 (diff)
downloadscummvm-rg350-e0e93168c38787a1aefc3d1f3e9bc49f07147e8e.tar.gz
scummvm-rg350-e0e93168c38787a1aefc3d1f3e9bc49f07147e8e.tar.bz2
scummvm-rg350-e0e93168c38787a1aefc3d1f3e9bc49f07147e8e.zip
fix 1257536 Dragon walks in the air
some memory allocation minimization svn-id: r18742
-rw-r--r--saga/isomap.cpp8
-rw-r--r--saga/isomap.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/saga/isomap.cpp b/saga/isomap.cpp
index fc0c66a587..76f0094c89 100644
--- a/saga/isomap.cpp
+++ b/saga/isomap.cpp
@@ -1364,8 +1364,8 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
memset( &_dragonSearchArray, 0, sizeof(_dragonSearchArray));
- for (u = 0; u < SAGA_DRAGON_SEARCH_CENTER; u++) {
- for (v = 0; v < SAGA_DRAGON_SEARCH_CENTER; v++) {
+ for (u = 0; u < SAGA_DRAGON_SEARCH_DIAMETER; u++) {
+ for (v = 0; v < SAGA_DRAGON_SEARCH_DIAMETER; v++) {
pcell = _dragonSearchArray.getPathCell(u, v);
@@ -1380,8 +1380,8 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
tile = getTile(u1, v1, _platformHeight );
if (tile != NULL) {
mask = tile->terrainMask;
- if ( ((tile->terrainMask != 0) && (tile->GetFGDAttr() >= kTerrBlock)) ||
- ((tile->terrainMask != 0xFFFF) && (tile->GetBGDAttr() >= kTerrBlock)) ) {
+ if ( ((mask != 0) && (tile->GetFGDAttr() >= kTerrBlock)) ||
+ ((mask != 0xFFFF) && (tile->GetBGDAttr() >= kTerrBlock)) ) {
pcell->visited = 1;
}
} else {
diff --git a/saga/isomap.h b/saga/isomap.h
index eb1185a47d..be536947d7 100644
--- a/saga/isomap.h
+++ b/saga/isomap.h
@@ -232,11 +232,11 @@ private:
uint16 _platformHeight;
struct DragonPathCell {
- uint16 visited:1,direction:3;
+ uint8 visited:1,direction:3;
};
struct DragonTilePoint {
int8 u, v;
- uint16 direction:4;
+ uint8 direction:4;
};
struct PathCell {
uint16 visited:1,direction:3,cost:12;