aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/items_v3.cpp4
-rw-r--r--engines/kyra/kyra_v3.cpp18
-rw-r--r--engines/kyra/kyra_v3.h4
-rw-r--r--engines/kyra/saveload_v3.cpp16
-rw-r--r--engines/kyra/scene_v3.cpp6
-rw-r--r--engines/kyra/script_v3.cpp8
-rw-r--r--engines/kyra/sequences_v3.cpp8
-rw-r--r--engines/kyra/text_v3.cpp18
8 files changed, 40 insertions, 42 deletions
diff --git a/engines/kyra/items_v3.cpp b/engines/kyra/items_v3.cpp
index aecf4337ce..5aec674546 100644
--- a/engines/kyra/items_v3.cpp
+++ b/engines/kyra/items_v3.cpp
@@ -482,7 +482,7 @@ bool KyraEngine_v3::itemListMagic(int handItem, int itemSlot) {
debugC(9, kDebugLevelMain, "KyraEngine_v3::itemListMagic(%d, %d)", handItem, itemSlot);
uint16 item = _itemList[itemSlot].id;
- if (_curChapter == 1 && handItem == 3 && item == 3 && queryGameFlag(0x76)) {
+ if (_currentChapter == 1 && handItem == 3 && item == 3 && queryGameFlag(0x76)) {
//eelScript();
return true;
} else if ((handItem == 6 || handItem == 7) && item == 2) {
@@ -556,7 +556,7 @@ bool KyraEngine_v3::itemInventoryMagic(int handItem, int invSlot) {
debugC(9, kDebugLevelMain, "KyraEngine_v3::itemInventoryMagic(%d, %d)", handItem, invSlot);
uint16 item = _mainCharacter.inventory[invSlot];
- if (_curChapter == 1 && handItem == 3 && item == 3 && queryGameFlag(0x76)) {
+ if (_currentChapter == 1 && handItem == 3 && item == 3 && queryGameFlag(0x76)) {
//eelScript();
return true;
} else if ((handItem == 6 || handItem == 7) && item == 2) {
diff --git a/engines/kyra/kyra_v3.cpp b/engines/kyra/kyra_v3.cpp
index c162209b5e..c08d75fb24 100644
--- a/engines/kyra/kyra_v3.cpp
+++ b/engines/kyra/kyra_v3.cpp
@@ -43,7 +43,7 @@ KyraEngine_v3::KyraEngine_v3(OSystem *system, const GameFlags &flags) : KyraEngi
_soundDigital = 0;
_musicSoundChannel = -1;
_menuAudioFile = "TITLE1.AUD";
- _curMusicTrack = -1;
+ _lastMusicCommand = -1;
_itemBuffer1 = _itemBuffer2 = 0;
_scoreFile = 0;
_cCodeFile = 0;
@@ -108,7 +108,7 @@ KyraEngine_v3::KyraEngine_v3(OSystem *system, const GameFlags &flags) : KyraEngi
_useActorBuffer = false;
_curStudioSFX = 283;
_badConscienceShown = false;
- _curChapter = 1;
+ _currentChapter = 1;
_deathHandler = -1;
_moveFacingTable = 0;
_unkHandleSceneChangeFlag = false;
@@ -386,7 +386,7 @@ void KyraEngine_v3::playMusicTrack(int track, int force) {
else if (_musicSoundChannel == -1)
force = 1;
- if (track == _curMusicTrack && !force)
+ if (track == _lastMusicCommand && !force)
return;
stopMusicTrack();
@@ -397,7 +397,7 @@ void KyraEngine_v3::playMusicTrack(int track, int force) {
_musicSoundChannel = _soundDigital->playSound(_soundList[track], 0xFF, Audio::Mixer::kMusicSoundType);
}
- _curMusicTrack = track;
+ _lastMusicCommand = track;
}
void KyraEngine_v3::stopMusicTrack() {
@@ -406,7 +406,7 @@ void KyraEngine_v3::stopMusicTrack() {
if (_musicSoundChannel != -1 && _soundDigital->isPlaying(_musicSoundChannel))
_soundDigital->stopSound(_musicSoundChannel);
- _curMusicTrack = -1;
+ _lastMusicCommand = -1;
_musicSoundChannel = -1;
}
@@ -426,8 +426,8 @@ int KyraEngine_v3::musicUpdate(int forceRestart) {
lock = 1;
if (_musicSoundChannel >= 0) {
if (!_soundDigital->isPlaying(_musicSoundChannel)) {
- if (_curMusicTrack != -1)
- playMusicTrack(_curMusicTrack, 1);
+ if (_lastMusicCommand != -1)
+ playMusicTrack(_lastMusicCommand, 1);
}
}
lock = 0;
@@ -442,7 +442,7 @@ void KyraEngine_v3::fadeOutMusic(int ticks) {
if (_musicSoundChannel >= 0) {
_fadeOutMusicChannel = _musicSoundChannel;
_soundDigital->beginFadeOut(_musicSoundChannel, ticks);
- _curMusicTrack = -1;
+ _lastMusicCommand = -1;
}
}
@@ -1673,7 +1673,7 @@ void KyraEngine_v3::changeChapter(int newChapter, int sceneId, int malcolmShapes
debugC(9, kDebugLevelMain, "KyraEngine_v3::changeChapter(%d, %d, %d, %d)", newChapter, sceneId, malcolmShapes, facing);
resetItemList();
- _curChapter = newChapter;
+ _currentChapter = newChapter;
runStartupScript(newChapter, 0);
_mainCharacter.dlgIndex = 0;
diff --git a/engines/kyra/kyra_v3.h b/engines/kyra/kyra_v3.h
index 58fbbdace6..cdbdc11998 100644
--- a/engines/kyra/kyra_v3.h
+++ b/engines/kyra/kyra_v3.h
@@ -122,8 +122,6 @@ private:
static const char *_soundList[];
static const int _soundListSize;
- int _curMusicTrack;
-
void playMusicTrack(int track, int force);
void stopMusicTrack();
@@ -662,7 +660,7 @@ private:
uint8 *_paletteOverlay;
bool _useActorBuffer;
- int _curChapter;
+ int _currentChapter;
void changeChapter(int newChapter, int sceneId, int malcolmShapes, int facing);
static const uint8 _chapterLowestScene[];
diff --git a/engines/kyra/saveload_v3.cpp b/engines/kyra/saveload_v3.cpp
index 09d7d244e0..67868e3f22 100644
--- a/engines/kyra/saveload_v3.cpp
+++ b/engines/kyra/saveload_v3.cpp
@@ -46,8 +46,8 @@ void KyraEngine_v3::saveGame(const char *fileName, const char *saveName) {
out->writeUint32BE(sizeof(_flagsTable));
out->write(_flagsTable, sizeof(_flagsTable));
- out->writeSint16BE(_curMusicTrack);
- out->writeByte(_curChapter);
+ out->writeSint16BE(_lastMusicCommand);
+ out->writeByte(_currentChapter);
out->writeByte(_malcolmShapes);
//XXX
out->writeSint16BE(_score);
@@ -141,7 +141,7 @@ void KyraEngine_v3::loadGame(const char *fileName) {
_deathHandler = -1;
if (!_unkSceneScreenFlag1)
- _curMusicTrack = -1;
+ _lastMusicCommand = -1;
int curShapes = _malcolmShapes;
@@ -156,8 +156,8 @@ void KyraEngine_v3::loadGame(const char *fileName) {
in.read(_flagsTable, flagsSize);
// usually we have to save the flag set by opcode 10 here
- _curMusicTrack = in.readSint16();
- _curChapter = in.readByte();
+ _lastMusicCommand = in.readSint16();
+ _currentChapter = in.readByte();
_malcolmShapes = in.readByte();
//XXX
_score = in.readSint16();
@@ -241,9 +241,9 @@ void KyraEngine_v3::loadGame(const char *fileName) {
enterNewScene(_mainCharacter.sceneId, _mainCharacter.facing, 0, 0, 1);
setHandItem(_itemInHand);
- if (_curMusicTrack >= 0 && !_unkSceneScreenFlag1)
- playMusicTrack(_curMusicTrack, 1);
- else if (_curMusicTrack == -1)
+ if (_lastMusicCommand >= 0 && !_unkSceneScreenFlag1)
+ playMusicTrack(_lastMusicCommand, 1);
+ else if (_lastMusicCommand == -1)
playMusicTrack(28, 1);
while (!_screen->isMouseVisible())
diff --git a/engines/kyra/scene_v3.cpp b/engines/kyra/scene_v3.cpp
index 3485e95d1c..46e1ca5206 100644
--- a/engines/kyra/scene_v3.cpp
+++ b/engines/kyra/scene_v3.cpp
@@ -42,8 +42,8 @@ void KyraEngine_v3::enterNewScene(uint16 sceneId, int facing, int unk1, int unk2
}
musicUpdate(0);
- if (_curChapter != _currentTalkFile) {
- _currentTalkFile = _curChapter;
+ if (_currentChapter != _currentTalkFile) {
+ _currentTalkFile = _currentChapter;
openTalkFile(_currentTalkFile);
}
musicUpdate(0);
@@ -82,7 +82,7 @@ void KyraEngine_v3::enterNewScene(uint16 sceneId, int facing, int unk1, int unk2
musicUpdate(0);
uint32 waitUntilTimer = 0;
bool newSoundFile = false;
- if (_curMusicTrack != _sceneList[sceneId].sound) {
+ if (_lastMusicCommand != _sceneList[sceneId].sound) {
fadeOutMusic(60);
waitUntilTimer = _system->getMillis() + 60 * _tickLength;
newSoundFile = true;
diff --git a/engines/kyra/script_v3.cpp b/engines/kyra/script_v3.cpp
index f620750891..2eb141310a 100644
--- a/engines/kyra/script_v3.cpp
+++ b/engines/kyra/script_v3.cpp
@@ -538,7 +538,7 @@ int KyraEngine_v3::o3_checkInRect(ScriptState *script) {
int KyraEngine_v3::o3_updateConversations(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_updateConversations(%p) (%d)", (const void *)script, stackPos(0));
int dlgIndex = stackPos(0);
- switch (_curChapter-2) {
+ switch (_currentChapter-2) {
case 0:
dlgIndex -= 34;
break;
@@ -562,7 +562,7 @@ int KyraEngine_v3::o3_updateConversations(ScriptState *script) {
int convs[4];
Common::set_to(convs, convs+4, -1);
- if (_curChapter == 1) {
+ if (_currentChapter == 1) {
switch (_mainCharacter.dlgIndex) {
case 0:
convs[0] = 6;
@@ -642,7 +642,7 @@ int KyraEngine_v3::o3_updateConversations(ScriptState *script) {
default:
break;
}
- } else if (_curChapter == 2) {
+ } else if (_currentChapter == 2) {
switch (_mainCharacter.dlgIndex) {
case 0:
convs[0] = 4;
@@ -718,7 +718,7 @@ int KyraEngine_v3::o3_updateConversations(ScriptState *script) {
default:
break;
}
- } else if (_curChapter == 4) {
+ } else if (_currentChapter == 4) {
if (_malcolmsMood == 0) {
convs[0] = _mainCharacter.dlgIndex - 10;
convs[1] = _mainCharacter.dlgIndex - 5;
diff --git a/engines/kyra/sequences_v3.cpp b/engines/kyra/sequences_v3.cpp
index 16fd991022..972b6a027e 100644
--- a/engines/kyra/sequences_v3.cpp
+++ b/engines/kyra/sequences_v3.cpp
@@ -34,13 +34,13 @@ void KyraEngine_v3::showBadConscience() {
_badConscienceShown = true;
_badConscienceAnim = _rnd.getRandomNumberRng(0, 2);
- if (_curChapter == 2)
+ if (_currentChapter == 2)
_badConscienceAnim = 5;
- else if (_curChapter == 3)
+ else if (_currentChapter == 3)
_badConscienceAnim = 3;
- else if (_curChapter == 4 && _rnd.getRandomNumberRng(1, 100) <= 25)
+ else if (_currentChapter == 4 && _rnd.getRandomNumberRng(1, 100) <= 25)
_badConscienceAnim = 6;
- else if (_curChapter == 5 && _rnd.getRandomNumberRng(1, 100) <= 25)
+ else if (_currentChapter == 5 && _rnd.getRandomNumberRng(1, 100) <= 25)
_badConscienceAnim = 7;
else if (_malcolmShapes == 9)
_badConscienceAnim = 4;
diff --git a/engines/kyra/text_v3.cpp b/engines/kyra/text_v3.cpp
index 834903b18f..2aa05a6359 100644
--- a/engines/kyra/text_v3.cpp
+++ b/engines/kyra/text_v3.cpp
@@ -444,7 +444,7 @@ void KyraEngine_v3::malcolmSceneStartupChat() {
if (_noStartupChat)
return;
- int index = _mainCharacter.sceneId - _chapterLowestScene[_curChapter];
+ int index = _mainCharacter.sceneId - _chapterLowestScene[_currentChapter];
if (_newSceneDlgState[index])
return;
@@ -471,12 +471,12 @@ void KyraEngine_v3::updateDlgBuffer() {
if (_cnvFile)
_cnvFile->seek(0, SEEK_SET);
- if (_curDlgIndex == _mainCharacter.dlgIndex && _curDlgChapter == _curChapter && _curDlgLang == _lang)
+ if (_curDlgIndex == _mainCharacter.dlgIndex && _curDlgChapter == _currentChapter && _curDlgLang == _lang)
return;
- snprintf(dlgFile, 16, "CH%.02d-S%.02d.", _curChapter, _mainCharacter.dlgIndex);
+ snprintf(dlgFile, 16, "CH%.02d-S%.02d.", _currentChapter, _mainCharacter.dlgIndex);
appendLanguage(dlgFile, _lang, 16);
- snprintf(cnvFile, 16, "CH%.02d-S%.02d.CNV", _curChapter, _mainCharacter.dlgIndex);
+ snprintf(cnvFile, 16, "CH%.02d-S%.02d.CNV", _currentChapter, _mainCharacter.dlgIndex);
delete _cnvFile;
delete _dlgBuffer;
@@ -512,7 +512,7 @@ void KyraEngine_v3::updateDlgIndex() {
debugC(9, kDebugLevelMain, "KyraEngine_v3::updateDlgIndex()");
uint16 dlgIndex = _mainCharacter.dlgIndex;
- if (_curChapter == 1) {
+ if (_currentChapter == 1) {
static const uint8 dlgIndexMoodNice[] = { 0x0C, 0x0E, 0x10, 0x0F, 0x11 };
static const uint8 dlgIndexMoodNormal[] = { 0x00, 0x02, 0x04, 0x03, 0x05 };
static const uint8 dlgIndexMoodEvil[] = { 0x06, 0x08, 0x0A, 0x09, 0x0B };
@@ -523,7 +523,7 @@ void KyraEngine_v3::updateDlgIndex() {
dlgIndex = dlgIndexMoodNormal[_malcolmShapes];
else if (_malcolmsMood == 2)
dlgIndex = dlgIndexMoodEvil[_malcolmShapes];
- } else if (_curChapter == 2) {
+ } else if (_currentChapter == 2) {
if (dlgIndex >= 8)
dlgIndex -= 4;
if (dlgIndex >= 4)
@@ -533,7 +533,7 @@ void KyraEngine_v3::updateDlgIndex() {
dlgIndex += 8;
else if (_malcolmsMood == 2)
dlgIndex += 4;
- } else if (_curChapter == 4) {
+ } else if (_currentChapter == 4) {
if (dlgIndex >= 10)
dlgIndex -= 5;
if (dlgIndex >= 5)
@@ -692,7 +692,7 @@ void KyraEngine_v3::malcolmRandomChat() {
debugC(9, kDebugLevelMain, "KyraEngine_v3::malcolmRandomChat()");
updateDlgBuffer();
- int index = (_mainCharacter.sceneId - _chapterLowestScene[_curChapter]) * 2;
+ int index = (_mainCharacter.sceneId - _chapterLowestScene[_currentChapter]) * 2;
int vocHighBase = 0, vocHighIndex = 0, index1 = 0, index2 = 0;
loadDlgHeader(vocHighBase, vocHighIndex, index1, index2);
@@ -711,7 +711,7 @@ void KyraEngine_v3::malcolmRandomChat() {
void KyraEngine_v3::runDialog(int dlgIndex, int funcNum) {
debugC(9, kDebugLevelMain, "KyraEngine_v3::runDialog(%d, %d)", dlgIndex, funcNum);
- switch (_curChapter-2) {
+ switch (_currentChapter-2) {
case 0:
dlgIndex -= 34;
break;