synced with local sources

svn-id: r12257
This commit is contained in:
Paweł Kołodziejski 2004-01-08 17:07:21 +00:00
parent 370589dde5
commit 6d8c2d0461
3 changed files with 16 additions and 9 deletions

View File

@ -208,6 +208,7 @@ void IMuseDigital::switchToNextRegion(int track) {
int region = checkJumpByRegion(track, _track[track].curRegion);
if (region != -1)
_track[track].curRegion = region;
_track[track].curHookId = 0;
}
_track[track].regionOffset = 0;
@ -320,7 +321,7 @@ void IMuseDigital::stopSound(int soundId) {
}
}
void IMuseDigital::stopAllSounds() {
void IMuseDigital::stopAllSounds(bool waitForStop) {
debug(5, "IMuseDigital::stopAllSounds");
for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
if (_track[l].used) {
@ -331,6 +332,17 @@ void IMuseDigital::stopAllSounds() {
}
}
_curMusicId = -1;
if (waitForStop) {
bool used;
do {
used = false;
for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
if (_track[l].used)
used = true;
}
} while (used);
}
}
void IMuseDigital::pause(bool p) {
@ -564,10 +576,6 @@ int IMuseDigital::getSoundStatus(int sound) const {
return 0;
}
void IMuseDigital::closeBundleFiles() {
// TODO
}
int32 IMuseDigital::getPosInMs(int soundId) {
for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
if ((_track[l].idSound == soundId) && _track[l].used) {

View File

@ -101,7 +101,8 @@ public:
void setMasterVolume(int vol) {}
void stopMusic();
void stopSound(int soundId);
void stopAllSounds();
void stopAllSounds(bool waitForStop);
void stopAllSounds() { stopAllSounds(false); }
void pause(bool pause);
void parseScriptCmds(int a, int b, int c, int d, int e, int f, int g, int h);
int getSoundStatus(int sound) const;
@ -111,8 +112,6 @@ public:
int32 getCurVoiceLipSyncHeight();
int32 getCurMusicLipSyncWidth(int32 param);
int32 getCurMusicLipSyncHeight(int32 param);
void closeBundleFiles();
};
struct imuse_music_table {

View File

@ -227,7 +227,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
if (_version == 8) {
char result;
_imuseDigital->closeBundleFiles();
_imuseDigital->stopAllSounds(true);
#ifdef MACOSX
sprintf(buf, "Cannot find file: '%s'\nPlease insert disc %d.\nHit OK to retry, Cancel to exit", filename, disknum);