diff options
author | Paul Gilbert | 2016-08-08 23:19:42 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-08 23:19:42 -0400 |
commit | 5b8fdfe366b9acb2fd1d80cd0839e2af61238f08 (patch) | |
tree | 32960daa44d203e39fbcbbed801fd517040a771a /engines/titanic/sound/enter_view_toggles_other_music.cpp | |
parent | 0b952c3ceded860f2051c77fefb17593dfb5ff05 (diff) | |
download | scummvm-rg350-5b8fdfe366b9acb2fd1d80cd0839e2af61238f08.tar.gz scummvm-rg350-5b8fdfe366b9acb2fd1d80cd0839e2af61238f08.tar.bz2 scummvm-rg350-5b8fdfe366b9acb2fd1d80cd0839e2af61238f08.zip |
TITANIC: Implemented more sound classes
Diffstat (limited to 'engines/titanic/sound/enter_view_toggles_other_music.cpp')
-rw-r--r-- | engines/titanic/sound/enter_view_toggles_other_music.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/engines/titanic/sound/enter_view_toggles_other_music.cpp b/engines/titanic/sound/enter_view_toggles_other_music.cpp index 0b149993a3..2f0091a0a3 100644 --- a/engines/titanic/sound/enter_view_toggles_other_music.cpp +++ b/engines/titanic/sound/enter_view_toggles_other_music.cpp @@ -24,21 +24,37 @@ namespace Titanic { -CEnterViewTogglesOtherMusic::CEnterViewTogglesOtherMusic() : CTriggerAutoMusicPlayer(), _fieldC8(0) { +BEGIN_MESSAGE_MAP(CEnterViewTogglesOtherMusic, CTriggerAutoMusicPlayer) + ON_MESSAGE(EnterViewMsg) +END_MESSAGE_MAP() + +CEnterViewTogglesOtherMusic::CEnterViewTogglesOtherMusic() : + CTriggerAutoMusicPlayer(), _value(2) { } void CEnterViewTogglesOtherMusic::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_fieldC8, indent); + file->writeNumberLine(_value, indent); CTriggerAutoMusicPlayer::save(file, indent); } void CEnterViewTogglesOtherMusic::load(SimpleFile *file) { file->readNumber(); - _fieldC8 = file->readNumber(); + _value = file->readNumber(); CTriggerAutoMusicPlayer::load(file); } +bool CEnterViewTogglesOtherMusic::EnterViewMsg(CEnterViewMsg *msg) { + CViewItem *view = findView(); + if (view == msg->_newView) { + CTriggerAutoMusicPlayerMsg triggerMsg; + triggerMsg._value = _value; + triggerMsg.execute(this); + } + + return true; +} + } // End of namespace Titanic |