diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 18 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 7 | ||||
-rw-r--r-- | engines/titanic/true_talk/true_talk_manager.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/true_talk/true_talk_manager.h | 2 |
4 files changed, 24 insertions, 6 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 1d5c974db5..3406de6902 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -315,16 +315,24 @@ void CGameObject::makeDirty() { makeDirty(_bounds); } -bool CGameObject::soundFn1(int val) { - if (val != 0 && val != -1) { +bool CGameObject::soundFn1(int handle) { + if (handle != 0 && handle != -1) { CGameManager *gameManager = getGameManager(); if (gameManager) - return gameManager->_sound.fn1(val); + return gameManager->_sound.fn1(handle); } return false; } +void CGameObject::soundFn3(int handle, int val2, int val3) { + if (handle != 0 && handle != -1) { + CGameManager *gameManager = getGameManager(); + if (gameManager) + return gameManager->_sound.fn3(handle, val2, val3); + } +} + void CGameObject::setVisible(bool val) { if (val != _visible) { _visible = val; @@ -690,6 +698,10 @@ void CGameObject::incState38() { getGameManager()->_gameState.inc38(); } +void CGameObject::trueTalkFn1(const CString &name, int val2, int val3) { + trueTalkFn1(getRoot()->findByName(name), val2, val3); +} + void CGameObject::trueTalkFn1(CTreeItem *item, int val2, int val3) { CGameManager *gameManager = getGameManager(); if (gameManager) { diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 01fe503005..8a56945d13 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -122,7 +122,6 @@ protected: */ CViewItem * parseView(const CString &viewString); - bool soundFn1(int val); void petFn2(int val); void petFn3(CTreeItem *item); void incState38(); @@ -147,6 +146,10 @@ protected: */ void stopSound(int handle, int val2); + bool soundFn1(int handle); + + void soundFn3(int handle, int val2, int val3); + /** * Adds a timer */ @@ -213,6 +216,8 @@ protected: */ void moveToView(); + void trueTalkFn1(const CString &name, int val2, int val3); + void trueTalkFn1(CTreeItem *item, int val2, int val3); /** diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp index b97b51931c..827cda99ec 100644 --- a/engines/titanic/true_talk/true_talk_manager.cpp +++ b/engines/titanic/true_talk/true_talk_manager.cpp @@ -22,6 +22,7 @@ #include "titanic/true_talk/true_talk_manager.h" #include "titanic/core/tree_item.h" +#include "titanic/game_manager.h" #define MKTAG_BE(a3,a2,a1,a0) ((uint32)((a3) | ((a2) << 8) | ((a1) << 16) | ((a0) << 24))) @@ -191,7 +192,7 @@ void CTrueTalkManager::update2() { //warning("CTrueTalkManager::update2"); } -void CTrueTalkManager::fn1(CTreeItem *item, int val2, int val3) { +void CTrueTalkManager::fn1(CTreeItem *npc, int val2, int val3) { warning("CTrueTalkManager::fn1"); } diff --git a/engines/titanic/true_talk/true_talk_manager.h b/engines/titanic/true_talk/true_talk_manager.h index 9da1c06242..8d2ea65667 100644 --- a/engines/titanic/true_talk/true_talk_manager.h +++ b/engines/titanic/true_talk/true_talk_manager.h @@ -112,7 +112,7 @@ public: void update2(); - void fn1(CTreeItem *item, int val2, int val3); + void fn1(CTreeItem *npc, int val2, int val3); /** * Return a TrueTalk talker/script |