aboutsummaryrefslogtreecommitdiff
path: root/gui.cpp
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-08-14 20:43:56 +0000
committerPaweł Kołodziejski2002-08-14 20:43:56 +0000
commit105f966c6a66803653db90a01303cee3a08e5c0d (patch)
treeff6ca43e24badde1ca31cdc3748d14e072716612 /gui.cpp
parentf2faf9063bda1acc1b9efd8bd1e5bc8b4af4a98c (diff)
downloadscummvm-rg350-105f966c6a66803653db90a01303cee3a08e5c0d.tar.gz
scummvm-rg350-105f966c6a66803653db90a01303cee3a08e5c0d.tar.bz2
scummvm-rg350-105f966c6a66803653db90a01303cee3a08e5c0d.zip
moved to Sound class
svn-id: r4744
Diffstat (limited to 'gui.cpp')
-rw-r--r--gui.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/gui.cpp b/gui.cpp
index 7d06cbae9e..d80c6948c8 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -615,18 +615,18 @@ void Gui::handleSoundDialogCommand(int cmd)
if (cmd == 50) {
close();
} else if (cmd == 40) {
- _s->_sound_volume_master = _gui_variables[0]; // Master
- _s->_sound_volume_music = _gui_variables[1]; // Music
- _s->_sound_volume_sfx = _gui_variables[2]; // SFX
-
- _s->_imuse->set_music_volume(_s->_sound_volume_music);
- _s->_imuse->set_master_volume(_s->_sound_volume_master);
- _s->_mixer->set_volume(_s->_sound_volume_sfx);
- _s->_mixer->set_music_volume(_s->_sound_volume_music);
-
- scummcfg->set("master_volume", _s->_sound_volume_master);
- scummcfg->set("music_volume", _s->_sound_volume_music);
- scummcfg->set("sfx_volume", _s->_sound_volume_sfx);
+ _s->_sound->_sound_volume_master = _gui_variables[0]; // Master
+ _s->_sound->_sound_volume_music = _gui_variables[1]; // Music
+ _s->_sound->_sound_volume_sfx = _gui_variables[2]; // SFX
+
+ _s->_imuse->set_music_volume(_s->_sound->_sound_volume_music);
+ _s->_imuse->set_master_volume(_s->_sound->_sound_volume_master);
+ _s->_mixer->set_volume(_s->_sound->_sound_volume_sfx);
+ _s->_mixer->set_music_volume(_s->_sound->_sound_volume_music);
+
+ scummcfg->set("master_volume", _s->_sound->_sound_volume_master);
+ scummcfg->set("music_volume", _s->_sound->_sound_volume_music);
+ scummcfg->set("sfx_volume", _s->_sound->_sound_volume_sfx);
scummcfg->flush();
close();
@@ -650,9 +650,9 @@ void Gui::handleOptionsDialogCommand(int cmd)
switch (cmd) {
case 1:
_widgets[0] = sound_dialog;
- _gui_variables[0] = _s->_sound_volume_master;
- _gui_variables[1] = _s->_sound_volume_music;
- _gui_variables[2] = _s->_sound_volume_sfx;
+ _gui_variables[0] = _s->_sound->_sound_volume_master;
+ _gui_variables[1] = _s->_sound->_sound_volume_music;
+ _gui_variables[2] = _s->_sound->_sound_volume_sfx;
_active = true;
_cur_page = 0;
_dialog = SOUND_DIALOG;
@@ -1052,8 +1052,8 @@ void Gui::loop()
if (_active && !_inited) {
_inited = true;
draw(0, 200); // was 100
- _old_soundsPaused = _s->_soundsPaused;
- _s->pauseSounds(true);
+ _old_soundsPaused = _s->_sound->_soundsPaused;
+ _s->_sound->pauseSounds(true);
// Backup old cursor
memcpy(_old_grabbedCursor, _s->_grabbedCursor, sizeof(_old_grabbedCursor));
@@ -1112,7 +1112,7 @@ void Gui::close()
_s->_system->show_mouse(_old_cursor_mode);
- _s->pauseSounds(_old_soundsPaused);
+ _s->_sound->pauseSounds(_old_soundsPaused);
_active = false;
_inited = false;