diff options
-rw-r--r-- | queen/cutaway.cpp | 2 | ||||
-rw-r--r-- | queen/journal.cpp | 4 | ||||
-rw-r--r-- | queen/logic.cpp | 2 | ||||
-rw-r--r-- | queen/sound.cpp | 2 | ||||
-rw-r--r-- | queen/sound.h | 14 | ||||
-rw-r--r-- | queen/xref.txt | 5 |
6 files changed, 10 insertions, 19 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index ac59792ee4..1b0c760b5b 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -66,7 +66,7 @@ void Cutaway::load(const char *filename) { ptr = _fileData = _vm->resource()->loadFile(filename, 20); if (0 == scumm_stricmp(filename, "comic.cut")) - /* XXX _songBeforeComic = CURRSONG */; + _songBeforeComic = _vm->sound()->lastOverride(); strcpy(_basename, filename); _basename[strlen(_basename)-4] = '\0'; diff --git a/queen/journal.cpp b/queen/journal.cpp index 7c1563d12c..23d23bac29 100644 --- a/queen/journal.cpp +++ b/queen/journal.cpp @@ -255,9 +255,9 @@ void Journal::handleNormalMode(int16 zoneNum, int x) { } else if (zoneNum == ZN_MUSIC_TOGGLE) { _vm->sound()->toggleMusic(); if (_vm->sound()->musicOn()) { - // XXX playsong(lastoverride); + _vm->sound()->playLastSong(); } else { - // XXX playsong(-1); + _vm->music()->stopSong(); } drawConfigPanel(); } else if (zoneNum == ZN_VOICE_TOGGLE) { diff --git a/queen/logic.cpp b/queen/logic.cpp index 8181abe32e..9612520069 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -1363,7 +1363,7 @@ void Logic::setupRestoredGame() { uint16 flag = _vm->bam()->_flag; _vm->bam()->_flag = BamScene::F_STOP; - _vm->sound()->playSong(_vm->sound()->lastOverride()); + _vm->sound()->playLastSong(); switch (gameState(VAR_DRESSING_MODE)) { case 0: diff --git a/queen/sound.cpp b/queen/sound.cpp index 9b2d452b20..af78a852a9 100644 --- a/queen/sound.cpp +++ b/queen/sound.cpp @@ -33,7 +33,7 @@ namespace Queen { Sound::Sound(SoundMixer *mixer, QueenEngine *vm) : - _mixer(mixer), _vm(vm), _sfxToggle(true), _speechToggle(true), _musicToggle(true), _lastOverride(0), _currentSong(0) { + _mixer(mixer), _vm(vm), _sfxToggle(true), _speechToggle(true), _musicToggle(true), _lastOverride(0) { } Sound::~Sound() { diff --git a/queen/sound.h b/queen/sound.h index bbc48b0cea..9b8e9f7f40 100644 --- a/queen/sound.h +++ b/queen/sound.h @@ -58,21 +58,22 @@ public: void playSfx(uint16 sfx, bool isSpeech); void playSfx(const char *base, bool isSpeech); void playSong(int16 songNum); + void playLastSong() { playSong(_lastOverride); } void stopSpeech() { _mixer->stopHandle(_speechHandle); } - bool sfxOn() { return _sfxToggle; } + bool sfxOn() const { return _sfxToggle; } void sfxToggle(bool val) { _sfxToggle = val; } void toggleSfx() { _sfxToggle ^= true; } - bool speechOn() { return _speechToggle; } + bool speechOn() const { return _speechToggle; } void speechToggle(bool val) { _speechToggle = val; } void toggleSpeech() { _speechToggle ^= true; } - bool musicOn() { return _musicToggle; } + bool musicOn() const { return _musicToggle; } void musicToggle(bool val) { _musicToggle = val; } void toggleMusic() { _musicToggle ^= true; } - int16 lastOverride() { return _lastOverride; } + int16 lastOverride() const { return _lastOverride; } void saveState(byte *&ptr); void loadState(uint32 ver, byte *&ptr); @@ -95,11 +96,6 @@ protected: bool _musicToggle; int16 _lastOverride; - int16 _lastMerge; - int16 _altMrgPri; - int16 _currentSong; - int16 _previousSong; - int16 _previousSongNum; PlayingSoundHandle _sfxHandle; PlayingSoundHandle _speechHandle; }; diff --git a/queen/xref.txt b/queen/xref.txt index e58c58814b..0a2fccd194 100644 --- a/queen/xref.txt +++ b/queen/xref.txt @@ -332,11 +332,6 @@ sfxplay() Sound::playSfx() - song[] Sound::_song[] tunelist[] Sound::_tune[] -lastmerge Sound::_lastMerge -altmrgpri Sound::_altMrgPri -oldsn Sound::_previousSongNum -LASTSONG Sound::_previousSong -CURRSONG Sound::_currentSong SFXNAME Sound::_sfxName VOLUME |