aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNicola Mettifogo2009-03-17 19:04:59 +0000
committerNicola Mettifogo2009-03-17 19:04:59 +0000
commit3a98786bc0c1e36575702283a293c064df3e9da4 (patch)
treea46f14ee384f4960406e96b73db838fc8c8ef4b2 /engines
parent769184c483eb58029ba10adda89ed5030ef9c960 (diff)
downloadscummvm-rg350-3a98786bc0c1e36575702283a293c064df3e9da4.tar.gz
scummvm-rg350-3a98786bc0c1e36575702283a293c064df3e9da4.tar.bz2
scummvm-rg350-3a98786bc0c1e36575702283a293c064df3e9da4.zip
Removed one of the overloads of SoundMan::execute(), to make retarded compiler happy. Added a couple of explicit casts from bool to int, so that other compiler don't complain instead.
svn-id: r39489
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/parallaction.cpp12
-rw-r--r--engines/parallaction/sound.h13
2 files changed, 11 insertions, 14 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index c6b9f02021..c8b30068dc 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -142,7 +142,7 @@ Common::Error Parallaction::init() {
void Parallaction::pauseEngineIntern(bool pause) {
if (_soundMan) {
- _soundMan->execute(SC_PAUSE, pause);
+ _soundMan->execute(SC_PAUSE, (int)pause);
}
}
@@ -638,9 +638,9 @@ void Parallaction::runZone(ZonePtr z) {
case kZoneHear:
_soundMan->execute(SC_SETSFXCHANNEL, z->u.hear->_channel);
- _soundMan->execute(SC_SETSFXLOOPING, ((z->_flags & kFlagsLooping) == kFlagsLooping));
+ _soundMan->execute(SC_SETSFXLOOPING, (int)((z->_flags & kFlagsLooping) == kFlagsLooping));
_soundMan->execute(SC_SETSFXVOLUME, 60);
- _soundMan->execute(SC_PLAYSFX, z->u.hear->_name);
+ _soundMan->execute(SC_PLAYSFX, z->u.hear->_name);
break;
case kZoneSpeak:
@@ -986,9 +986,9 @@ bool CharacterName::dummy() const {
}
void Parallaction::beep() {
- _soundMan->execute(SC_SETSFXCHANNEL, 3);
- _soundMan->execute(SC_SETSFXVOLUME, 127);
- _soundMan->execute(SC_SETSFXLOOPING, 0);
+ _soundMan->execute(SC_SETSFXCHANNEL, 3);
+ _soundMan->execute(SC_SETSFXVOLUME, 127);
+ _soundMan->execute(SC_SETSFXLOOPING, 0);
_soundMan->execute(SC_PLAYSFX, "beep");
}
diff --git a/engines/parallaction/sound.h b/engines/parallaction/sound.h
index 140d4d974d..5ae4701a02 100644
--- a/engines/parallaction/sound.h
+++ b/engines/parallaction/sound.h
@@ -57,9 +57,6 @@ class SoundMan {
public:
SoundMan(SoundManImpl *impl) : _impl(impl) { }
virtual ~SoundMan() { delete _impl; }
- void execute(int command, bool parm) {
- execute(command, parm ? "1" : "0");
- }
void execute(int command, int32 parm) {
char n[12];
sprintf(n, "%i", parm);
@@ -104,7 +101,7 @@ protected:
int _sfxVolume;
int _sfxRate;
uint _sfxChannel;
-
+
int _musicType;
public:
@@ -176,7 +173,7 @@ public:
};
class DummySoundMan : public SoundManImpl {
-public:
+public:
void execute(int command, const char *parm) { }
};
@@ -191,7 +188,7 @@ protected:
int _sfxVolume;
int _sfxRate;
uint _sfxChannel;
-
+
virtual void playMusic() = 0;
virtual void stopMusic() = 0;
virtual void pause(bool p) = 0;
@@ -202,7 +199,7 @@ public:
virtual void playSfx(const char *filename, uint channel, bool looping, int volume = -1) { }
virtual void stopSfx(uint channel) { }
- virtual void execute(int command, const char *parm);
+ virtual void execute(int command, const char *parm);
void setMusicFile(const char *parm);
};
@@ -213,7 +210,7 @@ class DosSoundMan_br : public SoundMan_br {
public:
DosSoundMan_br(Parallaction_br *vm, MidiDriver *midiDriver);
~DosSoundMan_br();
-
+
void playMusic();
void stopMusic();
void pause(bool p);