aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/wince/findgame.cpp20
-rw-r--r--backends/wince/pocketpc.cpp38
-rw-r--r--common/config-file.h2
-rw-r--r--common/engine.cpp4
-rw-r--r--common/gameDetector.cpp64
-rw-r--r--common/main.cpp30
-rw-r--r--common/str.cpp4
-rw-r--r--common/str.h4
-rw-r--r--gui/gui.cpp8
-rw-r--r--gui/message.cpp20
-rw-r--r--scumm/dialogs.cpp13
-rw-r--r--scumm/scummvm.cpp12
-rw-r--r--scumm/sound.cpp6
13 files changed, 125 insertions, 100 deletions
diff --git a/backends/wince/findgame.cpp b/backends/wince/findgame.cpp
index 3157397d54..a1bc96b7de 100644
--- a/backends/wince/findgame.cpp
+++ b/backends/wince/findgame.cpp
@@ -31,7 +31,7 @@
#include "scumm.h"
#include "config-file.h"
-extern Config *scummcfg;
+extern Config *g_config;
#define MAX_GAMES 20
@@ -211,14 +211,14 @@ bool loadGameSettings() {
prescanning = FALSE;
- current = scummcfg->get("GamesInstalled", "wince");
+ current = g_config->get("GamesInstalled", "wince");
if (!current)
return FALSE;
index = atoi(current);
installedGamesNumber = index;
- current = scummcfg->get("GamesReferences", "wince");
+ current = g_config->get("GamesReferences", "wince");
if (!current)
return FALSE;
for (i=0; i<index; i++) {
@@ -232,7 +232,7 @@ bool loadGameSettings() {
gamesInstalled[i].reference = j;
}
- current = scummcfg->get("BasePath", "wince");
+ current = g_config->get("BasePath", "wince");
if (!current)
return FALSE;
MultiByteToWideChar(CP_ACP, 0, current, strlen(current) + 1, basePath, sizeof(basePath));
@@ -241,7 +241,7 @@ bool loadGameSettings() {
char keyName[100];
sprintf(keyName, "GamesDirectory%d", i);
- current = scummcfg->get(keyName, "wince");
+ current = g_config->get(keyName, "wince");
if (!current)
return FALSE;
MultiByteToWideChar(CP_ACP, 0, current, strlen(current) + 1, gamesInstalled[i].directory, sizeof(gamesInstalled[i].directory));
@@ -416,7 +416,7 @@ void startFindGame() {
// Save the results in the registry
SetDlgItemText(hwndDlg, IDC_FILEPATH, TEXT("Saving the results"));
- scummcfg->set("GamesInstalled", index, "wince");
+ g_config->set("GamesInstalled", index, "wince");
tempo[0] = '\0';
for (i=0; i<index; i++) {
@@ -425,21 +425,21 @@ void startFindGame() {
strcat(tempo, x);
}
- scummcfg->set("GamesReferences", tempo, "wince");
+ g_config->set("GamesReferences", tempo, "wince");
WideCharToMultiByte(CP_ACP, 0, basePath, wcslen(basePath) + 1, workdir, sizeof(workdir), NULL, NULL);
- scummcfg->set("BasePath", workdir, "wince");
+ g_config->set("BasePath", workdir, "wince");
for (i=0; i<index; i++) {
char keyName[100];
sprintf(keyName, "GamesDirectory%d", i);
WideCharToMultiByte(CP_ACP, 0, gamesInstalled[i].directory, wcslen(gamesInstalled[i].directory) + 1, workdir, sizeof(workdir), NULL, NULL);
- scummcfg->set(keyName, workdir, "wince");
+ g_config->set(keyName, workdir, "wince");
}
- scummcfg->flush();
+ g_config->flush();
SetDlgItemText(hwndDlg, IDC_FILEPATH, TEXT("Scan finished"));
diff --git a/backends/wince/pocketpc.cpp b/backends/wince/pocketpc.cpp
index 4d4406a3a6..ba8f273c2a 100644
--- a/backends/wince/pocketpc.cpp
+++ b/backends/wince/pocketpc.cpp
@@ -57,7 +57,7 @@ typedef int (*tTimeCallback)(int);
typedef void SoundProc(void *param, byte *buf, int len);
GameDetector detector;
-Config *scummcfg;
+Config *g_config;
tTimeCallback timer_callback;
int timer_interval;
@@ -283,9 +283,9 @@ extern void own_soundProc(void *buffer, byte *samples, int len);
bool monkey2_keyboard;
void do_quit() {
- scummcfg->set("Sound", sound_activated, "wince");
- scummcfg->set("DisplayMode", GetScreenMode(), "wince");
- scummcfg->flush();
+ g_config->set("Sound", sound_activated, "wince");
+ g_config->set("DisplayMode", GetScreenMode(), "wince");
+ g_config->flush();
GXCloseInput();
GXCloseDisplay();
SDL_AudioQuit();
@@ -402,10 +402,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLin
hide_toolbar = false;
- scummcfg = new Config("scummvm.ini", "scummvm");
- scummcfg->set_writing(true);
+ g_config = new Config("scummvm.ini", "scummvm");
+ g_config->set_writing(true);
- sound = scummcfg->get("Sound", "wince");
+ sound = g_config->get("Sound", "wince");
if (sound)
sound_activated = (atoi(sound) == 1);
else
@@ -881,9 +881,9 @@ void load_key_mapping() {
memset(actions_keys, 0, sizeof(actions_keys));
- version = scummcfg->get("KeysVersion", "wince");
+ version = g_config->get("KeysVersion", "wince");
- current = scummcfg->get("ActionKeys", "wince");
+ current = g_config->get("ActionKeys", "wince");
if (current && version) {
for (i=0; i<NUMBER_ACTIONS; i++) {
char x[6];
@@ -905,7 +905,7 @@ void load_key_mapping() {
actions[3] = ACTION_SKIP;
actions[4] = ACTION_HIDE;
- current = scummcfg->get("ActionTypes", "wince");
+ current = g_config->get("ActionTypes", "wince");
if (current && version) {
for (i=0; i<NUMBER_ACTIONS; i++) {
char x[6];
@@ -920,8 +920,8 @@ void load_key_mapping() {
setActionTypes(actions);
if (!version) {
- scummcfg->set("KeysVersion", "2", "wince");
- scummcfg->flush();
+ g_config->set("KeysVersion", "2", "wince");
+ g_config->flush();
}
}
@@ -938,7 +938,7 @@ void save_key_mapping() {
sprintf(x, "%.4x ", work_keys[i]);
strcat(tempo, x);
}
- scummcfg->set("ActionKeys", tempo, "wince");
+ g_config->set("ActionKeys", tempo, "wince");
tempo[0] = '\0';
work = getActionTypes();
for (i=0; i<NUMBER_ACTIONS; i++) {
@@ -946,9 +946,9 @@ void save_key_mapping() {
sprintf(x, "%.2x ", work[i]);
strcat(tempo, x);
}
- scummcfg->set("ActionTypes", tempo, "wince");
+ g_config->set("ActionTypes", tempo, "wince");
- scummcfg->flush();
+ g_config->flush();
}
/*************** Hardware keys support ***********/
@@ -1001,9 +1001,9 @@ void action_quit() {
void action_boss() {
SHELLEXECUTEINFO se;
- scummcfg->set("Sound", sound_activated, "wince");
- scummcfg->set("DisplayMode", GetScreenMode(), "wince");
- scummcfg->flush();
+ g_config->set("Sound", sound_activated, "wince");
+ g_config->set("DisplayMode", GetScreenMode(), "wince");
+ g_config->flush();
sound_activated = false;
toolbar_drawn = false;
hide_toolbar = true;
@@ -1159,7 +1159,7 @@ OSystem *OSystem_WINCE3::create(int gfx_mode, bool full_screen) {
drawWait();
// Set mode, portrait or landscape
- display_mode = scummcfg->get("DisplayMode", "wince");
+ display_mode = g_config->get("DisplayMode", "wince");
if (display_mode)
SetScreenMode(atoi(display_mode));
diff --git a/common/config-file.h b/common/config-file.h
index 594b4814c0..a4215116e3 100644
--- a/common/config-file.h
+++ b/common/config-file.h
@@ -60,6 +60,6 @@ protected:
};
// The global config object
-extern Config *scummcfg;
+extern Config *g_config;
#endif
diff --git a/common/engine.cpp b/common/engine.cpp
index 5352fd025c..0d4a0339af 100644
--- a/common/engine.cpp
+++ b/common/engine.cpp
@@ -63,11 +63,11 @@ const char *Engine::getSavePath() const
// If SCUMMVM_SAVEPATH was not specified, try to use game specific savepath from config
if (!dir || dir[0] == 0)
- dir = scummcfg->get("savepath");
+ dir = g_config->get("savepath");
// If SCUMMVM_SAVEPATH was not specified, try to use general path from config
if (!dir || dir[0] == 0)
- dir = scummcfg->get("savepath", "scummvm");
+ dir = g_config->get("savepath", "scummvm");
// If no save path was specified, use no directory prefix
if (dir == NULL)
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp
index 8f30cfe695..5e402eee7a 100644
--- a/common/gameDetector.cpp
+++ b/common/gameDetector.cpp
@@ -74,42 +74,42 @@ void GameDetector::updateconfig()
{
const char * val;
- _amiga = scummcfg->getBool("amiga", _amiga);
+ _amiga = g_config->getBool("amiga", _amiga);
- _save_slot = scummcfg->getInt("save_slot", _save_slot);
+ _save_slot = g_config->getInt("save_slot", _save_slot);
- _cdrom = scummcfg->getInt("cdrom", _cdrom);
+ _cdrom = g_config->getInt("cdrom", _cdrom);
- if ((val = scummcfg->get("music_driver")))
+ if ((val = g_config->get("music_driver")))
if (!parseMusicDriver(val)) {
printf("Error in the config file: invalid music_driver.\n");
printf(USAGE_STRING);
exit(-1);
}
- _fullScreen = scummcfg->getBool("fullscreen", _fullScreen);
+ _fullScreen = g_config->getBool("fullscreen", _fullScreen);
- if ((val = scummcfg->get("gfx_mode")))
+ if ((val = g_config->get("gfx_mode")))
if ((_gfx_mode = parseGraphicsMode(val)) == -1) {
printf("Error in the config file: invalid gfx_mode.\n");
printf(USAGE_STRING);
exit(-1);
}
- _music_volume = scummcfg->getInt("music_volume", _music_volume);
+ _music_volume = g_config->getInt("music_volume", _music_volume);
- _noSubtitles = scummcfg->getBool("nosubtitles", _noSubtitles ? true : false);
+ _noSubtitles = g_config->getBool("nosubtitles", _noSubtitles ? true : false);
- if ((val = scummcfg->get("path")))
+ if ((val = g_config->get("path")))
_gameDataPath = strdup(val);
- _sfx_volume = scummcfg->getInt("sfx_volume", _sfx_volume);
+ _sfx_volume = g_config->getInt("sfx_volume", _sfx_volume);
// We use strtol for the tempo to allow it to be specified in hex.
- if ((val = scummcfg->get("tempo")))
+ if ((val = g_config->get("tempo")))
_gameTempo = strtol(val, NULL, 0);
- _talkSpeed = scummcfg->getInt("talkspeed", _talkSpeed);
+ _talkSpeed = g_config->getInt("talkspeed", _talkSpeed);
}
void GameDetector::parseCommandLine(int argc, char **argv)
@@ -127,7 +127,7 @@ void GameDetector::parseCommandLine(int argc, char **argv)
//exit(1);
}
- scummcfg->set_domain("game-specific");
+ g_config->set_domain("game-specific");
/* Parse the arguments */
for (i = argc - 1; i >= 1; i--) {
s = argv[i];
@@ -139,7 +139,7 @@ void GameDetector::parseCommandLine(int argc, char **argv)
case 'a':
CHECK_OPTION();
_amiga = (c == 'a');
- scummcfg->setBool("amiga", _amiga);
+ g_config->setBool("amiga", _amiga);
break;
case 'b':
HANDLE_OPTION();
@@ -148,7 +148,7 @@ void GameDetector::parseCommandLine(int argc, char **argv)
case 'c':
HANDLE_OPTION();
_cdrom = atoi(option);
- scummcfg->setInt("cdrom", _cdrom);
+ g_config->setInt("cdrom", _cdrom);
break;
case 'd':
_debugMode = true;
@@ -161,25 +161,25 @@ void GameDetector::parseCommandLine(int argc, char **argv)
HANDLE_OPTION();
if (!parseMusicDriver(option))
goto ShowHelpAndExit;
- scummcfg->set("music_driver", option);
+ g_config->set("music_driver", option);
break;
case 'f':
CHECK_OPTION();
_fullScreen = (c == 'f');
- scummcfg->setBool("fullscreen", _fullScreen, "scummvm");
+ g_config->setBool("fullscreen", _fullScreen, "scummvm");
break;
case 'g':
HANDLE_OPTION();
_gfx_mode = parseGraphicsMode(option);
if (_gfx_mode == -1)
goto ShowHelpAndExit;
- scummcfg->set("gfx_mode", option, "scummvm");
+ g_config->set("gfx_mode", option, "scummvm");
break;
case 'l':
HANDLE_OPTION();
{
Config * newconfig = new Config(option, "scummvm");
- scummcfg->merge_config(*newconfig);
+ g_config->merge_config(*newconfig);
delete newconfig;
updateconfig();
break;
@@ -188,17 +188,17 @@ void GameDetector::parseCommandLine(int argc, char **argv)
case 'm':
HANDLE_OPTION();
_music_volume = atoi(option);
- scummcfg->setInt("music_volume", _music_volume);
+ g_config->setInt("music_volume", _music_volume);
break;
case 'n':
CHECK_OPTION();
_noSubtitles = (c == 'n');
- scummcfg->setBool("nosubtitles", _noSubtitles ? true : false);
+ g_config->setBool("nosubtitles", _noSubtitles ? true : false);
break;
case 'p':
HANDLE_OPTION();
_gameDataPath = option;
- scummcfg->set("path", _gameDataPath);
+ g_config->set("path", _gameDataPath);
break;
case 'r':
HANDLE_OPTION();
@@ -207,12 +207,12 @@ void GameDetector::parseCommandLine(int argc, char **argv)
case 's':
HANDLE_OPTION();
_sfx_volume = atoi(option);
- scummcfg->setInt("sfx_volume", _sfx_volume);
+ g_config->setInt("sfx_volume", _sfx_volume);
break;
case 't':
HANDLE_OPTION();
_gameTempo = strtol(option, 0, 0);
- scummcfg->set("tempo", option);
+ g_config->set("tempo", option);
break;
case 'v':
CHECK_OPTION();
@@ -224,23 +224,23 @@ void GameDetector::parseCommandLine(int argc, char **argv)
exit(1);
case 'w':
_saveconfig = true;
- scummcfg->set_writing(true);
+ g_config->set_writing(true);
HANDLE_OPT_OPTION();
if (option != NULL)
- scummcfg->set_filename(option);
+ g_config->set_filename(option);
break;
case 'x':
_save_slot = 0;
HANDLE_OPT_OPTION();
if (option != NULL) {
_save_slot = atoi(option);
- scummcfg->setInt("save_slot", _save_slot);
+ g_config->setInt("save_slot", _save_slot);
}
break;
case 'y':
HANDLE_OPTION();
_talkSpeed = atoi(option);
- scummcfg->setInt("talkspeed", _talkSpeed);
+ g_config->setInt("talkspeed", _talkSpeed);
break;
default:
goto ShowHelpAndExit;
@@ -248,9 +248,9 @@ void GameDetector::parseCommandLine(int argc, char **argv)
} else {
if (i == (argc - 1)) {
_exe_name = s;
- scummcfg->set_domain(s);
- scummcfg->rename_domain("game-specific");
- scummcfg->rename_domain(s);
+ g_config->set_domain(s);
+ g_config->rename_domain("game-specific");
+ g_config->rename_domain(s);
updateconfig();
} else {
if (current_option == NULL)
@@ -262,7 +262,7 @@ void GameDetector::parseCommandLine(int argc, char **argv)
}
if (_exe_name)
- scummcfg->flush();
+ g_config->flush();
return;
diff --git a/common/main.cpp b/common/main.cpp
index f4c319accc..a8a3449928 100644
--- a/common/main.cpp
+++ b/common/main.cpp
@@ -22,13 +22,15 @@
#include "stdafx.h"
#include "engine.h"
-#include "sound/mididrv.h"
#include "gameDetector.h"
#include "config-file.h"
+#include "gui/newgui.h"
+#include "gui/message.h"
GameDetector detector;
-Config *scummcfg = 0;
+Config *g_config = 0;
+NewGui *g_gui = 0;
#if defined(QTOPIA)
@@ -122,8 +124,8 @@ int main(int argc, char *argv[])
#endif
// Read the config file
- scummcfg = new Config(scummhome, "scummvm");
- scummcfg->set("versioninfo", SCUMMVM_VERSION);
+ g_config = new Config(scummhome, "scummvm");
+ g_config->set("versioninfo", SCUMMVM_VERSION);
// Parse the command line information
result = detector.detectMain(argc, argv);
@@ -145,6 +147,23 @@ int main(int argc, char *argv[])
prop.caption = (char *)detector.getGameName();
system->property(OSystem::PROP_SET_WINDOW_CAPTION, &prop);
+ // Create the GUI manager
+ // TODO - move this up for the launcher dialog?
+ g_gui = new NewGui(system);
+
+#if 0
+ // FIXME - we need to be able to do an init_size() call on the system object here
+ // so that we can display stuff. But right now, init_size() can't safely be called
+ // multiple times (at least not for the SDL backend). So either we have to modify
+ // all the backends to allow for this, or come up with some other solution.
+ const char *message = "This dialog is shown before the Engine is even created!\n"
+ "Wow! Ain't e cool?\n";
+ Dialog *dlg = new MessageDialog(g_gui, message);
+ dlg->open();
+ g_gui->runLoop();
+ delete dlg;
+#endif
+
// Create the game engine
Engine *engine = Engine::createFromDetector(&detector, system);
@@ -153,7 +172,8 @@ int main(int argc, char *argv[])
// Free up memory
delete engine;
- delete scummcfg;
+ delete g_gui;
+ delete g_config;
// ...and quit (the return 0 should never be reached)
system->quit();
diff --git a/common/str.cpp b/common/str.cpp
index 6a2333d39c..874b99938e 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -35,8 +35,8 @@ namespace ScummVM {
String::String(const char *str, int len)
{
_refCount = new int(1);
- if (str) {
- if (len)
+ if (str && len != 0) {
+ if (len > 0)
_capacity = _len = len;
else
_capacity = _len = resStrLen(str);
diff --git a/common/str.h b/common/str.h
index 3776ab64c3..c7c533d952 100644
--- a/common/str.h
+++ b/common/str.h
@@ -46,7 +46,7 @@ protected:
public:
ConstString() : _str(0), _len(0) {}
- ConstString(const char *str, int len = 0) : _str((char*)str) { _len = str ? (len ? len : strlen(str)) : 0; }
+ ConstString(const char *str, int len = -1) : _str((char*)str) { _len = str ? (len >= 0 ? len : strlen(str)) : 0; }
virtual ~ConstString() {}
bool operator ==(const ConstString& x) const;
@@ -77,7 +77,7 @@ protected:
public:
String() : _capacity(0) { _refCount = new int(1); }
- String(const char *str, int len = 0);
+ String(const char *str, int len = -1);
String(const ConstString &str);
String(const String &str);
virtual ~String();
diff --git a/gui/gui.cpp b/gui/gui.cpp
index c26a522693..94e36b2e3d 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -596,10 +596,10 @@ void Gui::handleSoundDialogCommand(int cmd)
_s->_mixer->setVolume(_s->_sound->_sound_volume_sfx);
_s->_mixer->setMusicVolume(_s->_sound->_sound_volume_music);
- scummcfg->setInt("master_volume", _s->_sound->_sound_volume_master);
- scummcfg->setInt("music_volume", _s->_sound->_sound_volume_music);
- scummcfg->setInt("sfx_volume", _s->_sound->_sound_volume_sfx);
- scummcfg->flush();
+ g_config->setInt("master_volume", _s->_sound->_sound_volume_master);
+ g_config->setInt("music_volume", _s->_sound->_sound_volume_music);
+ g_config->setInt("sfx_volume", _s->_sound->_sound_volume_sfx);
+ g_config->flush();
close();
} else {
diff --git a/gui/message.cpp b/gui/message.cpp
index 351b120797..a2b890785c 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -43,24 +43,24 @@ MessageDialog::MessageDialog(NewGui *gui, const String &message)
tmp = String(start, str - start);
lines.push_back(tmp);
lineWidth = _gui->getStringWidth(tmp);
- if (maxlineWidth < lineWidth)
+ if (maxlineWidth < lineWidth)
maxlineWidth = lineWidth;
start = str + 1;
}
++str;
}
- if (*start) {
- tmp = String(start, str - start);
- lines.push_back(tmp);
- lineWidth = _gui->getStringWidth(tmp);
- if (maxlineWidth < lineWidth)
- maxlineWidth = lineWidth;
- }
+
+ // Add in the last line
+ tmp = String(start, str - start);
+ lines.push_back(tmp);
+ lineWidth = _gui->getStringWidth(tmp);
+ if (maxlineWidth < lineWidth)
+ maxlineWidth = lineWidth;
// TODO - we should probably check for over/underflows here
_w = maxlineWidth + 20;
- _h = lines.size() * kLineHeight + 30;
+ _h = lines.size() * kLineHeight + 34;
_x = (320 - _w) / 2;
for (int i = 0; i < lines.size(); i++) {
@@ -69,5 +69,5 @@ MessageDialog::MessageDialog(NewGui *gui, const String &message)
}
// FIXME - the vertical position has to be adjusted
- addButton((_w - 54)/2, _h - 20, 54, 16, "OK", kCloseCmd, '\n'); // Confirm dialog
+ addButton((_w - 54)/2, _h - 24, 54, 16, "OK", kCloseCmd, '\n'); // Confirm dialog
}
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);