aboutsummaryrefslogtreecommitdiff
path: root/engines/made
diff options
context:
space:
mode:
authorFilippos Karapetis2008-04-24 13:12:08 +0000
committerFilippos Karapetis2008-04-24 13:12:08 +0000
commit68c511423e529d240c4d014b165924eeca6ec1b9 (patch)
tree568f5d42218c4256797f16b03c8a365eb67235de /engines/made
parentffc1e56cbd6dc4c9b09f5a23869ecbb5360a667b (diff)
downloadscummvm-rg350-68c511423e529d240c4d014b165924eeca6ec1b9.tar.gz
scummvm-rg350-68c511423e529d240c4d014b165924eeca6ec1b9.tar.bz2
scummvm-rg350-68c511423e529d240c4d014b165924eeca6ec1b9.zip
Cleanup
svn-id: r31686
Diffstat (limited to 'engines/made')
-rw-r--r--engines/made/music.cpp21
-rw-r--r--engines/made/music.h4
2 files changed, 6 insertions, 19 deletions
diff --git a/engines/made/music.cpp b/engines/made/music.cpp
index 8394e78b24..ec9b59c12e 100644
--- a/engines/made/music.cpp
+++ b/engines/made/music.cpp
@@ -173,19 +173,12 @@ Music::~Music() {
delete[] _midiMusicData;
}
-void Music::setVolume(int volume, int time) {
- _targetVolume = volume * 2; // ScummVM has different volume scale
- _currentVolumePercent = 0;
-
+void Music::setVolume(int volume) {
if (volume == -1) // Set Full volume
volume = 255;
- if (time == 1) {
- _player->setVolume(volume);
- _currentVolume = volume;
- return;
- }
-
+ _player->setVolume(volume);
+ _currentVolume = volume;
}
bool Music::isPlaying() {
@@ -193,17 +186,13 @@ bool Music::isPlaying() {
}
void Music::play(XmidiResource *midiResource, MusicFlags flags) {
- MidiParser *parser;
+ MidiParser *parser = 0;
byte *resourceData;
size_t resourceSize;
debug(2, "Music::play %d", flags);
- if (!_enabled) {
- return;
- }
-
- if (isPlaying()) {
+ if (!_enabled || isPlaying()) {
return;
}
diff --git a/engines/made/music.h b/engines/made/music.h
index 1403a7c0a1..7ca464bbc0 100644
--- a/engines/made/music.h
+++ b/engines/made/music.h
@@ -121,7 +121,7 @@ public:
void resume(void);
void stop(void);
- void setVolume(int volume, int time = 1);
+ void setVolume(int volume);
int getVolume() { return _currentVolume; }
int32 *_songTable;
@@ -135,9 +135,7 @@ private:
int _enabled;
bool _adlib;
- int _targetVolume;
int _currentVolume;
- int _currentVolumePercent;
MidiParser *xmidiParser;