aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-20 18:14:06 -0500
committerPaul Gilbert2017-02-20 18:14:06 -0500
commit2dbef2ffd7aad79bc15c7d47163d0555ca396464 (patch)
tree156a7d55d0365d1ac840c52413672639fd024062
parent39790f8f16859676fa198611c817ffc946c65c9a (diff)
downloadscummvm-rg350-2dbef2ffd7aad79bc15c7d47163d0555ca396464.tar.gz
scummvm-rg350-2dbef2ffd7aad79bc15c7d47163d0555ca396464.tar.bz2
scummvm-rg350-2dbef2ffd7aad79bc15c7d47163d0555ca396464.zip
TITANIC: Fixes for Titania's speech
-rw-r--r--engines/titanic/npcs/titania.cpp10
-rw-r--r--engines/titanic/npcs/titania.h2
-rw-r--r--engines/titanic/sound/titania_speech.cpp30
-rw-r--r--engines/titanic/sound/titania_speech.h5
4 files changed, 24 insertions, 23 deletions
diff --git a/engines/titanic/npcs/titania.cpp b/engines/titanic/npcs/titania.cpp
index b961e0d77c..e0ea4f1459 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 61f8c86018..f94442d317 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 7d3db080eb..1adce7a5ac 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 2244bb01af..48e0b7bdad 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