[Scummvm-cvs-logs] scummvm master -> 23e387fb9086f9fdf2d15c01f29907f1fd593d29

dreammaster dreammaster at scummvm.org
Fri Aug 5 03:21:41 CEST 2016


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:
23e387fb90 TITANIC: Rename WaveFile to CWaveFile for consistency


Commit: 23e387fb9086f9fdf2d15c01f29907f1fd593d29
    https://github.com/scummvm/scummvm/commit/23e387fb9086f9fdf2d15c01f29907f1fd593d29
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-08-04T21:21:34-04:00

Commit Message:
TITANIC: Rename WaveFile to CWaveFile for consistency

Changed paths:
    engines/titanic/sound/sound.cpp
    engines/titanic/sound/sound.h
    engines/titanic/sound/sound_manager.cpp
    engines/titanic/sound/sound_manager.h
    engines/titanic/sound/wave_file.cpp
    engines/titanic/sound/wave_file.h
    engines/titanic/true_talk/true_talk_manager.cpp



diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp
index e8084d7..40f5c43 100644
--- a/engines/titanic/sound/sound.cpp
+++ b/engines/titanic/sound/sound.cpp
@@ -71,7 +71,7 @@ void CSound::fn3(int handle, int val2, int val3) {
 	warning("TODO: CSound::fn3");
 }
 
-void CSound::fn4(WaveFile *waveFile, int val) {
+void CSound::fn4(CWaveFile *waveFile, int val) {
 	// TODO
 }
 
@@ -99,11 +99,11 @@ void CSound::removeOldest() {
 	}
 }
 
-WaveFile *CSound::getTrueTalkSound(CDialogueFile *dialogueFile, int index) {
+CWaveFile *CSound::getTrueTalkSound(CDialogueFile *dialogueFile, int index) {
 	return loadSpeech(dialogueFile, index);
 }
 
-WaveFile *CSound::loadSound(const CString &name) {
+CWaveFile *CSound::loadSound(const CString &name) {
 	checkSounds();
 
 	// Check whether an entry for the given name is already active
@@ -139,7 +139,7 @@ WaveFile *CSound::loadSound(const CString &name) {
 }
 
 int CSound::playSound(const CString &name, CProximity &prox) {
-	WaveFile *waveFile  = loadSound(name);
+	CWaveFile *waveFile  = loadSound(name);
 	if (!waveFile)
 		return -1;
 
@@ -149,7 +149,7 @@ int CSound::playSound(const CString &name, CProximity &prox) {
 	return _soundManager.playSound(*waveFile, prox);
 }
 
-WaveFile *CSound::loadSpeech(CDialogueFile *dialogueFile, int speechId) {
+CWaveFile *CSound::loadSpeech(CDialogueFile *dialogueFile, int speechId) {
 	checkSounds();
 
 	// Check whether an entry for the given name is already active
@@ -186,7 +186,7 @@ WaveFile *CSound::loadSpeech(CDialogueFile *dialogueFile, int speechId) {
 }
 
 int CSound::playSpeech(CDialogueFile *dialogueFile, int speechId, CProximity &prox) {
-	WaveFile *waveFile = loadSpeech(dialogueFile, speechId);
+	CWaveFile *waveFile = loadSpeech(dialogueFile, speechId);
 	if (!waveFile)
 		return -1;
 
diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h
index c14c9e1..8c953c8 100644
--- a/engines/titanic/sound/sound.h
+++ b/engines/titanic/sound/sound.h
@@ -38,7 +38,7 @@ class CGameManager;
 class CSoundItem : public ListItem {
 public:
 	CString _name;
-	WaveFile *_waveFile;
+	CWaveFile *_waveFile;
 	File *_dialogueFileHandle;
 	int _speechId;
 	int _field24;
@@ -115,7 +115,7 @@ public:
 	bool fn1(int val);
 	void fn2(int handle);
 	void fn3(int handle, int val2, int val3);
-	void fn4(WaveFile *waveFile, int val);
+	void fn4(CWaveFile *waveFile, int val);
 		
 	void managerProc8(int v) { _soundManager.proc8(v); }
 
@@ -125,7 +125,7 @@ public:
 	 * @param speechId		Speech Id within dialogue
 	 * @returns				Wave file instance
 	 */
-	WaveFile *getTrueTalkSound(CDialogueFile *dialogueFile, int index);
+	CWaveFile *getTrueTalkSound(CDialogueFile *dialogueFile, int index);
 
 	/**
 	 * Load a speech resource
@@ -133,7 +133,7 @@ public:
 	 * @param speechId		Speech Id within dialogue
 	 * @returns				Wave file instance
 	 */
-	WaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId);
+	CWaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId);
 
 	/**
 	 * Play a speech
@@ -148,7 +148,7 @@ public:
 	 * @param name		Name of sound resource
 	 * @returns			Sound item record
 	 */
-	WaveFile *loadSound(const CString &name);
+	CWaveFile *loadSound(const CString &name);
 
 	/**
 	 * Play a sound
diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp
index 61ad59c..bf087b6 100644
--- a/engines/titanic/sound/sound_manager.cpp
+++ b/engines/titanic/sound/sound_manager.cpp
@@ -34,12 +34,12 @@ QSoundManager::QSoundManager() : _field18(0), _field1C(0) {
 	Common::fill(&_field4A0[0], &_field4A0[16], 0);
 }
 
-WaveFile *QSoundManager::loadSound(const CString &name) {
+CWaveFile *QSoundManager::loadSound(const CString &name) {
 	warning("TODO");
 	return nullptr;
 }
 
-WaveFile *QSoundManager::loadSpeech(CDialogueFile *dialogueFile, int speechId) {
+CWaveFile *QSoundManager::loadSpeech(CDialogueFile *dialogueFile, int speechId) {
 	warning("TODO");
 	return nullptr;
 }
@@ -49,7 +49,7 @@ int QSoundManager::proc5() const {
 	return 0;
 }
 
-int QSoundManager::playSound(WaveFile &soundRes, CProximity &prox) {
+int QSoundManager::playSound(CWaveFile &soundRes, CProximity &prox) {
 	warning("TODO");
 	return 0;
 }
@@ -87,7 +87,7 @@ bool QSoundManager::proc14() {
 	return false;
 }
 
-bool QSoundManager::isActive(const WaveFile *waveFile) const {
+bool QSoundManager::isActive(const CWaveFile *waveFile) const {
 	warning("TODO");
 	return false;
 }
diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h
index 85ee00a..ddfcba0 100644
--- a/engines/titanic/sound/sound_manager.h
+++ b/engines/titanic/sound/sound_manager.h
@@ -46,21 +46,21 @@ public:
 	 * @param name		Name of sound resource
 	 * @returns			Loaded wave file
 	 */
-	virtual WaveFile *loadSound(const CString &name) { return nullptr; }
+	virtual CWaveFile *loadSound(const CString &name) { return nullptr; }
 
 	/**
 	 * Loads a speech resource from a dialogue file
 	 * @param name		Name of sound resource
 	 * @returns			Loaded wave file
 	 */
-	virtual WaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId) { return 0; }
+	virtual CWaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId) { return 0; }
 
 	virtual int proc5() const { return 0; }
 
 	/**
 	 * Start playing a previously loaded wave file
 	 */
-	virtual int playSound(WaveFile &waveFile, CProximity &prox) = 0;
+	virtual int playSound(CWaveFile &waveFile, CProximity &prox) = 0;
 
 	virtual void proc7() = 0;
 	virtual void proc8(int v) = 0;
@@ -74,7 +74,7 @@ public:
 	/**
 	 * Returns true if the given sound is currently active
 	 */
-	virtual bool isActive(const WaveFile *waveFile) const { return false; }
+	virtual bool isActive(const CWaveFile *waveFile) const { return false; }
 
 	virtual int proc16() const { return 0; }
 	virtual void WaveMixPump() {}
@@ -136,21 +136,21 @@ public:
 	 * @param name		Name of sound resource
 	 * @returns			Loaded wave file
 	 */
-	virtual WaveFile *loadSound(const CString &name);
+	virtual CWaveFile *loadSound(const CString &name);
 
 	/**
 	 * Loads a speech resource from a dialogue file
 	 * @param name		Name of sound resource
 	 * @returns			Loaded wave file
 	 */
-	virtual WaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId);
+	virtual CWaveFile *loadSpeech(CDialogueFile *dialogueFile, int speechId);
 
 	virtual int proc5() const;
 
 	/**
 	 * Start playing a previously loaded sound resource
 	 */
-	virtual int playSound(WaveFile &waveFile, CProximity &prox);
+	virtual int playSound(CWaveFile &waveFile, CProximity &prox);
 	
 	virtual void proc7();
 	virtual void proc8(int v);
@@ -164,7 +164,7 @@ public:
 	/**
 	 * Returns true if the given sound is currently active
 	 */
-	virtual bool isActive(const WaveFile *soundRes) const;
+	virtual bool isActive(const CWaveFile *soundRes) const;
 
 	virtual int proc16() const;
 	virtual void WaveMixPump();
diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp
index 2459f1e..7749a7b 100644
--- a/engines/titanic/sound/wave_file.cpp
+++ b/engines/titanic/sound/wave_file.cpp
@@ -24,7 +24,7 @@
 
 namespace Titanic {
 
-int WaveFile::fn1() {
+int CWaveFile::fn1() {
 	// TODO
 	return 0;
 }
diff --git a/engines/titanic/sound/wave_file.h b/engines/titanic/sound/wave_file.h
index b27e5e7..0d8d863 100644
--- a/engines/titanic/sound/wave_file.h
+++ b/engines/titanic/sound/wave_file.h
@@ -29,7 +29,7 @@ namespace Titanic {
 
 class CSoundManager;
 
-class WaveFile {
+class CWaveFile {
 public:
 	int _field0;
 	int _field4;
@@ -44,7 +44,7 @@ public:
 	int _field28;
 	int _field2C;
 public:
-	WaveFile() : _field0(2), _field4(0), _field8(0), _handle(0),
+	CWaveFile() : _field0(2), _field4(0), _field8(0), _handle(0),
 		_owner(nullptr), _field14(1), _field18(0), _field1C(0),
 		_field20(0), _field24(0), _field28(0), _field2C(-1) {}
 
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index 977fc89..da3336f 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -408,7 +408,7 @@ int CTrueTalkManager::readDialogSound() {
 	_field18 = 0;
 
 	for (uint idx = 0; idx < _titleEngine._indexes.size(); ++idx) {
-		WaveFile *waveFile = _gameManager->_sound.getTrueTalkSound(
+		CWaveFile *waveFile = _gameManager->_sound.getTrueTalkSound(
 			_dialogueFile, _titleEngine._indexes[idx] - _dialogueId);
 		if (waveFile) {			
 			_field18 = waveFile->fn1();






More information about the Scummvm-git-logs mailing list