diff options
author | Joost Peters | 2004-03-09 01:48:12 +0000 |
---|---|---|
committer | Joost Peters | 2004-03-09 01:48:12 +0000 |
commit | 99d57c2d9f3aaf627cbe6b4434a17b1755ca4873 (patch) | |
tree | e2f7f6133ee0017ff8871c994cde03cb6e2c61ae /queen/music.cpp | |
parent | 1020f97ceab9f1a606abf0bf6a0160b4136fab46 (diff) | |
download | scummvm-rg350-99d57c2d9f3aaf627cbe6b4434a17b1755ca4873.tar.gz scummvm-rg350-99d57c2d9f3aaf627cbe6b4434a17b1755ca4873.tar.bz2 scummvm-rg350-99d57c2d9f3aaf627cbe6b4434a17b1755ca4873.zip |
Respond to volume-altering songs
svn-id: r13225
Diffstat (limited to 'queen/music.cpp')
-rw-r--r-- | queen/music.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/queen/music.cpp b/queen/music.cpp index f9512318c3..b8e86f7543 100644 --- a/queen/music.cpp +++ b/queen/music.cpp @@ -318,7 +318,7 @@ static const byte mt32_to_gm[128] = { return (_musicDataSize - songOffset(songNum)); } - Music::Music(MidiDriver *driver, QueenEngine *vm) { + Music::Music(MidiDriver *driver, QueenEngine *vm) : _vToggle(false) { if (vm->resource()->isDemo()) { _musicData = vm->resource()->loadFile("AQ8.RL", 0, NULL); _musicDataSize = vm->resource()->fileSize("AQ8.RL"); @@ -341,4 +341,9 @@ static const byte mt32_to_gm[128] = { _player->playMusic(); } + void Music::toggleVChange() { + setVolume(_vToggle ? (volume() * 2) : (volume() / 2)); + _vToggle ^= true; + } + } // End of namespace Queen |