From 22456b345f4b39558cfc07ccd2e06ab6cfb98850 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 17 Mar 2018 20:27:42 -0400 Subject: 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 --- engines/xeen/worldofxeen/clouds_cutscenes.cpp | 6 +++--- engines/xeen/worldofxeen/darkside_cutscenes.cpp | 4 ++-- engines/xeen/worldofxeen/worldofxeen.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'engines/xeen/worldofxeen') diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp index 0e8149e37e..5c64ade6d0 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 0e931ce9d7..b30bb71324 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 2410a29baa..3ac56a3444 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; } -- cgit v1.2.3