aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2003-10-10 13:55:08 +0000
committerMax Horn2003-10-10 13:55:08 +0000
commit5301edc38306c27143f38d74085e6c095688f6aa (patch)
tree101c5188d06ac1f476edae9f3a5755e48554dc64 /simon
parent1f9497cb1fbfcc8c3ffd412ce450144983b2452d (diff)
downloadscummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.tar.gz
scummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.tar.bz2
scummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.zip
some cleanup
svn-id: r10720
Diffstat (limited to 'simon')
-rw-r--r--simon/sound.cpp11
-rw-r--r--simon/sound.h9
2 files changed, 9 insertions, 11 deletions
diff --git a/simon/sound.cpp b/simon/sound.cpp
index 7ded523a17..b56d5a428f 100644
--- a/simon/sound.cpp
+++ b/simon/sound.cpp
@@ -235,11 +235,8 @@ int MP3Sound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
/******************************************************************************/
-SimonSound::SimonSound(const byte game, const GameSpecificSettings *gss, const char *gameDataPath, SoundMixer *mixer) {
- _game = game;
- _gameDataPath = gameDataPath;
- _mixer = mixer;
-
+SimonSound::SimonSound(const byte game, const GameSpecificSettings *gss, const Common::String &gameDataPath, SoundMixer *mixer)
+ : _game(game), _gameDataPath(gameDataPath), _mixer(mixer) {
_voice_index = 0;
_ambient_index = 0;
@@ -343,7 +340,7 @@ SimonSound::~SimonSound() {
free(_offsets);
}
-void SimonSound::readSfxFile(const char *filename, const char *gameDataPath) {
+void SimonSound::readSfxFile(const char *filename, const Common::String &gameDataPath) {
stopAll();
File *file = new File();
@@ -379,7 +376,7 @@ void SimonSound::loadSfxTable(File *gameFile, uint32 base) {
_effects = new VocSound(_mixer, gameFile, base);
}
-void SimonSound::readVoiceFile(const char *filename, const char *gameDataPath) {
+void SimonSound::readVoiceFile(const char *filename, const Common::String &gameDataPath) {
stopAll();
File *file = new File();
diff --git a/simon/sound.h b/simon/sound.h
index 52882ea2f6..c7da0bfdf0 100644
--- a/simon/sound.h
+++ b/simon/sound.h
@@ -22,6 +22,7 @@
#include "sound/mixer.h"
#include "simon/intern.h"
+#include "common/str.h"
namespace Simon {
@@ -30,7 +31,7 @@ class BaseSound;
class SimonSound {
private:
byte _game;
- const char *_gameDataPath;
+ const Common::String _gameDataPath;
SoundMixer *_mixer;
@@ -54,12 +55,12 @@ public:
bool _voice_file;
uint _ambient_playing;
- SimonSound(const byte game, const GameSpecificSettings *gss, const char *gameDataPath, SoundMixer *mixer);
+ SimonSound(const byte game, const GameSpecificSettings *gss, const Common::String &gameDataPath, SoundMixer *mixer);
~SimonSound();
- void readSfxFile(const char *filename, const char *gameDataPath);
+ void readSfxFile(const char *filename, const Common::String &gameDataPath);
void loadSfxTable(File *gameFile, uint32 base);
- void readVoiceFile(const char *filename, const char *gameDataPath);
+ void readVoiceFile(const char *filename, const Common::String &gameDataPath);
void playVoice(uint sound);
void playEffects(uint sound);