diff options
author | Paweł Kołodziejski | 2007-07-29 11:21:12 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2007-07-29 11:21:12 +0000 |
commit | f8d28abdf93c2e0bee8f0c33c676f7cb55da049c (patch) | |
tree | d3c93731ae39aba8200c436104fec4b265609cdb | |
parent | 395f244ba04b0172223071eac651c8793f57cce0 (diff) | |
download | scummvm-rg350-f8d28abdf93c2e0bee8f0c33c676f7cb55da049c.tar.gz scummvm-rg350-f8d28abdf93c2e0bee8f0c33c676f7cb55da049c.tar.bz2 scummvm-rg350-f8d28abdf93c2e0bee8f0c33c676f7cb55da049c.zip |
added sfx/voice and few corrections
svn-id: r28286
-rw-r--r-- | engines/drascula/drascula.cpp | 27 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 8 |
2 files changed, 21 insertions, 14 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 8d2c83ae5c..c5ecc22d31 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1227,7 +1227,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getLine(ald, buffer, size); sscanf(buffer, "%s", num_room); - strcat(num_room,".alg"); + strcat(num_room, ".alg"); getLine(ald, buffer, size); sscanf(buffer, "%d", &musica_room); @@ -3685,14 +3685,6 @@ void DrasculaEngine::para_grabar(char nom_game[]) { fin_sound(); } -int DrasculaEngine::LookForFree() { - delay(10); - // TODO GAME_Poll(gamev, 10); - //return(!SDEV_ChannelFree(gamev->EffectDev, 0)); - delay(1000); // workround too much fast played sound - return 0; -} - void DrasculaEngine::OpenSSN(const char *Name, int Pause) { MiVideoSSN = (byte *)malloc(64256); GlobalSpeed = CLOCKS_PER_SEC / Pause; @@ -4856,15 +4848,15 @@ void DrasculaEngine::MusicFadeout() { } void DrasculaEngine::ctvd_end() { - //TODO + _mixer->stopHandle(_soundHandle); } void DrasculaEngine::ctvd_stop() { - //TODO + _mixer->stopHandle(_soundHandle); } void DrasculaEngine::ctvd_terminate() { - //TODO +// _mixer->stopHandle(_soundHandle); } void DrasculaEngine::ctvd_speaker(int flag) {} @@ -4872,7 +4864,16 @@ void DrasculaEngine::ctvd_speaker(int flag) {} void DrasculaEngine::ctvd_output(Common::File *file_handle) {} void DrasculaEngine::ctvd_init(int b) { - //TODO + int soundSize = sku->size(); + byte *soundData = (byte *)malloc(soundSize); + sku->seek(32); + sku->read(soundData, soundSize); + _mixer->playRaw(Audio::Mixer::kPlainSoundType, &_soundHandle, soundData, soundSize - 64, + 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); +} + +int DrasculaEngine::LookForFree() { + return _mixer->isSoundHandleActive(_soundHandle); } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 50586884a4..75e5868143 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -37,6 +37,10 @@ #include "common/events.h" #include "common/keyboard.h" +#include "sound/audiostream.h" +#include "sound/mixer.h" +#include "sound/voc.h" + #include "engines/engine.h" namespace Drascula { @@ -350,6 +354,8 @@ public: Common::Platform getPlatform() const; void update_events(); + Audio::SoundHandle _soundHandle; + void asigna_memoria(); void libera_memoria(); void carga_info(); @@ -438,7 +444,7 @@ public: int vb_x, sentido_vb, vb_se_mueve, frame_vb; float nuevo_alto, nuevo_ancho; int diferencia_x, diferencia_y; - int factor_red[201]; + int factor_red[202]; int frame_piano; int frame_borracho; int frame_velas; |