diff options
Diffstat (limited to 'engines/titanic/core/game_object.cpp')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 810e4396cb..a1fde3f74e 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -230,7 +230,13 @@ void CGameObject::loadImage(const CString &name, bool pendingFlag) { } void CGameObject::loadFrame(int frameNumber) { - warning("CGameObject::loadFrame"); + if (frameNumber != -1 && !_resource.empty()) + loadResource(_resource); + + if (_surface) + _surface->setMovieFrame(frameNumber); + + makeDirty(); } void CGameObject::processClipList2() { @@ -247,4 +253,33 @@ void CGameObject::makeDirty() { makeDirty(_bounds); } +bool CGameObject::soundFn1(int val) { + if (val != 0 && val != -1) { + CGameManager *gameManager = getGameManager(); + if (gameManager) + return gameManager->_sound.fn1(val); + } + + return false; +} + +void CGameObject::soundFn2(int val, int val2) { + if (val != 0 && val != -1) { + CGameManager *gameManager = getGameManager(); + if (gameManager) { + if (val2) + gameManager->_sound.fn3(val, 0, val2); + else + gameManager->_sound.fn2(val); + } + } +} + +void CGameObject::set5C(int val) { + if (val != _field5C) { + _field5C = val; + makeDirty(); + } +} + } // End of namespace Titanic |