diff options
author | Paul Gilbert | 2018-03-27 21:45:17 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-27 21:45:17 -0400 |
commit | 5b5abd47434c3d0680f7ca7df7eb6f7291dc4599 (patch) | |
tree | 89a582038782258b4a75c9f20e684b2f29e52f83 /engines | |
parent | 0fe261048f0710061cfca019d10b27751d804506 (diff) | |
download | scummvm-rg350-5b5abd47434c3d0680f7ca7df7eb6f7291dc4599.tar.gz scummvm-rg350-5b5abd47434c3d0680f7ca7df7eb6f7291dc4599.tar.bz2 scummvm-rg350-5b5abd47434c3d0680f7ca7df7eb6f7291dc4599.zip |
XEEN: Change Map _loadDarkSide bool to int _loadCcNum
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/debugger.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_control_panel.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_create_char.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_party.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_spells.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/interface.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/locations.cpp | 12 | ||||
-rw-r--r-- | engines/xeen/map.cpp | 8 | ||||
-rw-r--r-- | engines/xeen/map.h | 2 | ||||
-rw-r--r-- | engines/xeen/saves.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/scripts.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/spells.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/xeen.cpp | 4 |
13 files changed, 25 insertions, 25 deletions
diff --git a/engines/xeen/debugger.cpp b/engines/xeen/debugger.cpp index d5f1b40d29..bd6c8ad142 100644 --- a/engines/xeen/debugger.cpp +++ b/engines/xeen/debugger.cpp @@ -169,11 +169,11 @@ bool Debugger::cmdMap(int argc, const char **argv) { return true; } else { int mapId = strToInt(argv[1]); - bool side = argc < 3 ? files._ccNum : strToInt(argv[2]) != 0; + int side = argc < 3 ? files._ccNum : strToInt(argv[2]); int x = argc < 4 ? 8 : strToInt(argv[3]); int y = argc < 5 ? 8 : strToInt(argv[4]); - map._loadDarkSide = side; + map._loadCcNum = side; map.load(mapId); party._mazePosition.x = x; party._mazePosition.y = y; diff --git a/engines/xeen/dialogs/dialogs_control_panel.cpp b/engines/xeen/dialogs/dialogs_control_panel.cpp index 17c86ad5e3..5c4ed16712 100644 --- a/engines/xeen/dialogs/dialogs_control_panel.cpp +++ b/engines/xeen/dialogs/dialogs_control_panel.cpp @@ -97,11 +97,11 @@ int ControlPanel::execute() { sound.playFX(51); if (g_vm->getGameID() == GType_WorldOfXeen) { - map._loadDarkSide = false; + map._loadCcNum = 0; map.load(28); party._mazeDirection = DIR_EAST; } else { - map._loadDarkSide = true; + map._loadCcNum = 1; map.load(29); party._mazeDirection = DIR_SOUTH; } diff --git a/engines/xeen/dialogs/dialogs_create_char.cpp b/engines/xeen/dialogs/dialogs_create_char.cpp index 72f1b749ac..3115fbd10a 100644 --- a/engines/xeen/dialogs/dialogs_create_char.cpp +++ b/engines/xeen/dialogs/dialogs_create_char.cpp @@ -597,7 +597,7 @@ bool CreateCharacterDialog::saveCharacter(Character &c, int classId, Race race, c.clear(); c._name = name; c._savedMazeId = party._priorMazeId; - c._xeenSide = map._loadDarkSide; + c._xeenSide = map._loadCcNum; c._sex = sex; c._race = race; c._class = (CharacterClass)classId; diff --git a/engines/xeen/dialogs/dialogs_party.cpp b/engines/xeen/dialogs/dialogs_party.cpp index c3d6843ffd..306d1f9c2b 100644 --- a/engines/xeen/dialogs/dialogs_party.cpp +++ b/engines/xeen/dialogs/dialogs_party.cpp @@ -65,7 +65,7 @@ void PartyDialog::execute() { _charList.clear(); for (int i = 0; i < XEEN_TOTAL_CHARACTERS; ++i) { Character &player = party._roster[i]; - if (player._name.empty() || player._xeenSide != (map._loadDarkSide ? 1 : 0)) + if (player._name.empty() || player._xeenSide != map._loadCcNum) continue; _charList.push_back(i); diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp index 11c49989ac..296bf29071 100644 --- a/engines/xeen/dialogs/dialogs_spells.cpp +++ b/engines/xeen/dialogs/dialogs_spells.cpp @@ -777,7 +777,7 @@ bool LloydsBeacon::execute() { result = false; } else { sound.playFX(51); - map._loadDarkSide = ccNum; + map._loadCcNum = ccNum; if (c._lloydMap != party._mazeId || c._lloydSide != ccNum) { map.load(c._lloydMap); } diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index afa0bbbce6..201f98c029 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -850,7 +850,7 @@ void Interface::startFalling(bool flag) { break; case 103: case 104: - map._loadDarkSide = false; + map._loadCcNum = 0; party._mazeId = 8; party._mazePosition = Common::Point(11, 15); party._mazeDirection = DIR_NORTH; @@ -1729,7 +1729,7 @@ void Interface::doCombat() { if (reloadMap) { sound.playFX(51); - map._loadDarkSide = _vm->getGameID() != GType_WorldOfXeen; + map._loadCcNum = _vm->getGameID() != GType_WorldOfXeen ? 1 : 0; map.load(_vm->getGameID() == GType_WorldOfXeen ? 28 : 29); party._mazeDirection = _vm->getGameID() == GType_WorldOfXeen ? DIR_EAST : DIR_SOUTH; diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp index f22a43831c..f1d5348f33 100644 --- a/engines/xeen/locations.cpp +++ b/engines/xeen/locations.cpp @@ -710,7 +710,7 @@ Character *TavernLocation::doOptions(Character *c) { party._priorMazeId = party._mazeId; for (idx = 0; idx < (int)party._activeParty.size(); ++idx) { party._activeParty[idx]._savedMazeId = party._mazeId; - party._activeParty[idx]._xeenSide = map._loadDarkSide; + party._activeParty[idx]._xeenSide = map._loadCcNum; } g_vm->_mode = MODE_17; @@ -1472,7 +1472,7 @@ void ReaperCutscene::getNewLocation() { switch (party._mazeId) { case 7: if (party._questItems[30]) { - map._loadDarkSide = true; + map._loadCcNum = 1; _mazeId = 113; _mazePos = Common::Point(7, 4); _mazeDir = DIR_NORTH; @@ -1491,7 +1491,7 @@ void ReaperCutscene::getNewLocation() { case 13: if (party._questItems[29]) { - map._loadDarkSide = true; + map._loadCcNum = 1; _mazeId = 117; _mazePos = Common::Point(7, 4); _mazeDir = DIR_NORTH; @@ -1778,7 +1778,7 @@ void GolemCutscene::getNewLocation() { case 19: if (party._questItems[50]) { - map._loadDarkSide = true; + map._loadCcNum = 1; _mazeId = 121; _mazePos = Common::Point(18, 0); _mazeDir = DIR_NORTH; @@ -2138,7 +2138,7 @@ void SphinxCutscene::getNewLocation() { switch (party._mazeId) { case 2: if (party._questItems[51]) { - map._loadDarkSide = true; + map._loadCcNum = 1; _mazeId = 125; _mazePos = Common::Point(7, 6); _mazeDir = DIR_NORTH; @@ -2195,7 +2195,7 @@ int PyramidLocation::show() { } // Load the destination map and set position and direction - map._loadDarkSide = !_ccNum; + map._loadCcNum = _ccNum ? 0 : 1; map.load(mapId); party._mazePosition = pt; party._mazeDirection = dir; diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index c286d2a7c3..ca17ba04aa 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -604,7 +604,7 @@ void AnimationInfo::load(const Common::String &name) { /*------------------------------------------------------------------------*/ Map::Map(XeenEngine *vm) : _vm(vm), _mobData(vm) { - _loadDarkSide = false; + _loadCcNum = 0; _sideTownPortal = 0; _sideObjects = 0; _sideMonsters = 0; @@ -648,7 +648,7 @@ void Map::load(int mapId) { if (mapId >= 113 && mapId <= 127) { _sideTownPortal = 0; } else { - _sideTownPortal = _loadDarkSide ? 1 : 0; + _sideTownPortal = _loadCcNum; } if (_vm->getGameID() == GType_Swords || _vm->getGameID() == GType_DarkSide) { @@ -662,7 +662,7 @@ void Map::load(int mapId) { } else if (_vm->getGameID() == GType_WorldOfXeen) { files.setGameCc(1); - if (!_loadDarkSide) { + if (!_loadCcNum) { _animationInfo.load("clouds.dat"); _monsterData.load("xeen.mon"); _wallPicSprites.load("xeenpic.dat"); @@ -709,7 +709,7 @@ void Map::load(int mapId) { } } - files.setGameCc(_loadDarkSide); + files.setGameCc(_loadCcNum); } // Load any events for the new map diff --git a/engines/xeen/map.h b/engines/xeen/map.h index a0bc77a7ec..fc591fc208 100644 --- a/engines/xeen/map.h +++ b/engines/xeen/map.h @@ -454,7 +454,7 @@ public: int _currentTile; int _currentSurfaceId; bool _currentSteppedOn; - bool _loadDarkSide; + int _loadCcNum; int _sideTownPortal; public: Map(XeenEngine *vm); diff --git a/engines/xeen/saves.cpp b/engines/xeen/saves.cpp index a87bba6fec..a055627af4 100644 --- a/engines/xeen/saves.cpp +++ b/engines/xeen/saves.cpp @@ -195,7 +195,7 @@ Common::Error SavesManager::loadGameState(int slot) { // Load the new map map.clearMaze(); - map._loadDarkSide = files._ccNum; + map._loadCcNum = files._ccNum; map.load(party._mazeId); delete saveFile; diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 1425f035bd..2ffdcd1f72 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -1446,7 +1446,7 @@ bool Scripts::cmdCutsceneEndWorld(ParamsIterator ¶ms) { } bool Scripts::cmdFlipWorld(ParamsIterator ¶ms) { - _vm->_map->_loadDarkSide = params.readByte() != 0; + _vm->_map->_loadCcNum = params.readByte(); return true; } diff --git a/engines/xeen/spells.cpp b/engines/xeen/spells.cpp index d85241afb7..2ec2e7033a 100644 --- a/engines/xeen/spells.cpp +++ b/engines/xeen/spells.cpp @@ -1246,7 +1246,7 @@ void Spells::townPortal() { return; sound.playFX(51); - map._loadDarkSide = map._sideTownPortal; + map._loadCcNum = map._sideTownPortal; _vm->_files->_ccNum = map._sideTownPortal > 0; map.load(Res.TOWN_MAP_NUMBERS[map._sideTownPortal][townNumber - 1]); diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index bf71c8ee6f..d86cc43e99 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -209,8 +209,8 @@ void XeenEngine::play() { _screen->loadBackground("back.raw"); _screen->loadPalette("mm4.pal"); - if (getGameID() == GType_DarkSide && !_map->_loadDarkSide) { - _map->_loadDarkSide = true; + if (getGameID() == GType_DarkSide && !_map->_loadCcNum) { + _map->_loadCcNum = 1; _party->_mazeId = 29; _party->_mazeDirection = DIR_NORTH; _party->_mazePosition.x = 25; |