aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse_digi
diff options
context:
space:
mode:
authorMax Horn2005-04-20 23:33:35 +0000
committerMax Horn2005-04-20 23:33:35 +0000
commit7963bb4cb92345948b8f737df8414929f93db527 (patch)
treed89bb97667bb09fb515e3c59a15ecbd37e04f77e /scumm/imuse_digi
parentc04ad861fe751503c978cd47258baaa57c22b96d (diff)
downloadscummvm-rg350-7963bb4cb92345948b8f737df8414929f93db527.tar.gz
scummvm-rg350-7963bb4cb92345948b8f737df8414929f93db527.tar.bz2
scummvm-rg350-7963bb4cb92345948b8f737df8414929f93db527.zip
Renamed _mouseButStat -> _mouseAndKeyboardStat (that's what it really is); moved _audioNames to class IMuseDigital
svn-id: r17723
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r--scumm/imuse_digi/dimuse.cpp4
-rw-r--r--scumm/imuse_digi/dimuse.h5
-rw-r--r--scumm/imuse_digi/dimuse_music.cpp10
3 files changed, 17 insertions, 2 deletions
diff --git a/scumm/imuse_digi/dimuse.cpp b/scumm/imuse_digi/dimuse.cpp
index d4f2f18c82..3e382b2364 100644
--- a/scumm/imuse_digi/dimuse.cpp
+++ b/scumm/imuse_digi/dimuse.cpp
@@ -54,6 +54,9 @@ IMuseDigital::IMuseDigital(ScummEngine *scumm, int fps)
_track[l]->used = false;
}
_vm->_timer->installTimerProc(timer_handler, 1000000 / _callbackFps, this);
+
+ _audioNames = NULL;
+ _numAudioNames = 0;
}
IMuseDigital::~IMuseDigital() {
@@ -63,6 +66,7 @@ IMuseDigital::~IMuseDigital() {
delete _track[l];
}
delete _sound;
+ free(_audioNames);
}
void IMuseDigital::resetState() {
diff --git a/scumm/imuse_digi/dimuse.h b/scumm/imuse_digi/dimuse.h
index cb8e9892c6..52484ecf64 100644
--- a/scumm/imuse_digi/dimuse.h
+++ b/scumm/imuse_digi/dimuse.h
@@ -90,6 +90,9 @@ private:
ScummEngine *_vm;
ImuseDigiSndMgr *_sound;
+ char *_audioNames;
+ int32 _numAudioNames;
+
bool _pause;
int32 _attributes[188];
@@ -129,6 +132,8 @@ public:
IMuseDigital(ScummEngine *scumm, int fps);
virtual ~IMuseDigital();
+ void setAudioNames(int32 num, char *names);
+
void startVoice(int soundId, AudioStream *input);
void startVoice(int soundId, const char *soundName);
void startMusic(int soundId, int volume);
diff --git a/scumm/imuse_digi/dimuse_music.cpp b/scumm/imuse_digi/dimuse_music.cpp
index da57398353..43490da5e9 100644
--- a/scumm/imuse_digi/dimuse_music.cpp
+++ b/scumm/imuse_digi/dimuse_music.cpp
@@ -394,10 +394,16 @@ void IMuseDigital::setFtMusicCuePoint(int cueId) {
_curMusicCue = cueId;
}
+void IMuseDigital::setAudioNames(int32 num, char *names) {
+ free(_audioNames);
+ _numAudioNames = num;
+ _audioNames = names;
+}
+
int IMuseDigital::getSoundIdByName(const char *soundName) {
if (soundName && soundName[0] != 0) {
- for (int r = 0; r < _vm->_numAudioNames; r++) {
- if (strcmp(soundName, &_vm->_audioNames[r * 9]) == 0) {
+ for (int r = 0; r < _numAudioNames; r++) {
+ if (strcmp(soundName, &_audioNames[r * 9]) == 0) {
return r;
}
}