aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-01-24 09:35:56 -0500
committerPaul Gilbert2015-01-24 09:35:56 -0500
commit2b5167cafcebe78e797318690080e2ed3706da28 (patch)
tree961f4793964376eaa71f5dadae88aa9b79dbde4d
parent1f8a5ea24a8c031979289953fdb674029338d9bc (diff)
downloadscummvm-rg350-2b5167cafcebe78e797318690080e2ed3706da28.tar.gz
scummvm-rg350-2b5167cafcebe78e797318690080e2ed3706da28.tar.bz2
scummvm-rg350-2b5167cafcebe78e797318690080e2ed3706da28.zip
XEEN: Fix side loading bug in Map::load
-rw-r--r--engines/xeen/map.cpp10
-rw-r--r--engines/xeen/map.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index 750e6347fb..4adf356a0c 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -857,8 +857,8 @@ void AnimationInfo::load(const Common::String &name) {
/*------------------------------------------------------------------------*/
Map::Map(XeenEngine *vm) : _vm(vm), _mobData(vm) {
- _townPortalSide = false;
_loadDarkSide = false;
+ _sideTownPortal = 0;
_sideObjects = 0;
_sideMonsters = 0;
_sidePictures = 0;
@@ -897,13 +897,13 @@ void Map::load(int mapId) {
_sideMonsters = 1;
_sidePictures = 1;
if (mapId >= 113 && mapId <= 127) {
- _townPortalSide = false;
+ _sideTownPortal = 0;
} else {
- _townPortalSide = _loadDarkSide;
+ _sideTownPortal = _loadDarkSide ? 1 : 0;
}
if (_vm->getGameID() == GType_WorldOfXeen) {
- if (_loadDarkSide) {
+ if (!_loadDarkSide) {
_animationInfo.load("clouds.dat");
_monsterData.load("xeen.mon");
_wallPicSprites.load("xeenpic.dat");
@@ -1050,7 +1050,7 @@ void Map::load(int mapId) {
filename = "085.obj";
_mobData._objectSprites[0]._spriteId = 85;
} else {
- filename = Common::String::format("xeen|%03d.%cbj",
+ filename = Common::String::format("%03d.%cbj",
_mobData._objectSprites[i]._spriteId,
_mobData._objectSprites[i]._spriteId >= 100 ? '0' : 'o');
}
diff --git a/engines/xeen/map.h b/engines/xeen/map.h
index 273a4b4a9d..499b451bbc 100644
--- a/engines/xeen/map.h
+++ b/engines/xeen/map.h
@@ -345,7 +345,7 @@ private:
MazeData _mazeData[9];
Common::String _mazeName;
SpriteResource _wallPicSprites;
- bool _townPortalSide;
+ int _sideTownPortal;
int _sidePictures;
int _sideObjects;
int _sideMonsters;