aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/carry
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-29 20:36:15 -0500
committerPaul Gilbert2017-01-29 20:36:15 -0500
commit1948b62a80f056050f94c8a56f00de58f42394b2 (patch)
treedf0c434c0cb48cccc2f402d70c7bc7aa1e62bde2 /engines/titanic/carry
parentfd69ac2943fe8efcc9a894bbb7a48c4d3e9427c6 (diff)
downloadscummvm-rg350-1948b62a80f056050f94c8a56f00de58f42394b2.tar.gz
scummvm-rg350-1948b62a80f056050f94c8a56f00de58f42394b2.tar.bz2
scummvm-rg350-1948b62a80f056050f94c8a56f00de58f42394b2.zip
TITANIC: Cleanup of music room object classes
Diffstat (limited to 'engines/titanic/carry')
-rw-r--r--engines/titanic/carry/phonograph_ear.cpp9
-rw-r--r--engines/titanic/carry/phonograph_ear.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/engines/titanic/carry/phonograph_ear.cpp b/engines/titanic/carry/phonograph_ear.cpp
index df0445d164..48ed85d685 100644
--- a/engines/titanic/carry/phonograph_ear.cpp
+++ b/engines/titanic/carry/phonograph_ear.cpp
@@ -32,13 +32,13 @@ END_MESSAGE_MAP()
void CPhonographEar::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_field140, indent);
+ file->writeNumberLine(_replacementEar, indent);
CEar::save(file, indent);
}
void CPhonographEar::load(SimpleFile *file) {
file->readNumber();
- _field140 = file->readNumber();
+ _replacementEar = file->readNumber();
CEar::load(file);
}
@@ -48,8 +48,9 @@ bool CPhonographEar::CorrectMusicPlayedMsg(CCorrectMusicPlayedMsg *msg) {
}
bool CPhonographEar::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
- if (_field140) {
- _field140 = false;
+ if (_replacementEar) {
+ // Start a timer to add a replacement ear to the Phonograph
+ _replacementEar = false;
addTimer(1000);
}
diff --git a/engines/titanic/carry/phonograph_ear.h b/engines/titanic/carry/phonograph_ear.h
index b5db015f90..df0700c5d1 100644
--- a/engines/titanic/carry/phonograph_ear.h
+++ b/engines/titanic/carry/phonograph_ear.h
@@ -33,10 +33,10 @@ class CPhonographEar : public CEar {
bool PETGainedObjectMsg(CPETGainedObjectMsg *msg);
bool TimerMsg(CTimerMsg *msg);
private:
- bool _field140;
+ bool _replacementEar;
public:
CLASSDEF;
- CPhonographEar() : CEar(), _field140(true) {}
+ CPhonographEar() : CEar(), _replacementEar(true) {}
/**
* Save the data for the class to file