aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-03-06 00:00:38 +0000
committerJames Brown2002-03-06 00:00:38 +0000
commite05f3534b40fce5b5f7063631913134cc77ab422 (patch)
tree60b61e9741687341b3055e5c87af4a2683dd2869
parentc21e9da1b6c46f145f8061ca77dd5b9b9627e782 (diff)
downloadscummvm-rg350-e05f3534b40fce5b5f7063631913134cc77ab422.tar.gz
scummvm-rg350-e05f3534b40fce5b5f7063631913134cc77ab422.tar.bz2
scummvm-rg350-e05f3534b40fce5b5f7063631913134cc77ab422.zip
Fix typo in music volume, and add -m parameter to set it.
svn-id: r3659
-rw-r--r--readme.txt3
-rw-r--r--scummvm.cpp14
-rw-r--r--sound/imuse.cpp6
3 files changed, 16 insertions, 7 deletions
diff --git a/readme.txt b/readme.txt
index e251e722d4..175eda1ac4 100644
--- a/readme.txt
+++ b/readme.txt
@@ -85,7 +85,8 @@ Command Line Options:
-p <path> - path to where the game is installed
-b<num> - start in that room
- -t<num> - Set music tempo. Suggested: 1F0000
+ -m<num> - set the music volume, 0-100. default is '60'.
+ -t<num> - set music tempo. default: 2031616
-f - fullscreen mode
In game Keys:
diff --git a/scummvm.cpp b/scummvm.cpp
index 94566f16c1..dc78adc1d7 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -23,6 +23,7 @@
#include "scumm.h"
#include "gui.h"
#include "string.h"
+#include "sound.h"
void Scumm::initRandSeeds() {
_randSeed1 = 0xA943DE35;
@@ -195,7 +196,7 @@ void Scumm::scummMain(int argc, char **argv) {
_minHeapThreshold = 400000;
_gameDataPath = NULL;
- _gameTempo = 0;
+ _gameTempo = 0;
parseCommandLine(argc, argv);
@@ -423,15 +424,22 @@ void Scumm::parseCommandLine(int argc, char **argv) {
case 't':
_gameTempo = atoi(s+1);
goto NextArg;
+ case 'm': {
+ SoundEngine *se = (SoundEngine*)_soundEngine;
+ if (se)
+ se->set_music_volume(atoi(s+1));
+ goto NextArg;
+ }
default:
ShowHelpAndExit:;
printf(
"ScummVM - Scumm Interpreter\n"
"Syntax:\n"
- "\tscummvm [-b<num>] [-p path] game\n"
+ "\tscummvm [-b<num>] [-p path] [-f] [-m<num>] [-t<num>] game\n"
"Flags:\n"
+ "\tm<num> - Set music volume (0-100)\n"
+ "\tt<num> - Set music tempo (Default: 2031616)\n"
"\tb<num> - start in that room\n"
- "\tt<num> - Set music tempo. Suggested: 1F0000\n"
"\tf - fullscreen mode\n");
exit(1);
}
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index 1f48db9982..8c3a4a5d9a 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -627,9 +627,9 @@ int SoundEngine::set_music_volume(uint vol) {
if (vol > 100)
vol = 100;
- if (vol < 1);
+ if (vol < 1)
vol = 1;
-
+
_music_volume = vol;
return 0;
}
@@ -923,7 +923,7 @@ int SoundEngine::initialize(Scumm *scumm, SoundDriver *driver) {
_driver = (SOUND_DRIVER_TYPE*)driver;
_master_volume = 127;
- _music_volume = 60;
+ if (_music_volume < 1) _music_volume = 60;
for (i=0; i!=8; i++)
_channel_volume[i] = _channel_volume_eff[i] = _volchan_table[i] = 127;