[Scummvm-git-logs] scummvm master -> 22456b345f4b39558cfc07ccd2e06ab6cfb98850
dreammaster
dreammaster at scummvm.org
Sun Mar 18 01:29:47 CET 2018
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
562522e144 XEEN: Fix display of Lloyd's Beacon spell
22456b345f XEEN: Change bool _isDarkCc to int _ccNum
Commit: 562522e14414db68b77595de84d856c39e6cf00d
https://github.com/scummvm/scummvm/commit/562522e14414db68b77595de84d856c39e6cf00d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-17T20:21:27-04:00
Commit Message:
XEEN: Fix display of Lloyd's Beacon spell
Changed paths:
engines/xeen/dialogs/dialogs_spells.cpp
engines/xeen/window.cpp
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp
index 3da5a51..2996cb7 100644
--- a/engines/xeen/dialogs/dialogs_spells.cpp
+++ b/engines/xeen/dialogs/dialogs_spells.cpp
@@ -816,18 +816,17 @@ bool LloydsBeacon::execute() {
}
// Open up the text file for the destination map and read in it's name
- File textFile(Common::String::format("%s%c%03d.txt",
- c._lloydSide == 0 ? "xeen" : "dark",
- c._lloydMap >= 100 ? 'x' : '0',
- c._lloydMap));
+ Common::String txtName = Common::String::format("%s%c%03d.txt",
+ c._lloydSide ? "dark" : "xeen", c._lloydMap >= 100 ? 'x' : '0', c._lloydMap);
+ File textFile(txtName, 1);
Common::String mapName = textFile.readString();
textFile.close();
// Display the dialog
w.open();
- w.writeString(Common::String::format(Res.LLOYDS_BEACON,
- mapName.c_str(), c._lloydPosition.x, c._lloydPosition.y));
- drawButtons(&windows[0]);
+ w.writeString(Common::String::format(Res.LLOYDS_BEACON, mapName.c_str(),
+ c._lloydPosition.x, c._lloydPosition.y));
+ drawButtons(&w);
w.update();
bool result = true;
diff --git a/engines/xeen/window.cpp b/engines/xeen/window.cpp
index 47732dc..2ba7064 100644
--- a/engines/xeen/window.cpp
+++ b/engines/xeen/window.cpp
@@ -41,7 +41,7 @@ Windows::Windows() {
Window windows[48] = {
Window(Common::Rect(0, 0, 320, 200), 0, 0, 0, 0, 320, 200),
Window(Common::Rect(237, 9, 317, 74), 0, 0, 237, 12, 307, 68),
- Window(Common::Rect(225, 1, 319, 73), 1, 8, 225, 1, 319, 73),
+ Window(Common::Rect(225, 1, 320, 73), 1, 8, 225, 1, 319, 73),
Window(Common::Rect(0, 0, 230, 149), 0, 0, 9, 8, 216, 140),
Window(Common::Rect(235, 148, 309, 189), 2, 8, 0, 0, 0, 0),
Window(Common::Rect(70, 20, 250, 183), 3, 8, 80, 38, 240, 166),
@@ -49,13 +49,13 @@ Windows::Windows() {
Window(Common::Rect(108, 0, 200, 200), 5, 0, 0, 0, 0, 0),
Window(Common::Rect(232, 9, 312, 74), 0, 0, 0, 0, 0, 0),
Window(Common::Rect(103, 156, 217, 186), 6, 8, 0, 0, 0, 0),
- Window(Common::Rect(226, 0, 319, 146), 7, 8, 0, 0, 0, 0),
+ Window(Common::Rect(226, 0, 320, 146), 7, 8, 0, 0, 0, 0),
Window(Common::Rect(8, 8, 224, 140), 8, 8, 8, 8, 224, 200),
Window(Common::Rect(0, 143, 320, 199), 9, 8, 0, 0, 0, 0),
Window(Common::Rect(50, 103, 266, 139), 10, 8, 0, 0, 0, 0),
Window(Common::Rect(0, 7, 320, 138), 11, 8, 0, 0, 0, 0),
Window(Common::Rect(50, 71, 182, 129), 12, 8, 0, 0, 0, 0),
- Window(Common::Rect(228, 106, 319, 146), 13, 8, 0, 0, 0, 0),
+ Window(Common::Rect(228, 106, 320, 146), 13, 8, 0, 0, 0, 0),
Window(Common::Rect(20, 142, 290, 199), 14, 8, 0, 0, 0, 0),
Window(Common::Rect(0, 20, 320, 180), 15, 8, 0, 0, 0, 0),
Window(Common::Rect(231, 48, 317, 141), 16, 8, 0, 0, 0, 0),
@@ -74,10 +74,10 @@ Windows::Windows() {
Window(Common::Rect(12, 11, 164, 94), 0, 0, 0, 0, 52, 0),
Window(Common::Rect(8, 147, 224, 192), 0, 8, 0, 0, 0, 94),
Window(Common::Rect(232, 74, 312, 138), 29, 8, 0, 0, 0, 0),
- Window(Common::Rect(226, 26, 319, 146), 30, 8, 0, 0, 0, 0),
- Window(Common::Rect(225, 74, 319, 154), 31, 8, 0, 0, 0, 0),
+ Window(Common::Rect(226, 26, 320, 146), 30, 8, 0, 0, 0, 0),
+ Window(Common::Rect(225, 74, 320, 154), 31, 8, 0, 0, 0, 0),
Window(Common::Rect(27, 6, 195, 142), 0, 8, 0, 0, 0, 0),
- Window(Common::Rect(225, 140, 319, 199), 0, 8, 0, 0, 0, 0),
+ Window(Common::Rect(225, 140, 320, 199), 0, 8, 0, 0, 0, 0),
Window(Common::Rect(12, 8, 162, 198), 0, 0, 128, 0, 119, 0),
Window(Common::Rect(0, 0, 320, 200), 32, 8, 0, 0, 320, 190),
Window(Common::Rect(0, 0, 320, 200), 33, 8, 0, 0, 320, 200)
Commit: 22456b345f4b39558cfc07ccd2e06ab6cfb98850
https://github.com/scummvm/scummvm/commit/22456b345f4b39558cfc07ccd2e06ab6cfb98850
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-17T20:27:42-04:00
Commit Message:
XEEN: Change bool _isDarkCc to int _ccNum
Originally the flag was whether the party was on the Dark Side,
but as a bool I was having to cast it to an int side/cc number in
more and more places. So now I've converted it to _ccNum, and it
can be used directly as an int
Changed paths:
engines/xeen/character.cpp
engines/xeen/combat.cpp
engines/xeen/debugger.cpp
engines/xeen/dialogs/dialogs.cpp
engines/xeen/dialogs/dialogs_create_char.cpp
engines/xeen/dialogs/dialogs_input.cpp
engines/xeen/dialogs/dialogs_items.cpp
engines/xeen/dialogs/dialogs_spells.cpp
engines/xeen/files.cpp
engines/xeen/files.h
engines/xeen/interface.cpp
engines/xeen/interface_scene.cpp
engines/xeen/locations.cpp
engines/xeen/locations.h
engines/xeen/map.cpp
engines/xeen/party.cpp
engines/xeen/saves.cpp
engines/xeen/screen.cpp
engines/xeen/scripts.cpp
engines/xeen/spells.cpp
engines/xeen/subtitles.cpp
engines/xeen/swordsofxeen/swordsofxeen.cpp
engines/xeen/worldofxeen/clouds_cutscenes.cpp
engines/xeen/worldofxeen/darkside_cutscenes.cpp
engines/xeen/worldofxeen/worldofxeen.cpp
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index 248d432..12c0385 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -800,7 +800,7 @@ bool Character::guildMember() const {
FileManager &files = *g_vm->_files;
Party &party = *g_vm->_party;
- if (party._mazeId == 49 && !files._isDarkCc) {
+ if (party._mazeId == 49 && !files._ccNum) {
return hasAward(SHANGRILA_GUILD_MEMBER);
}
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 1d61d8f..aa811b4 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -707,7 +707,7 @@ bool Combat::monsterCanMove(const Common::Point &pt, int wallShift,
} else if (surfaceType == SURFTYPE_SPACE) {
return monsterData._flying;
} else {
- return _vm->_files->_isDarkCc || monster._spriteId != 59;
+ return _vm->_files->_ccNum || monster._spriteId != 59;
}
default:
return v <= map.mazeData()._difficulties._wallNoPass;
@@ -1389,19 +1389,19 @@ void Combat::attack2(int damage, RangeType rangeType) {
Map &map = *_vm->_map;
Party &party = *_vm->_party;
Sound &sound = *_vm->_sound;
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
MazeMonster &monster = map._mobData._monsters[_monster2Attack];
MonsterStruct &monsterData = *monster._monsterData;
bool monsterDied = false;
- if (!isDarkCc && damage && rangeType != RT_SINGLE && monster._spriteId == 89)
+ if (!ccNum && damage && rangeType != RT_SINGLE && monster._spriteId == 89)
damage = 0;
if (!damage) {
sound.playSound(_missVoc, 1);
sound.playFX(6);
} else {
- if (!isDarkCc && monster._spriteId == 89)
+ if (!ccNum && monster._spriteId == 89)
damage += 100;
if (monster._damageType == DT_SLEEP || monster._damageType == DT_DRAGONSLEEP)
monster._damageType = DT_PHYSICAL;
@@ -1486,7 +1486,7 @@ void Combat::attack2(int damage, RangeType rangeType) {
intf.draw3d(true);
if (monsterDied) {
- if (!isDarkCc) {
+ if (!ccNum) {
if (_monster2Attack == 20 && party._mazeId == 41)
party._gameFlags[0][11] = true;
if (_monster2Attack == 8 && party._mazeId == 78) {
@@ -1507,7 +1507,7 @@ void Combat::attack2(int damage, RangeType rangeType) {
party._treasure._gold = monsterData._gold;
party._treasure._gems = monsterData._gems;
- if (!isDarkCc && monster._spriteId == 89) {
+ if (!ccNum && monster._spriteId == 89) {
// Xeen's Scepter of Temporal Distortion
party._treasure._weapons[0]._id = 90;
party._treasure._weapons[0]._bonusFlags = 0;
diff --git a/engines/xeen/debugger.cpp b/engines/xeen/debugger.cpp
index 42f61b0..32d0ce7 100644
--- a/engines/xeen/debugger.cpp
+++ b/engines/xeen/debugger.cpp
@@ -169,7 +169,7 @@ bool Debugger::cmdMap(int argc, const char **argv) {
return true;
} else {
int mapId = strToInt(argv[1]);
- bool side = argc < 3 ? files._isDarkCc : strToInt(argv[2]) != 0;
+ bool side = argc < 3 ? files._ccNum : strToInt(argv[2]) != 0;
int x = argc < 4 ? 8 : strToInt(argv[3]);
int y = argc < 5 ? 8 : strToInt(argv[4]);
diff --git a/engines/xeen/dialogs/dialogs.cpp b/engines/xeen/dialogs/dialogs.cpp
index d7a696b..ba7fe78 100644
--- a/engines/xeen/dialogs/dialogs.cpp
+++ b/engines/xeen/dialogs/dialogs.cpp
@@ -153,7 +153,7 @@ void ButtonContainer::drawButtons(XSurface *surface) {
}
bool ButtonContainer::doScroll(bool rollUp, bool fadeIn) {
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
return Cutscenes::doScroll(rollUp, fadeIn);
} else {
saveButtons();
diff --git a/engines/xeen/dialogs/dialogs_create_char.cpp b/engines/xeen/dialogs/dialogs_create_char.cpp
index 577ae53..72f1b74 100644
--- a/engines/xeen/dialogs/dialogs_create_char.cpp
+++ b/engines/xeen/dialogs/dialogs_create_char.cpp
@@ -579,7 +579,7 @@ bool CreateCharacterDialog::saveCharacter(Character &c, int classId, Race race,
Window &w = windows[6];
Common::String name;
int result;
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
// Prompt for a character name
w.open();
@@ -601,7 +601,7 @@ bool CreateCharacterDialog::saveCharacter(Character &c, int classId, Race race,
c._sex = sex;
c._race = race;
c._class = (CharacterClass)classId;
- c._level._permanent = isDarkCc ? 5 : 1;
+ c._level._permanent = ccNum ? 5 : 1;
c._might._permanent = _attribs[MIGHT];
c._intellect._permanent = _attribs[INTELLECT];
diff --git a/engines/xeen/dialogs/dialogs_input.cpp b/engines/xeen/dialogs/dialogs_input.cpp
index 1d05c81..0ac8f36 100644
--- a/engines/xeen/dialogs/dialogs_input.cpp
+++ b/engines/xeen/dialogs/dialogs_input.cpp
@@ -168,14 +168,14 @@ int StringInput::execute(bool type, const Common::String &expected,
MirrorEntry me;
scripts._mirror.clear();
- File f(Common::String::format("%smirr.txt", files._isDarkCc ? "dark" : "xeen"), 1);
+ File f(Common::String::format("%smirr.txt", files._ccNum ? "dark" : "xeen"), 1);
while (me.synchronize(f))
scripts._mirror.push_back(me);
f.close();
// Load in any extended mirror entries
Common::File f2;
- if (f2.open(Common::String::format("%smirr.ext", files._isDarkCc ? "dark" : "xeen"))) {
+ if (f2.open(Common::String::format("%smirr.ext", files._ccNum ? "dark" : "xeen"))) {
while (me.synchronize(f2))
scripts._mirror.push_back(me);
f2.close();
@@ -184,7 +184,7 @@ int StringInput::execute(bool type, const Common::String &expected,
for (uint idx = 0; idx < scripts._mirror.size(); ++idx) {
if (!line.compareToIgnoreCase(scripts._mirror[idx]._name)) {
result = idx + 1;
- sound.playFX(_vm->_files->_isDarkCc ? 35 : 61);
+ sound.playFX(_vm->_files->_ccNum ? 35 : 61);
break;
}
}
diff --git a/engines/xeen/dialogs/dialogs_items.cpp b/engines/xeen/dialogs/dialogs_items.cpp
index ab2269b..0f6d608 100644
--- a/engines/xeen/dialogs/dialogs_items.cpp
+++ b/engines/xeen/dialogs/dialogs_items.cpp
@@ -742,7 +742,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite
Sound &sound = *_vm->_sound;
Spells &spells = *_vm->_spells;
Windows &windows = *_vm->_windows;
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
InventoryItems &items = c._items[category];
if (items[0].empty())
@@ -834,7 +834,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite
if (Confirm::show(_vm, Common::String::format(Res.BUY_X_FOR_Y_GOLD,
desc.c_str(), cost))) {
if (party.subtract(CONS_GOLD, cost, WHERE_PARTY, WT_FREEZE_WAIT)) {
- if (isDarkCc) {
+ if (ccNum) {
sound.stopSound();
sound.playSound("choice2.voc");
}
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp
index 2996cb7..9148c41 100644
--- a/engines/xeen/dialogs/dialogs_spells.cpp
+++ b/engines/xeen/dialogs/dialogs_spells.cpp
@@ -46,7 +46,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int
Sound &sound = *_vm->_sound;
Spells &spells = *_vm->_spells;
Windows &windows = *_vm->_windows;
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
loadButtons();
int castingCopy = isCasting;
@@ -61,7 +61,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int
if (!c->guildMember()) {
sound.stopSound();
intf._overallFrame = 5;
- sound.playSound(isDarkCc ? "skull1.voc" : "guild11.voc", 1);
+ sound.playSound(ccNum ? "skull1.voc" : "guild11.voc", 1);
break;
}
@@ -240,7 +240,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int
c->_spells[spellIndex] = true;
sound.stopSound();
intf._overallFrame = 0;
- sound.playSound(isDarkCc ? "guild12.voc" : "parrot2.voc", 1);
+ sound.playSound(ccNum ? "guild12.voc" : "parrot2.voc", 1);
} else {
sound.playFX(21);
}
@@ -308,7 +308,7 @@ void SpellsDialog::loadButtons() {
const char *SpellsDialog::setSpellText(Character *c, int isCasting) {
Party &party = *_vm->_party;
Spells &spells = *_vm->_spells;
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
int expenseFactor = 0;
int currLevel = c->getCurrentLevel();
int category;
@@ -358,7 +358,7 @@ const char *SpellsDialog::setSpellText(Character *c, int isCasting) {
}
}
}
- } else if (isDarkCc) {
+ } else if (ccNum) {
int groupIndex = (party._mazeId - 29) / 2;
for (int spellId = Res.DARK_SPELL_RANGES[groupIndex][0];
spellId < Res.DARK_SPELL_RANGES[groupIndex][1]; ++spellId) {
@@ -797,14 +797,14 @@ bool LloydsBeacon::execute() {
Sound &sound = *_vm->_sound;
Windows &windows = *_vm->_windows;
Window &w = windows[10];
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
Character &c = *combat._oldCharacter;
loadButtons();
if (!c._lloydMap) {
// No destination previously set, so have a default ready
- if (isDarkCc) {
+ if (ccNum) {
c._lloydSide = 1;
c._lloydPosition = Common::Point(25, 21);
c._lloydMap = 29;
@@ -846,12 +846,12 @@ bool LloydsBeacon::execute() {
switch (_buttonValue) {
case Common::KEYCODE_r:
- if (!isDarkCc && c._lloydMap >= 75 && c._lloydMap <= 78 && !party._cloudsEnd) {
+ if (!ccNum && c._lloydMap >= 75 && c._lloydMap <= 78 && !party._cloudsEnd) {
result = false;
} else {
sound.playFX(51);
- map._loadDarkSide = isDarkCc;
- if (c._lloydMap != party._mazeId || c._lloydSide != (isDarkCc ? 1 : 0)) {
+ map._loadDarkSide = ccNum;
+ if (c._lloydMap != party._mazeId || c._lloydSide != ccNum) {
map.load(c._lloydMap);
}
@@ -866,7 +866,7 @@ bool LloydsBeacon::execute() {
sound.playFX(20);
c._lloydMap = party._mazeId;
c._lloydPosition = party._mazePosition;
- c._lloydSide = isDarkCc ? 1 : 0;
+ c._lloydSide = ccNum;
_buttonValue = Common::KEYCODE_ESCAPE;
break;
diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp
index 83a4ca9..48c23d7 100644
--- a/engines/xeen/files.cpp
+++ b/engines/xeen/files.cpp
@@ -218,7 +218,7 @@ Common::SeekableReadStream *CCArchive::createReadStreamForMember(const Common::S
/*------------------------------------------------------------------------*/
FileManager::FileManager(XeenEngine *vm) {
- _isDarkCc = vm->getGameID() == GType_DarkSide;
+ _ccNum = vm->getGameID() == GType_DarkSide;
File::_xeenCc = File::_darkCc = File::_introCc = nullptr;
File::_xeenSave = File::_darkSave = nullptr;
File::_currentSave = nullptr;
@@ -277,7 +277,7 @@ void FileManager::setGameCc(int ccMode) {
}
File::setCurrentArchive(ccMode);
- _isDarkCc = ccMode != 0;
+ _ccNum = ccMode != 0;
}
void FileManager::load(Common::SeekableReadStream &stream) {
@@ -285,7 +285,7 @@ void FileManager::load(Common::SeekableReadStream &stream) {
}
void FileManager::save(Common::WriteStream &s) {
- s.writeByte(_isDarkCc ? 1 : 0);
+ s.writeByte(_ccNum ? 1 : 0);
}
/*------------------------------------------------------------------------*/
@@ -330,7 +330,7 @@ bool File::open(const Common::String &filename, Common::Archive &archive) {
bool File::open(const Common::String &filename, int ccMode) {
FileManager &files = *g_vm->_files;
- int oldMode = files._isDarkCc ? 1 : 0;
+ int oldNum = files._ccNum;
files.setGameCc(ccMode);
if (File::exists(filename, *_currentArchive))
@@ -338,7 +338,7 @@ bool File::open(const Common::String &filename, int ccMode) {
else
File::open(filename);
- files.setGameCc(oldMode);
+ files.setGameCc(oldNum);
return true;
}
@@ -390,11 +390,11 @@ bool File::exists(const Common::String &filename) {
bool File::exists(const Common::String &filename, int ccMode) {
FileManager &files = *g_vm->_files;
- int oldMode = files._isDarkCc ? 1 : 0;
+ int oldNum = files._ccNum;
files.setGameCc(ccMode);
bool result = exists(filename);
- files.setGameCc(oldMode);
+ files.setGameCc(oldNum);
return result;
}
diff --git a/engines/xeen/files.h b/engines/xeen/files.h
index 306ec96..9924b8c 100644
--- a/engines/xeen/files.h
+++ b/engines/xeen/files.h
@@ -77,7 +77,7 @@ struct CCEntry {
*/
class FileManager {
public:
- bool _isDarkCc;
+ int _ccNum;
public:
/**
* Constructor
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index 96f44bb..11e0ee7 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -661,7 +661,7 @@ void Interface::doStepCode() {
break;
}
- if (_vm->_files->_isDarkCc && party._gameFlags[1][118]) {
+ if (_vm->_files->_ccNum && party._gameFlags[1][118]) {
_falling = FALL_NONE;
} else {
if (_falling != FALL_NONE)
@@ -692,9 +692,9 @@ void Interface::startFalling(bool flag) {
Combat &combat = *_vm->_combat;
Map &map = *_vm->_map;
Party &party = *_vm->_party;
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
- if (isDarkCc && party._gameFlags[1][118]) {
+ if (ccNum && party._gameFlags[1][118]) {
_falling = FALL_NONE;
return;
}
@@ -704,10 +704,10 @@ void Interface::startFalling(bool flag) {
_falling = FALL_START;
draw3d(false);
- if (flag && (!isDarkCc || party._fallMaze != 0)) {
+ if (flag && (!ccNum || party._fallMaze != 0)) {
party._mazeId = party._fallMaze;
party._mazePosition = party._fallPosition;
- } else if (!isDarkCc) {
+ } else if (!ccNum) {
switch (party._mazeId - 25) {
case 0:
case 26:
@@ -927,7 +927,7 @@ bool Interface::checkMoveDirection(int key) {
switch (map._currentWall) {
case 5:
- if (_vm->_files->_isDarkCc)
+ if (_vm->_files->_ccNum)
goto check;
// fall through
diff --git a/engines/xeen/interface_scene.cpp b/engines/xeen/interface_scene.cpp
index 51cb6d8..11b588e 100644
--- a/engines/xeen/interface_scene.cpp
+++ b/engines/xeen/interface_scene.cpp
@@ -408,7 +408,7 @@ void InterfaceScene::drawScene() {
} else {
++mazeObject._frame;
if ((int)idx == objNum && scripts._animCounter > 0 && (
- objObject._spriteId == (_vm->_files->_isDarkCc ? 15 : 16) ||
+ objObject._spriteId == (_vm->_files->_ccNum ? 15 : 16) ||
objObject._spriteId == 58 || objObject._spriteId == 73)) {
if (mazeObject._frame > 4 || mazeObject._spriteId == 58)
mazeObject._frame = 1;
@@ -2660,7 +2660,7 @@ void InterfaceScene::setIndoorsObjects() {
// Determine which half of the X/Y lists to use
int listOffset;
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
listOffset = mazeObject._spriteId == 47 ? 1 : 0;
} else {
listOffset = mazeObject._spriteId == 113 ? 1 : 0;
@@ -3365,7 +3365,7 @@ void InterfaceScene::setOutdoorsObjects() {
for (uint idx = 0; idx < map._mobData._objects.size(); ++idx) {
MazeObject &obj = map._mobData._objects[idx];
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
posIndex = obj._spriteId == 47 ? 1 : 0;
} else {
posIndex = obj._spriteId == 113 ? 1 : 0;
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 2690bf1..7043f4a 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.cpp
@@ -35,12 +35,12 @@ namespace Xeen {
namespace Locations {
BaseLocation::BaseLocation(LocationAction action) : ButtonContainer(g_vm),
- _locationActionId(action), _isDarkCc(g_vm->_files->_isDarkCc),
+ _locationActionId(action), _ccNum(g_vm->_files->_ccNum),
_vocName("hello1.voc"), _exitToUi(false) {
- _townMaxId = (action >= SPHINX) ? 0 : Res.TOWN_MAXES[_isDarkCc][action];
+ _townMaxId = (action >= SPHINX) ? 0 : Res.TOWN_MAXES[_ccNum][action];
if (action < NO_ACTION) {
- _songName = Res.TOWN_ACTION_MUSIC[_isDarkCc][action];
- _townSprites.resize(Res.TOWN_ACTION_FILES[_isDarkCc][action]);
+ _songName = Res.TOWN_ACTION_MUSIC[_ccNum][action];
+ _townSprites.resize(Res.TOWN_ACTION_FILES[_ccNum][action]);
}
_animFrame = 0;
@@ -149,7 +149,7 @@ void BaseLocation::drawAnim(bool flag) {
// TODO: Figure out a clean way to split method into individual location classes
if (_locationActionId == BLACKSMITH) {
if (sound.isSoundPlaying()) {
- if (_isDarkCc) {
+ if (_ccNum) {
_townSprites[_drawFrameIndex / 8].draw(0, _drawFrameIndex % 8, _animPos);
_townSprites[2].draw(0, _vm->getRandomNumber(11) == 1 ? 9 : 10,
Common::Point(34, 33));
@@ -158,20 +158,20 @@ void BaseLocation::drawAnim(bool flag) {
}
} else {
_townSprites[_drawFrameIndex / 8].draw(0, _drawFrameIndex % 8, _animPos);
- if (_isDarkCc) {
+ if (_ccNum) {
_townSprites[2].draw(0, _vm->getRandomNumber(11) == 1 ? 9 : 10,
Common::Point(34, 33));
}
}
- } else if (!_isDarkCc || _locationActionId != TRAINING) {
+ } else if (!_ccNum || _locationActionId != TRAINING) {
if (!_townSprites[_drawFrameIndex / 8].empty())
_townSprites[_drawFrameIndex / 8].draw(0, _drawFrameIndex % 8, _animPos);
}
switch (_locationActionId) {
case BANK:
- if (sound.isSoundPlaying() || (_isDarkCc && _animFrame)) {
- if (_isDarkCc) {
+ if (sound.isSoundPlaying() || (_ccNum && _animFrame)) {
+ if (_ccNum) {
if (sound.isSoundPlaying() || _animFrame == 1) {
_townSprites[4].draw(0, _vm->getRandomNumber(13, 18),
Common::Point(8, 30));
@@ -189,7 +189,7 @@ void BaseLocation::drawAnim(bool flag) {
case GUILD:
if (!sound.isSoundPlaying()) {
- if (_isDarkCc) {
+ if (_ccNum) {
if (_animFrame) {
_animFrame ^= 1;
_townSprites[6].draw(0, _animFrame, Common::Point(8, 106));
@@ -201,7 +201,7 @@ void BaseLocation::drawAnim(bool flag) {
break;
case TAVERN:
- if (sound.isSoundPlaying() && _isDarkCc) {
+ if (sound.isSoundPlaying() && _ccNum) {
_townSprites[4].draw(0, _vm->getRandomNumber(7), Common::Point(153, 49));
}
break;
@@ -215,11 +215,11 @@ void BaseLocation::drawAnim(bool flag) {
case TRAINING:
if (sound.isSoundPlaying()) {
- if (_isDarkCc) {
+ if (_ccNum) {
_townSprites[_drawFrameIndex / 8].draw(0, _drawFrameIndex % 8, _animPos);
}
} else {
- if (_isDarkCc) {
+ if (_ccNum) {
_townSprites[0].draw(0, ++_animFrame % 8, Common::Point(8, 8));
_townSprites[5].draw(0, _vm->getRandomNumber(5), Common::Point(61, 74));
} else {
@@ -257,7 +257,7 @@ void BaseLocation::drawAnim(bool flag) {
_drawFrameIndex = (_drawFrameIndex + 1) % _townMaxId;
}
- if (_isDarkCc) {
+ if (_ccNum) {
if (_locationActionId == BLACKSMITH && (_drawFrameIndex == 4 || _drawFrameIndex == 13))
sound.playFX(45);
@@ -307,7 +307,7 @@ BankLocation::BankLocation() : BaseLocation(BANK) {
addButton(Common::Rect(288, 108, 312, 128), Common::KEYCODE_ESCAPE, &_icons1);
_animFrame = 1;
- _vocName = _isDarkCc ? "bank1.voc" : "banker.voc";
+ _vocName = _ccNum ? "bank1.voc" : "banker.voc";
}
Common::String BankLocation::createLocationText(Character &ch) {
@@ -320,7 +320,7 @@ Common::String BankLocation::createLocationText(Character &ch) {
}
void BankLocation::drawBackground() {
- if (_isDarkCc) {
+ if (_ccNum) {
_townSprites[4].draw(0, _vm->getRandomNumber(13, 18),
Common::Point(8, 30));
}
@@ -448,7 +448,7 @@ BlacksmithLocation::BlacksmithLocation() : BaseLocation(BLACKSMITH) {
addButton(Common::Rect(234, 74, 308, 82), 0);
addButton(Common::Rect(234, 84, 308, 92), 0);
- _vocName = _isDarkCc ? "see2.voc" : "whaddayo.voc";
+ _vocName = _ccNum ? "see2.voc" : "whaddayo.voc";
}
Common::String BlacksmithLocation::createLocationText(Character &ch) {
@@ -479,7 +479,7 @@ Character *BlacksmithLocation::doOptions(Character *c) {
void BlacksmithLocation::farewell() {
Sound &sound = *g_vm->_sound;
- if (_isDarkCc) {
+ if (_ccNum) {
sound.stopSound();
sound.playVoice("come1.voc", 1);
}
@@ -497,7 +497,7 @@ GuildLocation::GuildLocation() : BaseLocation(GUILD) {
addButton(Common::Rect(234, 84, 308, 92), 0);
g_vm->_mode = MODE_17;
- _vocName = _isDarkCc ? "parrot1.voc" : "guild10.voc";
+ _vocName = _ccNum ? "parrot1.voc" : "guild10.voc";
}
Common::String GuildLocation::createLocationText(Character &ch) {
@@ -524,7 +524,7 @@ Character *GuildLocation::doOptions(Character *c) {
if (!c->guildMember()) {
sound.stopSound();
_animFrame = 5;
- sound.playSound(_isDarkCc ? "skull1.voc" : "guild11.voc", 1);
+ sound.playSound(_ccNum ? "skull1.voc" : "guild11.voc", 1);
}
}
} else if (_buttonValue == Common::KEYCODE_s) {
@@ -560,7 +560,7 @@ TavernLocation::TavernLocation() : BaseLocation(TAVERN) {
addButton(Common::Rect(234, 84, 308, 92), Common::KEYCODE_r);
g_vm->_mode = MODE_17;
- _vocName = _isDarkCc ? "hello1.voc" : "hello.voc";
+ _vocName = _ccNum ? "hello1.voc" : "hello.voc";
}
Common::String TavernLocation::createLocationText(Character &ch) {
@@ -620,19 +620,19 @@ Character *TavernLocation::doOptions(Character *c) {
case Common::KEYCODE_f: {
// Food
- if (party._mazeId == (_isDarkCc ? 29 : 28)) {
+ if (party._mazeId == (_ccNum ? 29 : 28)) {
_v22 = party._activeParty.size() * 15;
_v23 = 10;
idx = 0;
- } else if (_isDarkCc && party._mazeId == 31) {
+ } else if (_ccNum && party._mazeId == 31) {
_v22 = party._activeParty.size() * 60;
_v23 = 100;
idx = 1;
- } else if (!_isDarkCc && party._mazeId == 30) {
+ } else if (!_ccNum && party._mazeId == 30) {
_v22 = party._activeParty.size() * 50;
_v23 = 50;
idx = 1;
- } else if (_isDarkCc) {
+ } else if (_ccNum) {
_v22 = party._activeParty.size() * 120;
_v23 = 250;
idx = 2;
@@ -646,7 +646,7 @@ Character *TavernLocation::doOptions(Character *c) {
idx = 0;
}
- Common::String msg = _textStrings[(_isDarkCc ? 60 : 75) + idx];
+ Common::String msg = _textStrings[(_ccNum ? 60 : 75) + idx];
windows[10].close();
windows[12].open();
windows[12].writeString(msg);
@@ -658,7 +658,7 @@ Character *TavernLocation::doOptions(Character *c) {
} else if (party.subtract(CONS_GOLD, _v23, WHERE_PARTY, WT_LOC_WAIT)) {
party._food = _v22;
sound.stopSound();
- sound.playSound(_isDarkCc ? "thanks2.voc" : "thankyou.voc", 1);
+ sound.playSound(_ccNum ? "thanks2.voc" : "thankyou.voc", 1);
}
}
@@ -670,11 +670,11 @@ Character *TavernLocation::doOptions(Character *c) {
case Common::KEYCODE_r: {
// Rumors
- if (party._mazeId == (_isDarkCc ? 29 : 28)) {
+ if (party._mazeId == (_ccNum ? 29 : 28)) {
idx = 0;
- } else if (party._mazeId == (_isDarkCc ? 31 : 30)) {
+ } else if (party._mazeId == (_ccNum ? 31 : 30)) {
idx = 10;
- } else if (_isDarkCc || party._mazeId == 49) {
+ } else if (_ccNum || party._mazeId == 49) {
idx = 20;
}
@@ -693,12 +693,12 @@ Character *TavernLocation::doOptions(Character *c) {
case Common::KEYCODE_s: {
// Sign In
// Set location and position for afterwards
- idx = _isDarkCc ? (party._mazeId - 29) >> 1 : party._mazeId - 28;
+ idx = _ccNum ? (party._mazeId - 29) >> 1 : party._mazeId - 28;
assert(idx >= 0);
- party._mazePosition.x = Res.TAVERN_EXIT_LIST[_isDarkCc ? 1 : 0][_locationActionId][idx][0];
- party._mazePosition.y = Res.TAVERN_EXIT_LIST[_isDarkCc ? 1 : 0][_locationActionId][idx][1];
+ party._mazePosition.x = Res.TAVERN_EXIT_LIST[_ccNum][_locationActionId][idx][0];
+ party._mazePosition.y = Res.TAVERN_EXIT_LIST[_ccNum][_locationActionId][idx][1];
- if (!_isDarkCc || party._mazeId == 29)
+ if (!_ccNum || party._mazeId == 29)
party._mazeDirection = DIR_WEST;
else if (party._mazeId == 31)
party._mazeDirection = DIR_EAST;
@@ -744,23 +744,23 @@ Character *TavernLocation::doOptions(Character *c) {
wait();
} else if (party.subtract(CONS_GOLD, 1, WHERE_PARTY, WT_LOC_WAIT)) {
sound.stopSound();
- sound.playSound(_isDarkCc ? "thanks2.voc" : "thankyou.voc", 1);
+ sound.playSound(_ccNum ? "thanks2.voc" : "thankyou.voc", 1);
- if (party._mazeId == (_isDarkCc ? 29 : 28)) {
+ if (party._mazeId == (_ccNum ? 29 : 28)) {
_v24 = 30;
- } else if (_isDarkCc && party._mazeId == 31) {
+ } else if (_ccNum && party._mazeId == 31) {
_v24 = 40;
- } else if (!_isDarkCc && party._mazeId == 45) {
+ } else if (!_ccNum && party._mazeId == 45) {
_v24 = 45;
- } else if (!_isDarkCc && party._mazeId == 49) {
+ } else if (!_ccNum && party._mazeId == 49) {
_v24 = 60;
- } else if (_isDarkCc) {
+ } else if (_ccNum) {
_v24 = 50;
}
Common::String msg = _textStrings[map.mazeData()._tavernTips + _v24];
map.mazeData()._tavernTips = (map.mazeData()._tavernTips + 1) /
- (_isDarkCc ? 10 : 15);
+ (_ccNum ? 10 : 15);
Window &w = windows[12];
w.open();
@@ -786,7 +786,7 @@ void TavernLocation::farewell() {
Sound &sound = *g_vm->_sound;
sound.stopSound();
- sound.playVoice(_isDarkCc ? "gdluck1.voc" : "goodbye.voc", 1);
+ sound.playVoice(_ccNum ? "gdluck1.voc" : "goodbye.voc", 1);
map.mazeData()._mazeNumber = party._mazeId;
}
@@ -812,28 +812,28 @@ TempleLocation::TempleLocation() : BaseLocation(TEMPLE) {
addButton(Common::Rect(234, 74, 308, 82), Common::KEYCODE_u);
addButton(Common::Rect(234, 84, 308, 92), 0);
- _vocName = _isDarkCc ? "help2.voc" : "maywe2.voc";
+ _vocName = _ccNum ? "help2.voc" : "maywe2.voc";
}
Common::String TempleLocation::createLocationText(Character &ch) {
Party &party = *g_vm->_party;
- if (party._mazeId == (_isDarkCc ? 29 : 28)) {
+ if (party._mazeId == (_ccNum ? 29 : 28)) {
_v10 = _v11 = _v12 = _v13 = 0;
_v14 = 10;
- } else if (party._mazeId == (_isDarkCc ? 31 : 30)) {
+ } else if (party._mazeId == (_ccNum ? 31 : 30)) {
_v13 = 10;
_v12 = 50;
_v11 = 500;
_v10 = 100;
_v14 = 25;
- } else if (party._mazeId == (_isDarkCc ? 37 : 73)) {
+ } else if (party._mazeId == (_ccNum ? 37 : 73)) {
_v13 = 20;
_v12 = 100;
_v11 = 1000;
_v10 = 200;
_v14 = 50;
- } else if (_isDarkCc || party._mazeId == 49) {
+ } else if (_ccNum || party._mazeId == 49) {
_v13 = 100;
_v12 = 500;
_v11 = 5000;
@@ -988,12 +988,12 @@ TrainingLocation::TrainingLocation() : BaseLocation(TRAINING) {
addButton(Common::Rect(281, 108, 305, 128), Common::KEYCODE_ESCAPE, &_icons1);
addButton(Common::Rect(242, 108, 266, 128), Common::KEYCODE_t, &_icons1);
- _vocName = _isDarkCc ? "youtrn1.voc" : "training.voc";
+ _vocName = _ccNum ? "youtrn1.voc" : "training.voc";
}
Common::String TrainingLocation::createLocationText(Character &ch) {
Party &party = *g_vm->_party;
- if (_isDarkCc) {
+ if (_ccNum) {
switch (party._mazeId) {
case 29:
// Castleview
@@ -1079,9 +1079,9 @@ Character *TrainingLocation::doOptions(Character *c) {
Common::String name;
if (c->_level._permanent >= _maxLevel) {
- name = _isDarkCc ? "gtlost.voc" : "trainin1.voc";
+ name = _ccNum ? "gtlost.voc" : "trainin1.voc";
} else {
- name = _isDarkCc ? "gtlost.voc" : "trainin0.voc";
+ name = _ccNum ? "gtlost.voc" : "trainin0.voc";
}
sound.playSound(name);
@@ -1090,7 +1090,7 @@ Character *TrainingLocation::doOptions(Character *c) {
if (party.subtract(CONS_GOLD, (c->_level._permanent * c->_level._permanent) * 10, WHERE_PARTY, WT_LOC_WAIT)) {
_drawFrameIndex = 0;
sound.stopSound();
- sound.playSound(_isDarkCc ? "prtygd.voc" : "trainin2.voc", 1);
+ sound.playSound(_ccNum ? "prtygd.voc" : "trainin2.voc", 1);
c->_experience -= c->nextExperienceLevel() -
(c->getCurrentExperience() - c->_experience);
@@ -1279,16 +1279,16 @@ int ReaperCutscene::show() {
Sound &sound = *g_vm->_sound;
Windows &windows = *g_vm->_windows;
- SpriteResource sprites1(_isDarkCc ? "tower1.zom" : "tower.vga", _isDarkCc);
- SpriteResource sprites2(_isDarkCc ? "tower2.zom" : "freap.vga", _isDarkCc);
+ SpriteResource sprites1(_ccNum ? "tower1.zom" : "tower.vga", _ccNum);
+ SpriteResource sprites2(_ccNum ? "tower2.zom" : "freap.vga", _ccNum);
Graphics::ManagedSurface savedBg;
savedBg.copyFrom(screen);
for (int idx = 13; idx >= 0; --idx) {
events.updateGameCounter();
- sprites1.draw(0, 0, Common::Point(REAPER_X1[_isDarkCc][idx], REAPER_Y1[_isDarkCc][idx]), 0, idx);
- if (_isDarkCc) {
+ sprites1.draw(0, 0, Common::Point(REAPER_X1[_ccNum][idx], REAPER_Y1[_ccNum][idx]), 0, idx);
+ if (_ccNum) {
sprites1.draw(0, 1, Common::Point(REAPER_X2[idx], REAPER_Y1[1][idx]), 0, idx);
sprites1.draw(0, party._isNight ? 3 : 2, Common::Point(REAPER_X3[idx], REAPER_Y1[1][idx]), 0, idx);
}
@@ -1296,7 +1296,7 @@ int ReaperCutscene::show() {
WAIT(1);
}
- if (_isDarkCc) {
+ if (_ccNum) {
for (int idx = -200; idx < 0; idx += 16) {
events.updateGameCounter();
sprites1.draw(0, 0, Common::Point(0, 0));
@@ -1319,7 +1319,7 @@ int ReaperCutscene::show() {
sound.setMusicPercent(38);
sprites1.draw(0, 0, Common::Point(0, 0));
- if (_isDarkCc) {
+ if (_ccNum) {
sprites1.draw(0, 1, Common::Point(160, 0));
sprites1.draw(0, party._isNight ? 3 : 2);
}
@@ -1330,7 +1330,7 @@ int ReaperCutscene::show() {
do {
events.updateGameCounter();
int frame = g_vm->getRandomNumber(4);
- if (_isDarkCc) {
+ if (_ccNum) {
sprites2.draw(0, frame);
sprites2.draw(0, frame + 5, Common::Point(160, 0));
} else {
@@ -1344,21 +1344,21 @@ int ReaperCutscene::show() {
} while (sound.isSoundPlaying());
sprites2.draw(0, 0, Common::Point(0, 0));
- if (_isDarkCc)
+ if (_ccNum)
sprites2.draw(0, 5, Common::Point(160, 0));
windows[0].update();
WAIT(7);
sound.playVoice(_mazeFlag ? "reaper12.voc" : "reaper14.voc");
if (_mazeFlag)
- sound.playVoice(_isDarkCc ? "goin1.voc" : "reaper13.voc");
+ sound.playVoice(_ccNum ? "goin1.voc" : "reaper13.voc");
else
- sound.playVoice(_isDarkCc ? "needkey1.voc" : "reaper15.voc");
+ sound.playVoice(_ccNum ? "needkey1.voc" : "reaper15.voc");
do {
events.updateGameCounter();
int frame = g_vm->getRandomNumber(4);
- if (_isDarkCc) {
+ if (_ccNum) {
sprites2.draw(0, frame, Common::Point(0, 0));
sprites2.draw(0, frame + 5, Common::Point(160, 0));
} else {
@@ -1370,7 +1370,7 @@ int ReaperCutscene::show() {
} while (_subtitles.lineActive());
sprites2.draw(0, 0, Common::Point(0, 0));
- if (_isDarkCc)
+ if (_ccNum)
sprites2.draw(0, 5, Common::Point(160, 0));
windows[0].update();
WAIT(1);
@@ -1379,9 +1379,9 @@ int ReaperCutscene::show() {
for (int idx = 0; idx < 14; ++idx) {
events.updateGameCounter();
screen.blitFrom(savedBg);
- sprites1.draw(0, 0, Common::Point(REAPER_X1[_isDarkCc][idx], REAPER_Y1[_isDarkCc][idx]), 0, idx);
+ sprites1.draw(0, 0, Common::Point(REAPER_X1[_ccNum][idx], REAPER_Y1[_ccNum][idx]), 0, idx);
- if (_isDarkCc) {
+ if (_ccNum) {
sprites1.draw(0, 1, Common::Point(REAPER_X2[idx], REAPER_Y1[1][idx]), 0, idx);
sprites1.draw(0, party._isNight ? 3 : 2, Common::Point(REAPER_X3[idx], REAPER_Y1[1][idx]), 0, idx);
}
@@ -1415,7 +1415,7 @@ void ReaperCutscene::getNewLocation() {
Map &map = *g_vm->_map;
Party &party = *g_vm->_party;
- if (_isDarkCc) {
+ if (_ccNum) {
switch (party._mazeId) {
case 3:
if (party._questItems[40]) {
@@ -1545,28 +1545,28 @@ int GolemCutscene::show() {
Sound &sound = *g_vm->_sound;
Windows &windows = *g_vm->_windows;
SpriteResource sprites1, sprites2[2];
- sprites1.load(_isDarkCc ? "dung1.zom" : "golmback.vga");
- sprites2[0].load(_isDarkCc ? "dung2.zom" : "golem.vga");
- if (_isDarkCc)
+ sprites1.load(_ccNum ? "dung1.zom" : "golmback.vga");
+ sprites2[0].load(_ccNum ? "dung2.zom" : "golem.vga");
+ if (_ccNum)
sprites2[1].load("dung3.zom");
// Save the screen
Graphics::ManagedSurface savedBg;
savedBg.copyFrom(screen);
- for (int idx = (_isDarkCc ? 8 : 11); idx >= 0; --idx) {
+ for (int idx = (_ccNum ? 8 : 11); idx >= 0; --idx) {
events.updateGameCounter();
screen.blitFrom(savedBg);
sprites1.draw(0, 0,
- Common::Point(GOLEM_X1[_isDarkCc][idx], GOLEM_Y1[_isDarkCc][idx]), 0, idx);
+ Common::Point(GOLEM_X1[_ccNum][idx], GOLEM_Y1[_ccNum][idx]), 0, idx);
sprites1.draw(0, 1,
- Common::Point(GOLEM_X2[_isDarkCc][idx], GOLEM_Y1[_isDarkCc][idx]), 0, idx);
+ Common::Point(GOLEM_X2[_ccNum][idx], GOLEM_Y1[_ccNum][idx]), 0, idx);
windows[0].update();
WAIT(1);
}
- if (_isDarkCc)
+ if (_ccNum)
sound.playSound("ogre.voc");
for (int idx = -200; idx < 0; idx += 16) {
@@ -1574,13 +1574,13 @@ int GolemCutscene::show() {
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
sprites2[0].draw(0, 0, Common::Point(idx, 0), SPRFLAG_800);
- sprites2[_isDarkCc].draw(0, 1, Common::Point(idx + 160, 0), SPRFLAG_800);
+ sprites2[_ccNum].draw(0, 1, Common::Point(idx + 160, 0), SPRFLAG_800);
- if (!_isDarkCc)
+ if (!_ccNum)
sprites2[0].draw(0, 2, Common::Point(idx + g_vm->getRandomNumber(9) - 5,
g_vm->getRandomNumber(9) - 5), SPRFLAG_800);
- if (!_isDarkCc && !sound.isSoundPlaying())
+ if (!_ccNum && !sound.isSoundPlaying())
sound.playSound("ogre.voc");
WAIT(1);
@@ -1589,8 +1589,8 @@ int GolemCutscene::show() {
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
sprites2[0].draw(0, 0, Common::Point(0, 0));
- sprites2[_isDarkCc].draw(0, _isDarkCc ? 0 : 1, Common::Point(160, 0));
- if (!_isDarkCc)
+ sprites2[_ccNum].draw(0, 1 - _ccNum, Common::Point(160, 0));
+ if (!_ccNum)
sprites2[0].draw(0, 2);
windows[0].update();
@@ -1607,7 +1607,7 @@ int GolemCutscene::show() {
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
- if (_isDarkCc) {
+ if (_ccNum) {
int frame = g_vm->getRandomNumber(6);
sprites2[0].draw(0, frame, Common::Point(0, 0));
sprites2[1].draw(1, frame, Common::Point(160, 0));
@@ -1624,15 +1624,15 @@ int GolemCutscene::show() {
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
sprites2[0].draw(0, 0, Common::Point(0, 0));
- sprites2[_isDarkCc].draw(0, _isDarkCc ? 0 : 1, Common::Point(160, 0));
- if (!_isDarkCc)
+ sprites2[_ccNum].draw(0, 1 - _ccNum, Common::Point(160, 0));
+ if (!_ccNum)
sprites2[0].draw(0, 2);
windows[0].update();
events.updateGameCounter();
- events.wait(_isDarkCc ? 10 : 1);
+ events.wait(_ccNum ? 10 : 1);
- if (!_isDarkCc) {
+ if (!_ccNum) {
sound.playVoice("ogre.voc");
while (sound.isSoundPlaying())
events.pollEventsAndWait();
@@ -1647,7 +1647,7 @@ int GolemCutscene::show() {
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
- if (_isDarkCc) {
+ if (_ccNum) {
int frame = g_vm->getRandomNumber(6);
sprites2[0].draw(0, frame, Common::Point(0, 0));
sprites2[1].draw(1, frame, Common::Point(160, 0));
@@ -1665,8 +1665,8 @@ int GolemCutscene::show() {
sprites1.draw(0, 0, Common::Point(0, 0));
sprites1.draw(0, 1, Common::Point(160, 0));
sprites2[0].draw(0, 0, Common::Point(0, 0));
- sprites2[_isDarkCc].draw(0, _isDarkCc ? 0 : 1, Common::Point(160, 0));
- if (!_isDarkCc)
+ sprites2[_ccNum].draw(0, 1 - _ccNum, Common::Point(160, 0));
+ if (!_ccNum)
sprites2[0].draw(0, 2);
windows[0].update();
@@ -1677,13 +1677,13 @@ int GolemCutscene::show() {
sound.setMusicPercent(75);
if (!_mazeFlag) {
- for (int idx = 0; !g_vm->shouldExit() && idx < (_isDarkCc ? 9 : 12); ++idx) {
+ for (int idx = 0; !g_vm->shouldExit() && idx < (_ccNum ? 9 : 12); ++idx) {
events.updateGameCounter();
screen.blitFrom(savedBg);
sprites1.draw(0, 0,
- Common::Point(GOLEM_X1[_isDarkCc][idx], GOLEM_Y1[_isDarkCc][idx]), 0, idx);
+ Common::Point(GOLEM_X1[_ccNum][idx], GOLEM_Y1[_ccNum][idx]), 0, idx);
sprites1.draw(0, 1,
- Common::Point(GOLEM_X2[_isDarkCc][idx], GOLEM_Y1[_isDarkCc][idx]), 0, idx);
+ Common::Point(GOLEM_X2[_ccNum][idx], GOLEM_Y1[_ccNum][idx]), 0, idx);
windows[0].update();
WAIT(1);
@@ -1712,7 +1712,7 @@ void GolemCutscene::getNewLocation() {
Map &map = *g_vm->_map;
Party &party = *g_vm->_party;
- if (_isDarkCc) {
+ if (_ccNum) {
switch (party._mazeId) {
case 12:
if (party._questItems[47]) {
@@ -1833,9 +1833,9 @@ int DwarfCutscene::show() {
Sound &sound = *g_vm->_sound;
Windows &windows = *g_vm->_windows;
- SpriteResource sprites1(_isDarkCc ? "town1.zom" : "dwarf1.vga");
- SpriteResource sprites2(_isDarkCc ? "town2.zom" : "dwarf3.vga");
- SpriteResource sprites3(_isDarkCc ? "town3.zom" : "dwarf2.vga");
+ SpriteResource sprites1(_ccNum ? "town1.zom" : "dwarf1.vga");
+ SpriteResource sprites2(_ccNum ? "town2.zom" : "dwarf3.vga");
+ SpriteResource sprites3(_ccNum ? "town3.zom" : "dwarf2.vga");
getNewLocation();
// Save the screen contents
@@ -1843,17 +1843,17 @@ int DwarfCutscene::show() {
savedBg.copyFrom(screen);
// Zoom in on the mine entrance
- for (int idx = (_isDarkCc ? 10 : 12); idx >= 0; --idx) {
+ for (int idx = (_ccNum ? 10 : 12); idx >= 0; --idx) {
events.updateGameCounter();
screen.blitFrom(savedBg);
sprites1.draw(0, 0,
- Common::Point(DWARF_X0[_isDarkCc][idx], DWARF_Y[_isDarkCc][idx]), 0, idx);
+ Common::Point(DWARF_X0[_ccNum][idx], DWARF_Y[_ccNum][idx]), 0, idx);
sprites1.draw(0, 1,
- Common::Point(DWARF_X1[_isDarkCc][idx], DWARF_Y[_isDarkCc][idx]), 0, idx);
- if (_isDarkCc)
+ Common::Point(DWARF_X1[_ccNum][idx], DWARF_Y[_ccNum][idx]), 0, idx);
+ if (_ccNum)
sprites1.draw(0, 2,
- Common::Point(DWARF_X2[idx], DWARF_Y[_isDarkCc][idx]), 0, idx);
+ Common::Point(DWARF_X2[idx], DWARF_Y[_ccNum][idx]), 0, idx);
windows[0].update();
WAIT(1);
@@ -1867,7 +1867,7 @@ int DwarfCutscene::show() {
events.updateGameCounter();
screen.blitFrom(savedBg);
- sprites2.draw(0, 0, Common::Point(DWARF2_X[_isDarkCc][idx], DWARF2_Y[_isDarkCc][idx]), 0, idx);
+ sprites2.draw(0, 0, Common::Point(DWARF2_X[_ccNum][idx], DWARF2_Y[_ccNum][idx]), 0, idx);
windows[0].update();
WAIT(1);
}
@@ -1876,16 +1876,16 @@ int DwarfCutscene::show() {
screen.blitFrom(savedBg);
sprites2.draw(0, 0);
windows[0].update();
- _subtitles.setLine(_isDarkCc ? 0 : 4);
+ _subtitles.setLine(_ccNum ? 0 : 4);
- for (int idx = 0; idx < (_isDarkCc ? 2 : 3); ++idx) {
+ for (int idx = 0; idx < (_ccNum ? 2 : 3); ++idx) {
switch (idx) {
case 0:
- sound.playSound(_isDarkCc ? "pass2.voc" : "dwarf10.voc");
+ sound.playSound(_ccNum ? "pass2.voc" : "dwarf10.voc");
break;
case 1:
- if (_isDarkCc) {
+ if (_ccNum) {
sprites2.draw(0, 0);
sprites3.draw(0, 0);
_subtitles.show();
@@ -1909,7 +1909,7 @@ int DwarfCutscene::show() {
events.updateGameCounter();
do {
sprites2.draw(0, 0);
- sprites3.draw(0, g_vm->getRandomNumber(_isDarkCc ? 8 : 9));
+ sprites3.draw(0, g_vm->getRandomNumber(_ccNum ? 8 : 9));
_subtitles.show();
events.timeMark5();
@@ -1923,7 +1923,7 @@ int DwarfCutscene::show() {
exit:
sprites2.draw(0, 0);
- if (!_isDarkCc)
+ if (!_ccNum)
sprites3.draw(0, 1);
windows[0].update();
@@ -1944,7 +1944,7 @@ exit:
void DwarfCutscene::getNewLocation() {
Party &party = *g_vm->_party;
- if (_isDarkCc) {
+ if (_ccNum) {
switch (party._mazeId) {
case 4:
if (party._questItems[35]) {
@@ -2172,7 +2172,7 @@ int PyramidLocation::show() {
Common::Point pt;
if (g_vm->getGameID() == GType_WorldOfXeen) {
- if (_isDarkCc) {
+ if (_ccNum) {
if (party._mazeId == 52) {
mapId = 49;
pt = Common::Point(7, 14);
@@ -2192,7 +2192,7 @@ int PyramidLocation::show() {
}
// Load the destination map and set position and direction
- map._loadDarkSide = !_isDarkCc;
+ map._loadDarkSide = !_ccNum;
map.load(mapId);
party._mazePosition = pt;
party._mazeDirection = dir;
@@ -2200,7 +2200,7 @@ int PyramidLocation::show() {
// Playing Clouds or Dark Side on it's own, so can't switch sides
Window &win = windows[12];
Common::String msg = Common::String::format(Res.MOONS_NOT_ALIGNED,
- _isDarkCc ? "Clouds" : "Darkside");
+ _ccNum ? "Clouds" : "Darkside");
win.open();
win.writeString(msg);
win.update();
diff --git a/engines/xeen/locations.h b/engines/xeen/locations.h
index 9b3e36e..2257395 100644
--- a/engines/xeen/locations.h
+++ b/engines/xeen/locations.h
@@ -47,7 +47,7 @@ protected:
Common::Array<SpriteResource> _townSprites;
SpriteResource _icons1, _icons2;
int _townMaxId;
- const bool &_isDarkCc;
+ const bool &_ccNum;
int _animFrame;
Common::String _vocName, _songName;
Common::Point _animPos;
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index d8afa4d..c286d2a 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -717,7 +717,7 @@ void Map::load(int mapId) {
// Iterate through loading the given maze as well as the two successive
// mazes in each of the four cardinal directions
- bool isDarkCc = files._isDarkCc;
+ int ccNum = files._ccNum;
MazeData *mazeDataP = &_mazeData[0];
bool textLoaded = false;
@@ -735,9 +735,9 @@ void Map::load(int mapId) {
mazeDataP->synchronize(datSer);
datFile.close();
- if (isDarkCc && mapId == 50)
+ if (ccNum && mapId == 50)
mazeDataP->setAllTilesStepped();
- if (!isDarkCc && party._gameFlags[0][25] &&
+ if (!ccNum && party._gameFlags[0][25] &&
(mapId == 42 || mapId == 43 || mapId == 4)) {
mazeDataP->clearCellSurfaces();
}
@@ -752,7 +752,7 @@ void Map::load(int mapId) {
_mazeName = Res._cloudsMapNames[mapId];
} else {
Common::String txtName = Common::String::format("%s%c%03d.txt",
- isDarkCc ? "dark" : "xeen", mapId >= 100 ? 'x' : '0', mapId);
+ ccNum ? "dark" : "xeen", mapId >= 100 ? 'x' : '0', mapId);
File fText(txtName, 1);
char mazeName[33];
fText.read(mazeName, 33);
@@ -776,7 +776,7 @@ void Map::load(int mapId) {
_headData.synchronize(headFile);
headFile.close();
- if (!isDarkCc && mapId == 15) {
+ if (!ccNum && mapId == 15) {
if ((_mobData._monsters[0]._position.x > 31 || _mobData._monsters[0]._position.y > 31) &&
(_mobData._monsters[1]._position.x > 31 || _mobData._monsters[1]._position.y > 31) &&
(_mobData._monsters[2]._position.x > 31 || _mobData._monsters[2]._position.y > 31)) {
@@ -809,12 +809,12 @@ void Map::load(int mapId) {
files.setGameCc(_sideObjects);
if (party._cloudsEnd && _mobData._objectSprites[i]._spriteId == 85 &&
- mapId == 27 && isDarkCc) {
+ mapId == 27 && ccNum) {
_mobData._objects[29]._spriteId = 0;
_mobData._objects[29]._id = 8;
_mobData._objectSprites[i]._sprites.clear();
} else if (mapId == 12 && party._gameFlags[0][43] &&
- _mobData._objectSprites[i]._spriteId == 118 && !isDarkCc) {
+ _mobData._objectSprites[i]._spriteId == 118 && !ccNum) {
filename = "085.obj";
_mobData._objectSprites[0]._spriteId = 85;
} else {
@@ -847,15 +847,15 @@ void Map::load(int mapId) {
_mobData._wallItemSprites[i]._sprites.load(filename, _sidePictures);
}
- files.setGameCc(isDarkCc);
+ files.setGameCc(ccNum);
// Handle loading miscellaneous sprites for the map
if (_isOutdoors) {
// Start playing relevant music
- sound._musicSide = isDarkCc;
+ sound._musicSide = ccNum;
Common::String musName;
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
int randIndex = _vm->getRandomNumber(6);
musName = Res.MUSIC_FILES2[_mazeData->_wallKind][randIndex];
} else {
@@ -884,16 +884,16 @@ void Map::load(int mapId) {
_surfaceSprites[i].load(Res.SURFACE_NAMES[_mazeData[0]._surfaceTypes[i]]);
}
} else {
- if (files._isDarkCc && (mapId == 125 || mapId == 126 || mapId == 127))
+ if (files._ccNum && (mapId == 125 || mapId == 126 || mapId == 127))
files.setGameCc(0);
- sound._musicSide = files._isDarkCc;
+ sound._musicSide = files._ccNum;
// Start playing relevant music
const int MUS_INDEXES[] = { 1, 2, 3, 4, 3, 5 };
Common::String musName;
- _sideMusic = isDarkCc;
- if (isDarkCc) {
+ _sideMusic = ccNum;
+ if (ccNum) {
int randIndex = _vm->getRandomNumber(6);
musName = Res.MUSIC_FILES2[MUS_INDEXES[_mazeData->_wallKind]][randIndex];
} else {
@@ -987,7 +987,7 @@ void Map::load(int mapId) {
indoorList._ground._sprites = &_groundSprites;
// Don't show horizon for certain maps
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
if ((mapId >= 89 && mapId <= 112) || mapId == 128 || mapId == 129)
indoorList._horizon._sprites = nullptr;
} else {
@@ -998,7 +998,7 @@ void Map::load(int mapId) {
loadSky();
- files.setGameCc(isDarkCc);
+ files.setGameCc(ccNum);
}
void Map::findMap(int mapId) {
@@ -1114,7 +1114,7 @@ void Map::saveMap() {
FileManager &files = *g_vm->_files;
Party &party = *g_vm->_party;
int mapId = _mazeData[0]._mazeId;
- if (!files._isDarkCc && mapId == 85)
+ if (!files._ccNum && mapId == 85)
return;
// Save the primary maze
@@ -1124,7 +1124,7 @@ void Map::saveMap() {
_mazeData[0].synchronize(datSer);
datFile.finalize();
- if (!files._isDarkCc && mapId == 15) {
+ if (!files._ccNum && mapId == 15) {
for (uint idx = 0; idx < MIN(_mobData._monsters.size(), (uint)3); ++idx) {
MazeMonster &mon = _mobData._monsters[idx];
if (mon._position.x > 31 || mon._position.y > 31) {
@@ -1162,7 +1162,7 @@ void Map::saveMonsters() {
void Map::saveMaze() {
int mazeNum = _mazeData[0]._mazeNumber;
- if (!mazeNum || (mazeNum == 85 && !_vm->_files->_isDarkCc))
+ if (!mazeNum || (mazeNum == 85 && !_vm->_files->_ccNum))
return;
saveEvents();
@@ -1244,7 +1244,7 @@ int Map::getCell(int idx) {
);
if (pt.x > 31 || pt.y > 31) {
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
if ((mapId >= 53 && mapId <= 88 && mapId != 73) || (mapId >= 74 && mapId <= 120) ||
mapId == 125 || mapId == 126 || mapId == 128 || mapId == 129) {
_currentSurfaceId = SURFTYPE_DESERT;
@@ -1275,7 +1275,7 @@ int Map::getCell(int idx) {
_currentWall = 0;
return 0;
} else {
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
if ((mapId >= 53 && mapId <= 88 && mapId != 73) || (mapId >= 74 && mapId <= 120) ||
mapId == 125 || mapId == 126 || mapId == 128 || mapId == 129) {
_currentSurfaceId = 6;
@@ -1309,7 +1309,7 @@ int Map::getCell(int idx) {
_currentWall = 0;
return 0;
} else {
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
if ((mapId >= 53 && mapId <= 88 && mapId != 73) || (mapId >= 74 && mapId <= 120) ||
mapId == 125 || mapId == 126 || mapId == 128 || mapId == 129) {
_currentSurfaceId = 6;
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index 2a06bf3..83490ab 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -135,21 +135,21 @@ void BlacksmithWares::regenerate() {
}
void BlacksmithWares::blackData2CharData(Character &c) {
- bool isDarkCc = g_vm->_files->_isDarkCc;
+ int ccNum = g_vm->_files->_ccNum;
int slotIndex = getSlotIndex();
for (ItemCategory cat = CATEGORY_WEAPON; cat <= CATEGORY_MISC; cat = (ItemCategory)((int)cat + 1))
for (int idx = 0; idx < INV_ITEMS_TOTAL; ++idx)
- c._items[cat][idx] = (*this)[cat][isDarkCc][slotIndex][idx];
+ c._items[cat][idx] = (*this)[cat][ccNum][slotIndex][idx];
}
void BlacksmithWares::charData2BlackData(Character &c) {
- bool isDarkCc = g_vm->_files->_isDarkCc;
+ int ccNum = g_vm->_files->_ccNum;
int slotIndex = getSlotIndex();
for (ItemCategory cat = CATEGORY_WEAPON; cat <= CATEGORY_MISC; cat = (ItemCategory)((int)cat + 1))
for (int idx = 0; idx < INV_ITEMS_TOTAL; ++idx)
- (*this)[cat][isDarkCc][slotIndex][idx] = c._items[cat][idx];
+ (*this)[cat][ccNum][slotIndex][idx] = c._items[cat][idx];
}
BlacksmithItems &BlacksmithWares::operator[](ItemCategory category) {
@@ -163,10 +163,10 @@ BlacksmithItems &BlacksmithWares::operator[](ItemCategory category) {
uint BlacksmithWares::getSlotIndex() const {
Party &party = *g_vm->_party;
- bool isDarkCc = g_vm->_files->_isDarkCc;
+ int ccNum = g_vm->_files->_ccNum;
int slotIndex = 0;
- while (slotIndex < 4 && party._mazeId != (int)Res.BLACKSMITH_MAP_IDS[isDarkCc][slotIndex])
+ while (slotIndex < 4 && party._mazeId != (int)Res.BLACKSMITH_MAP_IDS[ccNum][slotIndex])
++slotIndex;
if (slotIndex == 4)
slotIndex = 0;
@@ -925,7 +925,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
break;
}
case 20:
- _gameFlags[files._isDarkCc][takeVal] = false;
+ _gameFlags[files._ccNum][takeVal] = false;
break;
case 21: {
bool found = false;
@@ -1102,7 +1102,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
_worldFlags[takeVal] = false;
break;
case 104:
- _questFlags[files._isDarkCc][takeVal] = false;
+ _questFlags[files._ccNum][takeVal] = false;
break;
case 107:
_characterFlags[ps._rosterId][takeVal] = false;
@@ -1195,7 +1195,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
break;
}
case 20:
- _gameFlags[files._isDarkCc][giveVal] = true;
+ _gameFlags[files._ccNum][giveVal] = true;
break;
case 21: {
int idx;
@@ -1443,7 +1443,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
break;
case 104:
assert(giveVal < 30);
- _questFlags[files._isDarkCc][giveVal] = true;
+ _questFlags[files._ccNum][giveVal] = true;
break;
case 107:
assert(takeVal < 24);
@@ -1469,7 +1469,7 @@ bool Party::giveExt(int mode1, uint val1, int mode2, uint val2, int mode3, uint
MazeObject &obj = map._mobData._objects[intf._objNumber - 1];
switch (obj._spriteId) {
case 15:
- if (!files._isDarkCc)
+ if (!files._ccNum)
break;
// Intentional fall-through
diff --git a/engines/xeen/saves.cpp b/engines/xeen/saves.cpp
index 7bd9381..0d47176 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._isDarkCc;
+ map._loadDarkSide = files._ccNum;
map.load(party._mazeId);
delete saveFile;
diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp
index c9781b3..4773547 100644
--- a/engines/xeen/screen.cpp
+++ b/engines/xeen/screen.cpp
@@ -169,7 +169,7 @@ bool Screen::doScroll(bool rollUp, bool fadeInFlag) {
const int SCROLL_L[8] = { 29, 23, 15, -5, -11, -23, -49, -71 };
const int SCROLL_R[8] = { 165, 171, 198, 218, 228, 245, 264, 281 };
- if (_vm->_files->_isDarkCc) {
+ if (_vm->_files->_ccNum) {
if (fadeInFlag)
screen.fadeIn(2);
return _vm->shouldExit();
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 8bcc3bf..91db032 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -138,7 +138,7 @@ int Scripts::checkEvents() {
Party &party = *_vm->_party;
Sound &sound = *_vm->_sound;
Windows &windows = *_vm->_windows;
- bool isDarkCc = files._isDarkCc;
+ int ccNum = files._ccNum;
_refreshIcons = false;
_itemType = 0;
@@ -212,12 +212,12 @@ int Scripts::checkEvents() {
if (_animCounter > 0 && intf._objNumber) {
MazeObject &selectedObj = map._mobData._objects[intf._objNumber - 1];
- if (selectedObj._spriteId == (isDarkCc ? 15 : 16)) {
+ if (selectedObj._spriteId == (ccNum ? 15 : 16)) {
for (uint idx = 0; idx < 16; ++idx) {
MazeObject &obj = map._mobData._objects[idx];
- if (obj._spriteId == (isDarkCc ? 62 : 57)) {
+ if (obj._spriteId == (ccNum ? 62 : 57)) {
selectedObj._id = idx;
- selectedObj._spriteId = isDarkCc ? 62 : 57;
+ selectedObj._spriteId = ccNum ? 62 : 57;
break;
}
}
@@ -276,9 +276,9 @@ void Scripts::openGrate(int wallVal, int action) {
Map &map = *_vm->_map;
Party &party = *_vm->_party;
Sound &sound = *_vm->_sound;
- bool isDarkCc = files._isDarkCc;
+ int ccNum = files._ccNum;
- if ((wallVal != 13 || map._currentGrateUnlocked) && (!isDarkCc || wallVal != 9 ||
+ if ((wallVal != 13 || map._currentGrateUnlocked) && (!ccNum || wallVal != 9 ||
map.mazeData()._wallKind != 2)) {
if (wallVal != 9 && !map._currentGrateUnlocked) {
int charIndex = WhoWill::show(_vm, 13, action, false) - 1;
@@ -943,21 +943,21 @@ bool Scripts::cmdConfirmWord(ParamsIterator ¶ms) {
_mirrorId = StringInput::show(_vm, inputType, msg1, msg2, _event->_opcode);
if (_mirrorId) {
- if (_mirrorId == 33 && files._isDarkCc) {
+ if (_mirrorId == 33 && files._ccNum) {
doDarkSideEnding();
- } else if (_mirrorId == 34 && files._isDarkCc) {
+ } else if (_mirrorId == 34 && files._ccNum) {
doWorldEnding();
- } else if (_mirrorId == 35 && files._isDarkCc &&
+ } else if (_mirrorId == 35 && files._ccNum &&
_vm->getGameID() == GType_WorldOfXeen) {
doCloudsEnding();
- } else if (_mirrorId == 40 && !files._isDarkCc) {
+ } else if (_mirrorId == 40 && !files._ccNum) {
doCloudsEnding();
- } else if (_mirrorId == 60 && !files._isDarkCc) {
+ } else if (_mirrorId == 60 && !files._ccNum) {
doDarkSideEnding();
- } else if (_mirrorId == 61 && !files._isDarkCc) {
+ } else if (_mirrorId == 61 && !files._ccNum) {
doWorldEnding();
} else {
- if (_mirrorId == 59 && !files._isDarkCc) {
+ if (_mirrorId == 59 && !files._ccNum) {
for (int idx = 0; idx < MAX_TREASURE_ITEMS; ++idx) {
XeenItem &item = party._treasure._weapons[idx];
if (!item._id) {
@@ -1583,7 +1583,7 @@ bool Scripts::ifProc(int action, uint32 val, int mode, int charIndex) {
break;
}
case 20:
- if (files._isDarkCc)
+ if (files._ccNum)
val += 256;
assert(val < 512);
v = party._gameFlags[val / 256][val % 256] ? val : 0xffffffff;
@@ -1826,7 +1826,7 @@ bool Scripts::ifProc(int action, uint32 val, int mode, int charIndex) {
break;
case 104:
// Get value of quest flag
- v = party._questFlags[files._isDarkCc][val] ? val : 0xffffffff;
+ v = party._questFlags[files._ccNum][val] ? val : 0xffffffff;
break;
case 105:
// Test number of Megacredits in party. Only used by King's Engineer in Castle Burlock
diff --git a/engines/xeen/spells.cpp b/engines/xeen/spells.cpp
index 9ba5812..d85241a 100644
--- a/engines/xeen/spells.cpp
+++ b/engines/xeen/spells.cpp
@@ -433,10 +433,10 @@ void Spells::detectMonster() {
Sound &sound = *_vm->_sound;
Windows &windows = *_vm->_windows;
Window &w = windows[19];
- bool isDarkCc = _vm->_files->_isDarkCc;
+ int ccNum = _vm->_files->_ccNum;
int grid[7][7];
- SpriteResource sprites(isDarkCc ? "detectmn.icn" : "detctmon.icn");
+ SpriteResource sprites(ccNum ? "detectmn.icn" : "detctmon.icn");
Common::fill(&grid[0][0], &grid[6][6], 0);
w.open();
@@ -1247,10 +1247,10 @@ void Spells::townPortal() {
sound.playFX(51);
map._loadDarkSide = map._sideTownPortal;
- _vm->_files->_isDarkCc = map._sideTownPortal > 0;
+ _vm->_files->_ccNum = map._sideTownPortal > 0;
map.load(Res.TOWN_MAP_NUMBERS[map._sideTownPortal][townNumber - 1]);
- if (!_vm->_files->_isDarkCc) {
+ if (!_vm->_files->_ccNum) {
party.moveToRunLocation();
} else {
switch (townNumber) {
diff --git a/engines/xeen/subtitles.cpp b/engines/xeen/subtitles.cpp
index 86dff2d..168ed1d 100644
--- a/engines/xeen/subtitles.cpp
+++ b/engines/xeen/subtitles.cpp
@@ -40,7 +40,7 @@ Subtitles::~Subtitles() {
void Subtitles::loadSubtitles() {
File f("special.bin");
- if (!g_vm->_files->_isDarkCc) {
+ if (!g_vm->_files->_ccNum) {
// The first subtitle line contains all the text for the Clouds intro. Since ScummVM allows
// both voice and subtitles at the same time, unlike the original, we need to split up the
// first subtitle into separate lines to allow them to better interleave with the voice
diff --git a/engines/xeen/swordsofxeen/swordsofxeen.cpp b/engines/xeen/swordsofxeen/swordsofxeen.cpp
index bbe0a74..a060b92 100644
--- a/engines/xeen/swordsofxeen/swordsofxeen.cpp
+++ b/engines/xeen/swordsofxeen/swordsofxeen.cpp
@@ -49,10 +49,10 @@ void SwordsOfXeenEngine::death() {
_sound->playSound("laff1.voc");
bool breakFlag = false;
- for (int idx = 0, idx2 = 0; idx < (_files->_isDarkCc ? 10 : 23); ++idx) {
+ for (int idx = 0, idx2 = 0; idx < (_files->_ccNum ? 10 : 23); ++idx) {
_events->updateGameCounter();
- if (_files->_isDarkCc) {
+ if (_files->_ccNum) {
breakFlag = _events->wait(2);
} else {
if (idx == 1 || idx == 11)
@@ -63,8 +63,8 @@ void SwordsOfXeenEngine::death() {
_sound->playFX(34);
}
- if ((_files->_isDarkCc ? 9 : 10) == idx) {
- if ((_files->_isDarkCc ? 2 : 1) > idx2) {
+ if ((_files->_ccNum ? 9 : 10) == idx) {
+ if ((_files->_ccNum ? 2 : 1) > idx2) {
// Restart loop
idx = -1;
++idx2;
diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
index 0e8149e..5c64ade 100644
--- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
@@ -40,7 +40,7 @@ bool CloudsCutscenes::showCloudsIntro() {
Screen &screen = *g_vm->_screen;
Sound &sound = *g_vm->_sound;
- bool darkCc = files._isDarkCc;
+ bool darkCc = files._ccNum;
files.setGameCc(0);
bool seenIntro = showCloudsTitle() && showCloudsIntroInner();
@@ -379,7 +379,7 @@ void CloudsCutscenes::showCloudsEnding(uint finalScore) {
FileManager &files = *g_vm->_files;
Sound &sound = *g_vm->_sound;
- bool darkCc = files._isDarkCc;
+ bool darkCc = files._ccNum;
files.setGameCc(0);
_mirror.load("mirror.end");
@@ -406,7 +406,7 @@ bool CloudsCutscenes::showCloudsEnding1() {
Screen &screen = *_vm->_screen;
Sound &sound = *_vm->_sound;
- files._isDarkCc = false;
+ files._ccNum = false;
files.setGameCc(0);
// Show the castle with swirling clouds and lightning
diff --git a/engines/xeen/worldofxeen/darkside_cutscenes.cpp b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
index 0e931ce..b30bb71 100644
--- a/engines/xeen/worldofxeen/darkside_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
@@ -74,7 +74,7 @@ const int LEFT_CLAW_IDLE_Y[32] = {
bool DarkSideCutscenes::showDarkSideTitle(bool seenIntro) {
Screen &screen = *g_vm->_screen;
Sound &sound = *g_vm->_sound;
- g_vm->_files->_isDarkCc = true;
+ g_vm->_files->_ccNum = true;
screen.loadPalette("dark.pal");
SpriteResource nwc[4] = {
@@ -168,7 +168,7 @@ bool DarkSideCutscenes::showDarkSideIntro(bool seenIntro) {
Screen &screen = *g_vm->_screen;
Sound &sound = *g_vm->_sound;
- files._isDarkCc = true;
+ files._ccNum = true;
files.setGameCc(1);
if (showDarkSideTitle(seenIntro)) {
diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp
index 2410a29..3ac56a3 100644
--- a/engines/xeen/worldofxeen/worldofxeen.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen.cpp
@@ -79,10 +79,10 @@ void WorldOfXeenEngine::death() {
w.update();
savedBg.blitFrom(*_screen);
- _sound->playSound(_files->_isDarkCc ? "laff1.voc" : "xeenlaff.voc");
+ _sound->playSound(_files->_ccNum ? "laff1.voc" : "xeenlaff.voc");
// Animation of Xeen or Alamar laughing
- for (int idx = 0, idx2 = 0; idx < (_files->_isDarkCc ? 10 : 23); ++idx) {
+ for (int idx = 0, idx2 = 0; idx < (_files->_ccNum ? 10 : 23); ++idx) {
_events->updateGameCounter();
_screen->blitFrom(savedBg);
@@ -90,7 +90,7 @@ void WorldOfXeenEngine::death() {
death1Sprites.draw(0, idx - 1);
w.update();
- if (_files->_isDarkCc) {
+ if (_files->_ccNum) {
_events->wait(2, false);
} else {
if (idx == 1 || idx == 11)
@@ -100,8 +100,8 @@ void WorldOfXeenEngine::death() {
_sound->playFX(34);
}
- if (idx == (_files->_isDarkCc ? 9 : 10)) {
- if (idx2 < (_files->_isDarkCc ? 2 : 1)) {
+ if (idx == (_files->_ccNum ? 9 : 10)) {
+ if (idx2 < (_files->_ccNum ? 2 : 1)) {
idx = -1;
++idx2;
}
More information about the Scummvm-git-logs
mailing list