diff options
author | Max Horn | 2011-12-07 16:06:34 +0100 |
---|---|---|
committer | Max Horn | 2011-12-07 21:58:31 +0100 |
commit | 45a99e727675913f77100d2e4957c763ccb7546d (patch) | |
tree | ec41e1de784d6bcc3f1cde268d1a1be99bc18304 /engines/dreamweb/stubs.cpp | |
parent | 11b1ec1bc6f29e470ad8e22b3a802edbdbae0889 (diff) | |
download | scummvm-rg350-45a99e727675913f77100d2e4957c763ccb7546d.tar.gz scummvm-rg350-45a99e727675913f77100d2e4957c763ccb7546d.tar.bz2 scummvm-rg350-45a99e727675913f77100d2e4957c763ccb7546d.zip |
DREAMWEB: Move sound related code to a new source file
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 923d0f76af..cf43bf33b0 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1005,16 +1005,6 @@ void DreamGenContext::deallocateMem(uint16 segment) { } } -void DreamGenContext::loadSpeech() { - cancelCh1(); - data.byte(kSpeechloaded) = 0; - createName(); - const char *name = (const char *)data.ptr(di, 13); - //warning("name = %s", name); - if (engine->loadSpeech(name)) - data.byte(kSpeechloaded) = 1; -} - void DreamGenContext::DOSReturn() { if (data.byte(kCommandtype) != 250) { data.byte(kCommandtype) = 250; @@ -1097,19 +1087,6 @@ void DreamGenContext::lockMon() { } } -void DreamGenContext::cancelCh0() { - data.byte(kCh0repeat) = 0; - data.word(kCh0blockstocopy) = 0; - data.byte(kCh0playing) = 255; - engine->stopSound(0); -} - -void DreamGenContext::cancelCh1() { - data.word(kCh1blockstocopy) = 0; - data.byte(kCh1playing) = 255; - engine->stopSound(1); -} - void DreamGenContext::makeBackOb(SetObject *objData) { if (data.byte(kNewobs) == 0) return; @@ -2313,24 +2290,6 @@ void DreamGenContext::loadRoom() { getDimension(); } -void DreamGenContext::loadRoomsSample() { - uint8 sample = data.byte(kRoomssample); - - if (sample == 255 || data.byte(kCurrentsample) == sample) - return; // loaded already - - assert(sample < 100); - Common::String sampleName = Common::String::format("DREAMWEB.V%02d", sample); - - uint8 ch0 = data.byte(kCh0playing); - if (ch0 >= 12 && ch0 != 255) - cancelCh0(); - uint8 ch1 = data.byte(kCh1playing); - if (ch1 >= 12) - cancelCh1(); - engine->loadSounds(1, sampleName.c_str()); -} - void DreamGenContext::readSetData() { data.word(kCharset1) = standardLoad("DREAMWEB.C00"); @@ -2364,69 +2323,6 @@ Frame * DreamGenContext::tempGraphics3() { return (Frame *)getSegment(data.word(kTempgraphics3)).ptr(0, 0); } -void DreamBase::volumeAdjust() { - if (data.byte(kVolumedirection) == 0) - return; - if (data.byte(kVolume) != data.byte(kVolumeto)) { - data.byte(kVolumecount) += 64; - // Only modify the volume every 256/64 = 4th time around - if (data.byte(kVolumecount) == 0) - data.byte(kVolume) += data.byte(kVolumedirection); - } else { - data.byte(kVolumedirection) = 0; - } -} - -void DreamGenContext::playChannel0(uint8 index, uint8 repeat) { - if (data.byte(kSoundint) == 255) - return; - - data.byte(kCh0playing) = index; - Sound *soundBank; - if (index >= 12) { - soundBank = (Sound *)getSegment(data.word(kSounddata2)).ptr(0, 0); - index -= 12; - } else - soundBank = (Sound *)getSegment(data.word(kSounddata)).ptr(0, 0); - - data.byte(kCh0repeat) = repeat; - data.word(kCh0emmpage) = soundBank[index].emmPage; - data.word(kCh0offset) = soundBank[index].offset(); - data.word(kCh0blockstocopy) = soundBank[index].blockCount(); - if (repeat) { - data.word(kCh0oldemmpage) = data.word(kCh0emmpage); - data.word(kCh0oldoffset) = data.word(kCh0offset); - data.word(kCh0oldblockstocopy) = data.word(kCh0blockstocopy); - } -} - -void DreamGenContext::playChannel0() { - playChannel0(al, ah); -} - -void DreamGenContext::playChannel1(uint8 index) { - if (data.byte(kSoundint) == 255) - return; - if (data.byte(kCh1playing) == 7) - return; - - data.byte(kCh1playing) = index; - Sound *soundBank; - if (index >= 12) { - soundBank = (Sound *)getSegment(data.word(kSounddata2)).ptr(0, 0); - index -= 12; - } else - soundBank = (Sound *)getSegment(data.word(kSounddata)).ptr(0, 0); - - data.word(kCh1emmpage) = soundBank[index].emmPage; - data.word(kCh1offset) = soundBank[index].offset(); - data.word(kCh1blockstocopy) = soundBank[index].blockCount(); -} - -void DreamGenContext::playChannel1() { - playChannel1(al); -} - void DreamGenContext::findRoomInLoc() { uint8 x = data.byte(kMapx) / 11; uint8 y = data.byte(kMapy) / 10; |