diff options
author | Paul Gilbert | 2016-08-07 19:04:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-07 19:04:28 -0400 |
commit | 8b6ac03f18c69a519f1fdcd9bb49920bcfe78012 (patch) | |
tree | 6aa7f58317530b6a16464029e09282a1dd412b38 /engines/titanic/core | |
parent | 0b244412e302bf5366327ac3ce4ee265b053a9da (diff) | |
download | scummvm-rg350-8b6ac03f18c69a519f1fdcd9bb49920bcfe78012.tar.gz scummvm-rg350-8b6ac03f18c69a519f1fdcd9bb49920bcfe78012.tar.bz2 scummvm-rg350-8b6ac03f18c69a519f1fdcd9bb49920bcfe78012.zip |
TITANIC: Start of music player class
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 | 2 | ||||
-rw-r--r-- | engines/titanic/core/view_item.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 89e3ded248..897eab88f4 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -460,7 +460,7 @@ void CGameObject::playGlobalSound(const CString &resName, int mode, bool initial uint volume = initialMute ? 0 : newVolume; CProximity prox; - prox._channelVolume = newVolume; + prox._channelVolume = volume; prox._repeated = repeated; switch (handleIndex) { @@ -1397,6 +1397,8 @@ int CGameObject::getNewRandomNumber(int max, int *oldVal) { int startingVal = *oldVal; while (*oldVal == startingVal && max > 0) *oldVal = g_vm->getRandomNumber(max); + + return *oldVal; } else { return g_vm->getRandomNumber(max); } diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 665fc6cf37..e446cc3251 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -250,7 +250,7 @@ protected: /** * Adds a timer */ - int addTimer(uint firstDuration, uint repeatDuration); + int addTimer(uint firstDuration, uint repeatDuration = 0); /** * Stops a timer diff --git a/engines/titanic/core/view_item.h b/engines/titanic/core/view_item.h index d653c3a4f3..ceb8a020da 100644 --- a/engines/titanic/core/view_item.h +++ b/engines/titanic/core/view_item.h @@ -56,10 +56,10 @@ private: protected: int _field24; CResourceKey _resourceKey; - double _angle; Point _viewPos; public: int _viewNumber; + double _angle; public: CLASSDEF; CViewItem(); |