[Scummvm-cvs-logs] scummvm master -> f361a7d624091132d1684907f35b9be693ab38f4
lordhoto
lordhoto at gmail.com
Fri Nov 23 02:51:55 CET 2012
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f5a3260ee8 KYRA: Properly mark digital sfx as sfx in HoF and LoL again.
f361a7d624 KYRA: Make Sound::hasSoundFile const again.
Commit: f5a3260ee8b31c7ff5d63fe8d5ac551cc30d14d5
https://github.com/scummvm/scummvm/commit/f5a3260ee8b31c7ff5d63fe8d5ac551cc30d14d5
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-11-22T17:43:38-08:00
Commit Message:
KYRA: Properly mark digital sfx as sfx in HoF and LoL again.
This is a regression from e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b.
Changed paths:
engines/kyra/kyra_hof.cpp
engines/kyra/script_tim.cpp
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index c53731e..b180285 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -1448,7 +1448,7 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
if (vocIndex != -1) {
- _sound->voicePlay(_ingameSoundList[vocIndex], 0, 255, true);
+ _sound->voicePlay(_ingameSoundList[vocIndex], 0, 255, 255, true);
} else if (_flags.platform == Common::kPlatformPC) {
if (_sound->getSfxType() == Sound::kMidiMT32)
track = track < _mt32SfxMapSize ? _mt32SfxMap[track] - 1 : -1;
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 177d799..f031381 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -736,7 +736,7 @@ int TIMInterpreter::cmd_playVocFile(const uint16 *param) {
const int volume = (param[1] * 255) / 100;
if (index < ARRAYSIZE(_vocFiles) && !_vocFiles[index].empty())
- _vm->sound()->voicePlay(_vocFiles[index].c_str(), 0, volume, true);
+ _vm->sound()->voicePlay(_vocFiles[index].c_str(), 0, volume, 255, true);
else if (index == 7 && !_vm->gameFlags().isTalkie)
_vm->sound()->playTrack(index);
else
Commit: f361a7d624091132d1684907f35b9be693ab38f4
https://github.com/scummvm/scummvm/commit/f361a7d624091132d1684907f35b9be693ab38f4
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-11-22T17:50:20-08:00
Commit Message:
KYRA: Make Sound::hasSoundFile const again.
Changed paths:
engines/kyra/sound.cpp
engines/kyra/sound.h
engines/kyra/sound_adlib.cpp
engines/kyra/sound_adlib.h
engines/kyra/sound_amiga.cpp
engines/kyra/sound_intern.h
engines/kyra/sound_midi.cpp
engines/kyra/sound_towns.cpp
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 7b1b4d8..32d175b 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -205,7 +205,7 @@ void MixedSoundDriver::selectAudioResourceSet(int set) {
_sfx->selectAudioResourceSet(set);
}
-bool MixedSoundDriver::hasSoundFile(uint file) {
+bool MixedSoundDriver::hasSoundFile(uint file) const {
return _music->hasSoundFile(file) && _sfx->hasSoundFile(file);
}
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 3418c8a..057eb48 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -128,7 +128,7 @@ public:
* @param track track number
* @return true if available, false otherwise
*/
- virtual bool hasSoundFile(uint file) = 0;
+ virtual bool hasSoundFile(uint file) const = 0;
/**
* Load a specifc sound file for use of
@@ -309,7 +309,7 @@ public:
virtual void initAudioResourceInfo(int set, void *info);
virtual void selectAudioResourceSet(int set);
- virtual bool hasSoundFile(uint file);
+ virtual bool hasSoundFile(uint file) const;
virtual void loadSoundFile(uint file);
virtual void loadSoundFile(Common::String file);
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 3d4ad1f..958cfcb 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -2434,7 +2434,7 @@ void SoundAdLibPC::selectAudioResourceSet(int set) {
}
}
-bool SoundAdLibPC::hasSoundFile(uint file) {
+bool SoundAdLibPC::hasSoundFile(uint file) const {
if (file < res()->fileListSize)
return (res()->fileList[file] != 0);
return false;
diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h
index 99e1f15..f78d812 100644
--- a/engines/kyra/sound_adlib.h
+++ b/engines/kyra/sound_adlib.h
@@ -71,7 +71,7 @@ public:
virtual void initAudioResourceInfo(int set, void *info);
virtual void selectAudioResourceSet(int set);
- virtual bool hasSoundFile(uint file);
+ virtual bool hasSoundFile(uint file) const;
virtual void loadSoundFile(uint file);
virtual void loadSoundFile(Common::String file);
@@ -90,7 +90,7 @@ private:
void play(uint8 track, uint8 volume);
- const SoundResourceInfo_PC *res() {return _resInfo[_currentResourceSet]; }
+ const SoundResourceInfo_PC *res() const {return _resInfo[_currentResourceSet]; }
SoundResourceInfo_PC *_resInfo[3];
int _currentResourceSet;
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index f633a42..7292541 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -63,7 +63,7 @@ void SoundAmiga::selectAudioResourceSet(int set) {
// this doesn't matter much.
}
-bool SoundAmiga::hasSoundFile(uint file) {
+bool SoundAmiga::hasSoundFile(uint file) const {
if (file < 3)
return true;
return false;
diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 94f596f..c5cf265 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -64,7 +64,7 @@ public:
void initAudioResourceInfo(int set, void *info);
void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String file);
void loadSfxFile(Common::String file);
@@ -95,7 +95,7 @@ private:
MidiParser *_music;
MidiParser *_sfx[3];
- const SoundResourceInfo_PC *res() {return _resInfo[_currentResourceSet]; }
+ const SoundResourceInfo_PC *res() const {return _resInfo[_currentResourceSet]; }
SoundResourceInfo_PC *_resInfo[3];
int _currentResourceSet;
@@ -122,7 +122,7 @@ public:
void initAudioResourceInfo(int set, void *info);
void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String) {}
@@ -155,7 +155,7 @@ private:
bool _cdaPlaying;
- const SoundResourceInfo_Towns *res() {return _resInfo[_currentResourceSet]; }
+ const SoundResourceInfo_Towns *res() const {return _resInfo[_currentResourceSet]; }
SoundResourceInfo_Towns *_resInfo[3];
int _currentResourceSet;
@@ -176,7 +176,7 @@ public:
void process() {}
void initAudioResourceInfo(int set, void *info);
void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String file);
@@ -212,7 +212,7 @@ public:
void initAudioResourceInfo(int set, void *info);
void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file) {}
void loadSoundFile(Common::String file);
@@ -234,7 +234,7 @@ private:
uint8 *_sfxTrackData;
TownsPC98_AudioDriver *_driver;
- const SoundResourceInfo_TownsPC98V2 *res() {return _resInfo[_currentResourceSet]; }
+ const SoundResourceInfo_TownsPC98V2 *res() const {return _resInfo[_currentResourceSet]; }
SoundResourceInfo_TownsPC98V2 *_resInfo[3];
int _currentResourceSet;
};
@@ -329,7 +329,7 @@ public:
void initAudioResourceInfo(int set, void *info);
void selectAudioResourceSet(int set);
- bool hasSoundFile(uint file);
+ bool hasSoundFile(uint file) const;
void loadSoundFile(uint file);
void loadSoundFile(Common::String) {}
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index fe40cb1..a54c526 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -605,7 +605,7 @@ void SoundMidiPC::selectAudioResourceSet(int set) {
}
}
-bool SoundMidiPC::hasSoundFile(uint file) {
+bool SoundMidiPC::hasSoundFile(uint file) const {
if (file < res()->fileListSize)
return (res()->fileList[file] != 0);
return false;
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 6f57ebf..ee2ea6b 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -134,7 +134,7 @@ void SoundTowns::selectAudioResourceSet(int set) {
}
}
-bool SoundTowns::hasSoundFile(uint file) {
+bool SoundTowns::hasSoundFile(uint file) const {
if (file < res()->fileListSize)
return (res()->fileList[file] != 0);
return false;
@@ -423,7 +423,7 @@ void SoundPC98::selectAudioResourceSet(int set) {
}
}
-bool SoundPC98::hasSoundFile(uint file) {
+bool SoundPC98::hasSoundFile(uint file) const {
return true;
}
@@ -564,7 +564,7 @@ void SoundTownsPC98_v2::selectAudioResourceSet(int set) {
}
}
-bool SoundTownsPC98_v2::hasSoundFile(uint file) {
+bool SoundTownsPC98_v2::hasSoundFile(uint file) const {
if (file < res()->fileListSize)
return (res()->fileList[file] != 0);
return false;
More information about the Scummvm-git-logs
mailing list