SCI: Silenced some sound related warnings. Added an empty function for kDoSound(Restore), called when restoring games

svn-id: r51661
This commit is contained in:
Filippos Karapetis 2010-08-02 21:20:43 +00:00
parent 09f4562551
commit 5ca6b33ba7
5 changed files with 18 additions and 8 deletions

View File

@ -467,7 +467,7 @@ reg_t kMoveToEnd(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundInit(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundPlay(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundDummy(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundRestore(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundDispose(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundMute(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundStop(EngineState *s, int argc, reg_t *argv);
@ -482,6 +482,7 @@ reg_t kDoSoundUpdateCues(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundSendMidi(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundReverb(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundSetHold(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundDummy(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundGetAudioCapability(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundSuspend(EngineState *s, int argc, reg_t *argv);
reg_t kDoSoundSetVolume(EngineState *s, int argc, reg_t *argv);

View File

@ -86,7 +86,7 @@ struct SciKernelMapSubEntry {
static const SciKernelMapSubEntry kDoSound_subops[] = {
{ SIG_SOUNDSCI0, 0, MAP_CALL(DoSoundInit), "o", NULL },
{ SIG_SOUNDSCI0, 1, MAP_CALL(DoSoundPlay), "o", NULL },
{ SIG_SOUNDSCI0, 2, MAP_CALL(DoSoundDummy), "(o)", NULL },
{ SIG_SOUNDSCI0, 2, MAP_CALL(DoSoundRestore), "(o)", NULL },
{ SIG_SOUNDSCI0, 3, MAP_CALL(DoSoundDispose), "o", NULL },
{ SIG_SOUNDSCI0, 4, MAP_CALL(DoSoundMute), "(i)", NULL },
{ SIG_SOUNDSCI0, 5, MAP_CALL(DoSoundStop), "o", NULL },
@ -99,7 +99,7 @@ static const SciKernelMapSubEntry kDoSound_subops[] = {
{ SIG_SOUNDSCI0, 12, MAP_CALL(DoSoundStopAll), "", NULL },
{ SIG_SOUNDSCI1EARLY, 0, MAP_CALL(DoSoundMasterVolume), NULL, NULL },
{ SIG_SOUNDSCI1EARLY, 1, MAP_CALL(DoSoundMute), NULL, NULL },
{ SIG_SOUNDSCI1EARLY, 2, MAP_CALL(DoSoundDummy), NULL, NULL },
{ SIG_SOUNDSCI1EARLY, 2, MAP_CALL(DoSoundRestore), NULL, NULL },
{ SIG_SOUNDSCI1EARLY, 3, MAP_CALL(DoSoundGetPolyphony), NULL, NULL },
{ SIG_SOUNDSCI1EARLY, 4, MAP_CALL(DoSoundUpdate), NULL, NULL },
{ SIG_SOUNDSCI1EARLY, 5, MAP_CALL(DoSoundInit), NULL, NULL },
@ -120,7 +120,7 @@ static const SciKernelMapSubEntry kDoSound_subops[] = {
// ^^ Longbow demo
{ SIG_SOUNDSCI1LATE, 0, MAP_CALL(DoSoundMasterVolume), NULL, NULL },
{ SIG_SOUNDSCI1LATE, 1, MAP_CALL(DoSoundMute), NULL, NULL },
{ SIG_SOUNDSCI1LATE, 2, MAP_CALL(DoSoundDummy), "", NULL },
{ SIG_SOUNDSCI1LATE, 2, MAP_CALL(DoSoundRestore), "", NULL },
{ SIG_SOUNDSCI1LATE, 3, MAP_CALL(DoSoundGetPolyphony), NULL, NULL },
{ SIG_SOUNDSCI1LATE, 4, MAP_CALL(DoSoundGetAudioCapability), "", NULL },
{ SIG_SOUNDSCI1LATE, 5, MAP_CALL(DoSoundSuspend), "i", NULL },
@ -142,7 +142,7 @@ static const SciKernelMapSubEntry kDoSound_subops[] = {
#ifdef ENABLE_SCI32
{ SIG_SOUNDSCI21, 0, MAP_CALL(DoSoundMasterVolume), NULL, NULL },
{ SIG_SOUNDSCI21, 1, MAP_CALL(DoSoundMute), NULL, NULL },
{ SIG_SOUNDSCI21, 2, MAP_CALL(DoSoundDummy), NULL, NULL },
{ SIG_SOUNDSCI21, 2, MAP_CALL(DoSoundRestore), NULL, NULL },
{ SIG_SOUNDSCI21, 3, MAP_CALL(DoSoundGetPolyphony), NULL, NULL },
{ SIG_SOUNDSCI21, 4, MAP_CALL(DoSoundGetAudioCapability), NULL, NULL },
{ SIG_SOUNDSCI21, 5, MAP_CALL(DoSoundSuspend), NULL, NULL },

View File

@ -48,7 +48,7 @@ reg_t kDoSound(EngineState *s, int argc, reg_t *argv) {
CREATE_DOSOUND_FORWARD(DoSoundInit)
CREATE_DOSOUND_FORWARD(DoSoundPlay)
CREATE_DOSOUND_FORWARD(DoSoundDummy)
CREATE_DOSOUND_FORWARD(DoSoundRestore)
CREATE_DOSOUND_FORWARD(DoSoundDispose)
CREATE_DOSOUND_FORWARD(DoSoundMute)
CREATE_DOSOUND_FORWARD(DoSoundStop)
@ -63,6 +63,7 @@ CREATE_DOSOUND_FORWARD(DoSoundUpdateCues)
CREATE_DOSOUND_FORWARD(DoSoundSendMidi)
CREATE_DOSOUND_FORWARD(DoSoundReverb)
CREATE_DOSOUND_FORWARD(DoSoundSetHold)
CREATE_DOSOUND_FORWARD(DoSoundDummy)
CREATE_DOSOUND_FORWARD(DoSoundGetAudioCapability)
CREATE_DOSOUND_FORWARD(DoSoundSuspend)
CREATE_DOSOUND_FORWARD(DoSoundSetVolume)

View File

@ -147,6 +147,12 @@ void SoundCommandParser::processPlaySound(reg_t obj) {
_music->soundPlay(musicSlot);
}
reg_t SoundCommandParser::kDoSoundRestore(int argc, reg_t *argv, reg_t acc) {
// Called after loading, to restore the playlist
// We don't really use or need this
return acc;
}
reg_t SoundCommandParser::kDoSoundDummy(int argc, reg_t *argv, reg_t acc) {
warning("cmdDummy invoked"); // not supposed to occur
return acc;
@ -246,7 +252,8 @@ reg_t SoundCommandParser::kDoSoundPause(int argc, reg_t *argv, reg_t acc) {
} else { // pause a playlist slot
MusicEntry *musicSlot = _music->getSlot(obj);
if (!musicSlot) {
warning("kDoSound(pause): Slot not found (%04x:%04x)", PRINT_REG(obj));
// This happens quite frequently
debugC(2, kDebugLevelSound, "kDoSound(pause): Slot not found (%04x:%04x)", PRINT_REG(obj));
return acc;
}

View File

@ -82,7 +82,7 @@ public:
reg_t kDoSoundInit(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundPlay(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundDummy(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundRestore(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundMute(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundPause(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundResumeAfterRestore(int argc, reg_t *argv, reg_t acc);
@ -97,6 +97,7 @@ public:
reg_t kDoSoundSendMidi(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundReverb(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundSetHold(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundDummy(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundGetAudioCapability(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundSetVolume(int argc, reg_t *argv, reg_t acc);
reg_t kDoSoundSetPriority(int argc, reg_t *argv, reg_t acc);