diff options
author | Robert Göffringmann | 2003-07-09 18:12:58 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-07-09 18:12:58 +0000 |
commit | 5f9845b2cb3f3bbe2ac5eccc919139114a9edd3a (patch) | |
tree | eb28562e1f99c5c5b3a9f908da376330e7b770c7 /sky/control.cpp | |
parent | 2c065bcffebed70b3e7e30b31b6dd22c1f441abc (diff) | |
download | scummvm-rg350-5f9845b2cb3f3bbe2ac5eccc919139114a9edd3a.tar.gz scummvm-rg350-5f9845b2cb3f3bbe2ac5eccc919139114a9edd3a.tar.bz2 scummvm-rg350-5f9845b2cb3f3bbe2ac5eccc919139114a9edd3a.zip |
added toggling music on/off
svn-id: r8884
Diffstat (limited to 'sky/control.cpp')
-rw-r--r-- | sky/control.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sky/control.cpp b/sky/control.cpp index 6c8758355a..cf721989d2 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -556,7 +556,9 @@ uint16 SkyControl::handleClick(SkyConResource *pButton) { return toggleFx(pButton); case TOGGLE_MS: - return 0; + animClick(pButton); + toggleMusic(); + return TOGGLED; case TOGGLE_TEXT: animClick(pButton); @@ -734,6 +736,19 @@ uint16 SkyControl::toggleText(void) { return TOGGLED; } +void SkyControl::toggleMusic(void) { + + if (SkyState::_systemVars.systemFlags & SF_MUS_OFF) { + SkyState::_systemVars.systemFlags &= ~SF_MUS_OFF; + _skyMusic->startMusic(SkyState::_systemVars.currentMusic); + _statusBar->setToText(0x7000 + 88); + } else { + SkyState::_systemVars.systemFlags |= SF_MUS_OFF; + _skyMusic->startMusic(0); + _statusBar->setToText(0x7000 + 89); + } +} + uint16 SkyControl::shiftDown(uint8 speed) { if (speed == SLOW) { |