aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-09-26 12:29:10 +0000
committerMax Horn2002-09-26 12:29:10 +0000
commit09f56dc233324a7611554912c5483e20e0684104 (patch)
treec54941c8ae082b684b631b57a1a29db4cfe1d70a /scumm
parent58e5e0069f82c9319fd9c6f6987f98886c3b9f67 (diff)
downloadscummvm-rg350-09f56dc233324a7611554912c5483e20e0684104.tar.gz
scummvm-rg350-09f56dc233324a7611554912c5483e20e0684104.tar.bz2
scummvm-rg350-09f56dc233324a7611554912c5483e20e0684104.zip
some fixes for the message dialog; added some comments
svn-id: r5021
Diffstat (limited to 'scumm')
-rw-r--r--scumm/dialogs.cpp13
-rw-r--r--scumm/scummvm.cpp12
-rw-r--r--scumm/sound.cpp6
3 files changed, 18 insertions, 13 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp
index a9080737dc..d1b681f891 100644
--- a/scumm/dialogs.cpp
+++ b/scumm/dialogs.cpp
@@ -30,11 +30,16 @@
#include "common/config-file.h"
+
#ifdef _MSC_VER
+
# pragma warning( disable : 4068 )
+
#endif
+
+
struct ResString {
int num;
char string[80];
@@ -423,10 +428,10 @@ void SoundDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
_scumm->_mixer->setVolume(_soundVolumeSfx);
_scumm->_mixer->setMusicVolume(_soundVolumeMusic);
- scummcfg->setInt("master_volume", _soundVolumeMaster);
- scummcfg->setInt("music_volume", _soundVolumeMusic);
- scummcfg->setInt("sfx_volume", _soundVolumeSfx);
- scummcfg->flush();
+ g_config->setInt("master_volume", _soundVolumeMaster);
+ g_config->setInt("music_volume", _soundVolumeMusic);
+ g_config->setInt("sfx_volume", _soundVolumeSfx);
+ g_config->flush();
}
case kCancelCmd:
close();
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index cc5fdde180..a218ddeb43 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -45,6 +45,7 @@ extern void GraphicsOff(void);
// Use g_scumm from error() ONLY
Scumm *g_scumm = 0;
+extern NewGui *g_gui;
void autosave(void * engine)
{
@@ -104,7 +105,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
_gui = new Gui();
_gui->init(this);
- _newgui = new NewGui(_system);
+ _newgui = g_gui;
_bundle = new Bundle();
_sound = new Sound(this);
_timer = Engine::_timer;
@@ -165,7 +166,6 @@ Scumm::~Scumm ()
delete _saveLoadDialog;
delete _gui;
- delete _newgui;
delete _bundle;
delete _sound;
@@ -938,14 +938,14 @@ void Scumm::runDialog(Dialog *dialog)
void Scumm::pauseDialog()
{
if (!_pauseDialog) {
-#if 1
+#if 0
// HACK HACK
const char *message = "This demonstrates MessageDialog's abilities.\n"
"For example it supports multi line text.\n"
- " \n"
+ "\n"
"Well, not much more right now, really :-)\n"
- "And there are still some bugs in it, too\n"
- " "; // <- FIXME: This is needed due to a bug...
+ "And there are still some bugs in it, too\n";
+ // <- FIXME: This is needed due to a bug...
_pauseDialog = new MessageDialog(_newgui, message);
#else
_pauseDialog = new PauseDialog(_newgui, this);
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 82a956f170..f4e506c975 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -650,9 +650,9 @@ void Sound::setupSound() {
if (_scumm->_imuse) {
_scumm->_imuse->setBase(_scumm->res.address[rtSound]);
- _sound_volume_music = scummcfg->getInt("music_volume", kDefaultMusicVolume);
- _sound_volume_master = scummcfg->getInt("master_volume", kDefaultMasterVolume);
- _sound_volume_sfx = scummcfg->getInt("sfx_volume", kDefaultSFXVolume);
+ _sound_volume_music = g_config->getInt("music_volume", kDefaultMusicVolume);
+ _sound_volume_master = g_config->getInt("master_volume", kDefaultMasterVolume);
+ _sound_volume_sfx = g_config->getInt("sfx_volume", kDefaultSFXVolume);
_scumm->_imuse->set_master_volume(_sound_volume_master);
_scumm->_imuse->set_music_volume(_sound_volume_music);