diff options
author | Paul Gilbert | 2016-04-10 15:39:20 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:10:51 -0400 |
commit | 91336a86115f600e626c333441aa1369b435ab92 (patch) | |
tree | 78b9b7ebb30f8992c1dc621a6b5cb3e0592f7df7 /engines/titanic/core | |
parent | 8e5f7a9453deff3436fc937292a0ff825acd7454 (diff) | |
download | scummvm-rg350-91336a86115f600e626c333441aa1369b435ab92.tar.gz scummvm-rg350-91336a86115f600e626c333441aa1369b435ab92.tar.bz2 scummvm-rg350-91336a86115f600e626c333441aa1369b435ab92.zip |
TITANIC: Implement playing a range of frames within movie
Diffstat (limited to 'engines/titanic/core')
-rw-r--r-- | engines/titanic/core/background.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/core/game_object.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 17 |
3 files changed, 18 insertions, 15 deletions
diff --git a/engines/titanic/core/background.cpp b/engines/titanic/core/background.cpp index 5859719026..52ff4c4ac2 100644 --- a/engines/titanic/core/background.cpp +++ b/engines/titanic/core/background.cpp @@ -58,9 +58,9 @@ void CBackground::load(SimpleFile *file) { bool CBackground::StatusChangeMsg(CStatusChangeMsg *msg) { setVisible(true); if (_fieldDC) { - fn1(_fieldBC, _fieldC0, 16); + playMovie(_fieldBC, _fieldC0, 16); } else { - fn1(_fieldBC, _fieldC0, 0); + playMovie(_fieldBC, _fieldC0, 0); } return true; } diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 425c2274d7..a798c4db98 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -350,7 +350,7 @@ void CGameObject::petFn3(CTreeItem *item) { pet->fn3(item); } -void CGameObject::fn1(int val1, int val2, int val3) { +void CGameObject::playMovie(uint startFrame, uint endFrame, int val3) { _frameNumber = -1; if (!_surface) { if (!_resource.empty()) @@ -364,30 +364,30 @@ void CGameObject::fn1(int val1, int val2, int val3) { if (movie) movie->_gameObject = this; - _surface->playMovie(val1, val2, val3, val3 != 0); + _surface->playMovie(startFrame, endFrame, val3, val3 != 0); if (val3 & 0x10) getGameManager()->_gameState.addMovie(_surface->_movie); } } -void CGameObject::changeStatus(int newStatus) { +void CGameObject::playMovie(uint flags) { _frameNumber = -1; if (!_surface && !_resource.empty()) { loadResource(_resource); _resource.clear(); } - CVideoSurface *surface = (newStatus & 4) ? _surface : nullptr; + CVideoSurface *surface = (flags & 4) ? _surface : nullptr; if (_surface) { - _surface->playMovie(newStatus, surface); + _surface->playMovie(flags, surface); // TODO: Figure out where to do this legitimately OSMovie *movie = static_cast<OSMovie *>(_surface->_movie); if (movie) movie->_gameObject = this; - if (newStatus & 0x10) { + if (flags & 0x10) { getGameManager()->_gameState.addMovie(_surface->_movie); } } diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 6acaeff00f..ab1833934b 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -178,13 +178,6 @@ public: */ bool checkPoint(const Point &pt, bool ignore40 = false, bool visibleOnly = false); - void fn1(int val1, int val2, int val3); - - /** - * Change the object's status - */ - void changeStatus(int newStatus); - /** * Set the position of the object */ @@ -202,6 +195,16 @@ public: * Loads a frame */ void loadFrame(int frameNumber); + + /** + * Change the object's status + */ + void playMovie(uint flags); + + /** + * Play the movie specified in _resource + */ + void playMovie(uint startFrame, uint endFrame, int val3); }; } // End of namespace Titanic |