[Scummvm-git-logs] scummvm master -> 2dbef2ffd7aad79bc15c7d47163d0555ca396464

dreammaster dreammaster at scummvm.org
Tue Feb 21 00:14:12 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2dbef2ffd7 TITANIC: Fixes for Titania's speech


Commit: 2dbef2ffd7aad79bc15c7d47163d0555ca396464
    https://github.com/scummvm/scummvm/commit/2dbef2ffd7aad79bc15c7d47163d0555ca396464
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-02-20T18:14:06-05:00

Commit Message:
TITANIC: Fixes for Titania's speech

Changed paths:
    engines/titanic/npcs/titania.cpp
    engines/titanic/npcs/titania.h
    engines/titanic/sound/titania_speech.cpp
    engines/titanic/sound/titania_speech.h


diff --git a/engines/titanic/npcs/titania.cpp b/engines/titanic/npcs/titania.cpp
index b961e0d..e0ea4f1 100644
--- a/engines/titanic/npcs/titania.cpp
+++ b/engines/titanic/npcs/titania.cpp
@@ -43,7 +43,7 @@ CTitania::CTitania() : CCharacter() {
 	_ear2 = false;
 	_nose = false;
 	_mouth = false;
-	_showIntro = true;
+	_showSpeech = true;
 }
 
 void CTitania::save(SimpleFile *file, int indent) {
@@ -59,7 +59,7 @@ void CTitania::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(_ear2, indent);
 	file->writeNumberLine(_nose, indent);
 	file->writeNumberLine(_mouth, indent);
-	file->writeNumberLine(_showIntro, indent);
+	file->writeNumberLine(_showSpeech, indent);
 
 	CCharacter::save(file, indent);
 }
@@ -77,7 +77,7 @@ void CTitania::load(SimpleFile *file) {
 	_ear2 = file->readNumber();
 	_nose = file->readNumber();
 	_mouth = file->readNumber();
-	_showIntro = file->readNumber();
+	_showSpeech = file->readNumber();
 
 	CCharacter::load(file);
 }
@@ -197,8 +197,8 @@ bool CTitania::ActMsg(CActMsg *msg) {
 }
 
 bool CTitania::EnterViewMsg(CEnterViewMsg *msg) {
-	if (_showIntro) {
-		_showIntro = false;
+	if (_showSpeech) {
+		_showSpeech = false;
 		disableMouse();
 		petHide();
 
diff --git a/engines/titanic/npcs/titania.h b/engines/titanic/npcs/titania.h
index 61f8c86..f94442d 100644
--- a/engines/titanic/npcs/titania.h
+++ b/engines/titanic/npcs/titania.h
@@ -46,7 +46,7 @@ private:
 	bool _ear2;
 	bool _nose;
 	bool _mouth;
-	bool _showIntro;
+	bool _showSpeech;
 public:
 	CLASSDEF;
 	CTitania();
diff --git a/engines/titanic/sound/titania_speech.cpp b/engines/titanic/sound/titania_speech.cpp
index 7d3db08..1adce7a 100644
--- a/engines/titanic/sound/titania_speech.cpp
+++ b/engines/titanic/sound/titania_speech.cpp
@@ -34,16 +34,16 @@ END_MESSAGE_MAP()
 
 void CTitaniaSpeech::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeNumberLine(_paraNum, indent);
-	file->writeNumberLine(_frameNum, indent);
+	file->writeNumberLine(_actionNum, indent);
+	file->writeNumberLine(_backgroundFrame, indent);
 
 	CGameObject::save(file, indent);
 }
 
 void CTitaniaSpeech::load(SimpleFile *file) {
 	file->readNumber();
-	_paraNum = file->readNumber();
-	_frameNum = file->readNumber();
+	_actionNum = file->readNumber();
+	_backgroundFrame = file->readNumber();
 
 	CGameObject::load(file);
 }
@@ -54,8 +54,8 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
 	CActMsg actMsg;
 
 	if (msg->_action == "TitaniaSpeech") {
-		switch (_paraNum) {
-		case 0:
+		switch (_actionNum) {
+		case 1:
 			movieSetAudioTiming(true);
 			loadSound("a#12.wav");
 			sleep(1000);
@@ -63,7 +63,7 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
 			movieEvent(0);
 			break;
 
-		case 1:
+		case 2:
 			loadSound("a#11.wav");
 			addTimer(0);
 			startAnimTimer("Para2", 300);
@@ -74,7 +74,7 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
 			startAnimTimer("NextPara", 30000);
 			break;
 
-		case 2:
+		case 3:
 			visibleMsg._visible = false;
 			visibleMsg.execute("TitaniaStillControl");
 			loadSound("a#10.wav");
@@ -82,7 +82,7 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
 			playSound("a#10.wav");
 			break;
 
-		case 3:
+		case 4:
 			visibleMsg._visible = false;
 			visibleMsg.execute("TitaniaStillControl");
 			loadSound("a#9.wav");
@@ -90,7 +90,7 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
 			playSound("a#9.wav");
 			break;
 
-		case 4:
+		case 5:
 			visibleMsg._visible = false;
 			visibleMsg.execute("TitaniaStillControl");
 			loadSound("a#8.wav");
@@ -101,7 +101,7 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
 		default:
 			sleep(3000);
 			actMsg._action = "SleepTitania";
-			actMsg.execute(this);
+			actMsg.execute("TitaniaControl");
 		}
 	}
 
@@ -109,10 +109,10 @@ bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
 }
 
 bool CTitaniaSpeech::MovieEndMsg(CMovieEndMsg *msg) {
-	if (_paraNum == 5) {
+	if (_actionNum == 5) {
 		startAnimTimer("NextPara", 0);
 	} else {
-		if (_paraNum != 1)
+		if (_actionNum != 1)
 			addTimer(0);
 		startAnimTimer("NextPara", 3000);
 	}
@@ -135,12 +135,12 @@ bool CTitaniaSpeech::TimerMsg(CTimerMsg *msg) {
 
 	if (msg->_action == "NextPara") {
 		visibleMsg.execute("TitaniaStillControl");
-		++_paraNum;
+		++_actionNum;
 		actMsg.execute(this);
 	} else if (msg->_action == "Para2") {
 		playSound("a#11.wav");
 	} else {
-		frameMsg._frameNumber = _frameNum;
+		frameMsg._frameNumber = _backgroundFrame++;
 		frameMsg.execute("TitaniaStillControl");
 	}
 
diff --git a/engines/titanic/sound/titania_speech.h b/engines/titanic/sound/titania_speech.h
index 2244bb0..48e0b7b 100644
--- a/engines/titanic/sound/titania_speech.h
+++ b/engines/titanic/sound/titania_speech.h
@@ -36,10 +36,11 @@ class CTitaniaSpeech : public CGameObject {
 	bool TimerMsg(CTimerMsg *msg);
 	bool EnterRoomMsg(CEnterRoomMsg *msg);
 private:
-	int _paraNum, _frameNum;
+	int _actionNum;
+	int _backgroundFrame;
 public:
 	CLASSDEF;
-	CTitaniaSpeech() : CGameObject(), _paraNum(1), _frameNum(0) {}
+	CTitaniaSpeech() : CGameObject(), _actionNum(1), _backgroundFrame(0) {}
 
 	/**
 	 * Save the data for the class to file





More information about the Scummvm-git-logs mailing list