diff options
Diffstat (limited to 'engines/titanic/core')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 3 | ||||
-rw-r--r-- | engines/titanic/core/tree_item.cpp | 7 | ||||
-rw-r--r-- | engines/titanic/core/tree_item.h | 5 |
4 files changed, 19 insertions, 0 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index e0ca5ff6b9..362dbfe0c8 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -445,6 +445,10 @@ int CGameObject::getSurface45() const { return _surface ? _surface->proc45() : 0; } +void CGameObject::sound8(bool flag) const { + getGameManager()->_sound.managerProc8(flag ? 3 : 0); +} + bool CGameObject::playSound(const CString &name, int val2, int val3, int val4) { CProximity prox; prox._field8 = val2; diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 3848222436..653230a74f 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -254,6 +254,7 @@ public: int getMovie19() const; int getSurface45() const; + void sound8(bool flag) const; /** * Loads a frame @@ -279,6 +280,8 @@ public: * Sets whether the object is visible */ void setVisible(bool val); + + }; } // End of namespace Titanic diff --git a/engines/titanic/core/tree_item.cpp b/engines/titanic/core/tree_item.cpp index 03bf0e764e..abd6f6c51b 100644 --- a/engines/titanic/core/tree_item.cpp +++ b/engines/titanic/core/tree_item.cpp @@ -201,6 +201,13 @@ void CTreeItem::addSibling(CTreeItem *item) { item->_nextSibling = this; } +void CTreeItem::moveUnder(CTreeItem *newParent) { + if (newParent) { + detach(); + addUnder(newParent); + } +} + void CTreeItem::destroyAll() { destroyOthers(); detach(); diff --git a/engines/titanic/core/tree_item.h b/engines/titanic/core/tree_item.h index 2f4ebc39f1..151addee2e 100644 --- a/engines/titanic/core/tree_item.h +++ b/engines/titanic/core/tree_item.h @@ -215,6 +215,11 @@ public: void addSibling(CTreeItem *item); /** + * Moves the tree item to be under another parent + */ + void moveUnder(CTreeItem *newParent); + + /** * Destroys both the item as well as any of it's children */ void destroyAll(); |