[Scummvm-cvs-logs] SF.net SVN: scummvm: [31748] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Apr 27 02:42:18 CEST 2008


Revision: 31748
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31748&view=rev
Author:   lordhoto
Date:     2008-04-26 17:42:17 -0700 (Sat, 26 Apr 2008)

Log Message:
-----------
Renamed some kyra3 variables to match kyra2/kyra1 names.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/items_v3.cpp
    scummvm/trunk/engines/kyra/kyra_v3.cpp
    scummvm/trunk/engines/kyra/kyra_v3.h
    scummvm/trunk/engines/kyra/saveload_v3.cpp
    scummvm/trunk/engines/kyra/scene_v3.cpp
    scummvm/trunk/engines/kyra/script_v3.cpp
    scummvm/trunk/engines/kyra/sequences_v3.cpp
    scummvm/trunk/engines/kyra/text_v3.cpp

Modified: scummvm/trunk/engines/kyra/items_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_v3.cpp	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/items_v3.cpp	2008-04-27 00:42:17 UTC (rev 31748)
@@ -482,7 +482,7 @@
 	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 @@
 	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) {

Modified: scummvm/trunk/engines/kyra/kyra_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-27 00:42:17 UTC (rev 31748)
@@ -43,7 +43,7 @@
 	_soundDigital = 0;
 	_musicSoundChannel = -1;
 	_menuAudioFile = "TITLE1.AUD";
-	_curMusicTrack = -1;
+	_lastMusicCommand = -1;
 	_itemBuffer1 = _itemBuffer2 = 0;
 	_scoreFile = 0;
 	_cCodeFile = 0;
@@ -108,7 +108,7 @@
 	_useActorBuffer = false;
 	_curStudioSFX = 283;
 	_badConscienceShown = false;
-	_curChapter = 1;
+	_currentChapter = 1;
 	_deathHandler = -1;
 	_moveFacingTable = 0;
 	_unkHandleSceneChangeFlag = false;
@@ -386,7 +386,7 @@
 	else if (_musicSoundChannel == -1)
 		force = 1;
 
-	if (track == _curMusicTrack && !force)
+	if (track == _lastMusicCommand && !force)
 		return;
 
 	stopMusicTrack();
@@ -397,7 +397,7 @@
 		_musicSoundChannel = _soundDigital->playSound(_soundList[track], 0xFF, Audio::Mixer::kMusicSoundType);
 	}
 
-	_curMusicTrack = track;
+	_lastMusicCommand = track;
 }
 
 void KyraEngine_v3::stopMusicTrack() {
@@ -406,7 +406,7 @@
 	if (_musicSoundChannel != -1 && _soundDigital->isPlaying(_musicSoundChannel))
 		_soundDigital->stopSound(_musicSoundChannel);
 
-	_curMusicTrack = -1;
+	_lastMusicCommand = -1;
 	_musicSoundChannel = -1;
 }
 
@@ -426,8 +426,8 @@
 		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 @@
 	if (_musicSoundChannel >= 0) {
 		_fadeOutMusicChannel = _musicSoundChannel;
 		_soundDigital->beginFadeOut(_musicSoundChannel, ticks);
-		_curMusicTrack = -1;
+		_lastMusicCommand = -1;
 	}
 }
 
@@ -1673,7 +1673,7 @@
 	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;
 

Modified: scummvm/trunk/engines/kyra/kyra_v3.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.h	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/kyra_v3.h	2008-04-27 00:42:17 UTC (rev 31748)
@@ -122,8 +122,6 @@
 	static const char *_soundList[];
 	static const int _soundListSize;
 
-	int _curMusicTrack;
-
 	void playMusicTrack(int track, int force);
 	void stopMusicTrack();
 
@@ -662,7 +660,7 @@
 	uint8 *_paletteOverlay;
 	bool _useActorBuffer;
 
-	int _curChapter;
+	int _currentChapter;
 	void changeChapter(int newChapter, int sceneId, int malcolmShapes, int facing);
 
 	static const uint8 _chapterLowestScene[];

Modified: scummvm/trunk/engines/kyra/saveload_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload_v3.cpp	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/saveload_v3.cpp	2008-04-27 00:42:17 UTC (rev 31748)
@@ -46,8 +46,8 @@
 	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 @@
 
 	_deathHandler = -1;
 	if (!_unkSceneScreenFlag1)
-		_curMusicTrack = -1;
+		_lastMusicCommand = -1;
 
 	int curShapes = _malcolmShapes;
 
@@ -156,8 +156,8 @@
 	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 @@
 	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())

Modified: scummvm/trunk/engines/kyra/scene_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_v3.cpp	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/scene_v3.cpp	2008-04-27 00:42:17 UTC (rev 31748)
@@ -42,8 +42,8 @@
 	}
 
 	musicUpdate(0);
-	if (_curChapter != _currentTalkFile) {
-		_currentTalkFile = _curChapter;
+	if (_currentChapter != _currentTalkFile) {
+		_currentTalkFile = _currentChapter;
 		openTalkFile(_currentTalkFile);
 	}
 	musicUpdate(0);
@@ -82,7 +82,7 @@
 	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;

Modified: scummvm/trunk/engines/kyra/script_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_v3.cpp	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/script_v3.cpp	2008-04-27 00:42:17 UTC (rev 31748)
@@ -538,7 +538,7 @@
 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 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 @@
 		default:
 			break;
 		}
-	} else if (_curChapter == 2) {
+	} else if (_currentChapter == 2) {
 		switch (_mainCharacter.dlgIndex) {
 		case 0:
 			convs[0] = 4;
@@ -718,7 +718,7 @@
 		default:
 			break;
 		}
-	} else if (_curChapter == 4) {
+	} else if (_currentChapter == 4) {
 		if (_malcolmsMood == 0) {
 			convs[0] = _mainCharacter.dlgIndex - 10;
 			convs[1] = _mainCharacter.dlgIndex - 5;

Modified: scummvm/trunk/engines/kyra/sequences_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v3.cpp	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/sequences_v3.cpp	2008-04-27 00:42:17 UTC (rev 31748)
@@ -34,13 +34,13 @@
 
 	_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;

Modified: scummvm/trunk/engines/kyra/text_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_v3.cpp	2008-04-27 00:38:01 UTC (rev 31747)
+++ scummvm/trunk/engines/kyra/text_v3.cpp	2008-04-27 00:42:17 UTC (rev 31748)
@@ -444,7 +444,7 @@
 	if (_noStartupChat)
 		return;
 
-	int index = _mainCharacter.sceneId - _chapterLowestScene[_curChapter];
+	int index = _mainCharacter.sceneId - _chapterLowestScene[_currentChapter];
 	if (_newSceneDlgState[index])
 		return;
 
@@ -471,12 +471,12 @@
 	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 @@
 	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 @@
 			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 @@
 			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 @@
 	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::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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list