aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
authorPaul Gilbert2016-07-03 19:07:38 -0400
committerPaul Gilbert2016-07-15 19:27:16 -0400
commit8b2d85f8e5b30aeb73817894974a4db53588565b (patch)
tree2ef506017bf8c814f86e956773ed383729756d2a /engines/titanic/support
parentfb06cb4dde4d612289ea1b5830f8cd1c9e1bedfc (diff)
downloadscummvm-rg350-8b2d85f8e5b30aeb73817894974a4db53588565b.tar.gz
scummvm-rg350-8b2d85f8e5b30aeb73817894974a4db53588565b.tar.bz2
scummvm-rg350-8b2d85f8e5b30aeb73817894974a4db53588565b.zip
TITANIC: Figured out remainder of CMovieManager
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/movie.cpp5
-rw-r--r--engines/titanic/support/movie.h15
-rw-r--r--engines/titanic/support/movie_manager.cpp2
-rw-r--r--engines/titanic/support/movie_manager.h16
4 files changed, 29 insertions, 9 deletions
diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp
index 869a3518f8..6a79c02a3e 100644
--- a/engines/titanic/support/movie.cpp
+++ b/engines/titanic/support/movie.cpp
@@ -21,6 +21,7 @@
*/
#include "video/avi_decoder.h"
+#include "titanic/sound/sound_manager.h"
#include "titanic/support/movie.h"
#include "titanic/titanic.h"
@@ -144,9 +145,9 @@ const Common::List<CMovieRangeInfo *> OSMovie::getMovieRangeInfo() const {
return Common::List<CMovieRangeInfo *>();
}
-void OSMovie::proc18(int v) {
+void OSMovie::setSoundManager(CSoundManager *soundManager) {
// if (_aviSurface)
-// _aviSurface->_field3C = 0;
+// _aviSurface->_field3C = soundManager;
warning("TODO: OSMovie::proc18");
}
diff --git a/engines/titanic/support/movie.h b/engines/titanic/support/movie.h
index fbbfebc845..7abca6bbc0 100644
--- a/engines/titanic/support/movie.h
+++ b/engines/titanic/support/movie.h
@@ -35,9 +35,10 @@ enum MovieState {
MOVIE_STOPPED = -1, MOVIE_NONE = 0, MOVIE_FINISHED = 1, MOVIE_FRAME = 2
};
-class CVideoSurface;
-class CMovie;
class CGameObject;
+class CMovie;
+class CSoundManager;
+class CVideoSurface;
class CMovieList : public List<CMovie> {
public:
@@ -112,7 +113,10 @@ public:
*/
virtual const Common::List<CMovieRangeInfo *> getMovieRangeInfo() const = 0;
- virtual void proc18(int v) = 0;
+ /**
+ * Set the sound manager reference
+ */
+ virtual void setSoundManager(CSoundManager *soundManager) = 0;
/**
* Get the current movie frame
@@ -189,7 +193,10 @@ public:
*/
virtual const Common::List<CMovieRangeInfo *> getMovieRangeInfo() const;
- virtual void proc18(int v);
+ /**
+ * Set the sound manager reference
+ */
+ virtual void setSoundManager(CSoundManager *soundManager);
/**
* Get the current movie frame
diff --git a/engines/titanic/support/movie_manager.cpp b/engines/titanic/support/movie_manager.cpp
index e3330f0080..bfeb081b5c 100644
--- a/engines/titanic/support/movie_manager.cpp
+++ b/engines/titanic/support/movie_manager.cpp
@@ -28,7 +28,7 @@ namespace Titanic {
CMovie *CMovieManager::createMovie(const CResourceKey &key, CVideoSurface *surface) {
CMovie *movie = new OSMovie(key, surface);
- movie->proc18(_field4);
+ movie->setSoundManager(_soundManager);
return movie;
}
diff --git a/engines/titanic/support/movie_manager.h b/engines/titanic/support/movie_manager.h
index 91ea75e49b..2920d909b7 100644
--- a/engines/titanic/support/movie_manager.h
+++ b/engines/titanic/support/movie_manager.h
@@ -25,6 +25,7 @@
#include "titanic/core/list.h"
#include "titanic/core/resource_key.h"
+#include "titanic/sound/sound_manager.h"
namespace Titanic {
@@ -35,17 +36,28 @@ class CMovieManagerBase {
public:
virtual ~CMovieManagerBase() {}
+ /**
+ * Create a new movie and return it
+ */
virtual CMovie *createMovie(const CResourceKey &key, CVideoSurface *surface) = 0;
};
class CMovieManager : public CMovieManagerBase {
private:
- int _field4;
+ CSoundManager *_soundManager;
public:
- CMovieManager() : CMovieManagerBase(), _field4(0) {}
+ CMovieManager() : CMovieManagerBase(), _soundManager(nullptr) {}
virtual ~CMovieManager() {}
+ /**
+ * Create a new movie and return it
+ */
virtual CMovie *createMovie(const CResourceKey &key, CVideoSurface *surface);
+
+ /**
+ * Sets the sound manager that will be attached to all created movies
+ */
+ void setSoundManager(CSoundManager *soundManager) { _soundManager = soundManager; }
};
} // End of namespace Titanic