X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FSound.c;h=4a79925e1603ecd943b1d88f1114eb2bc552b1a8;hb=dec5093fc78bfe1356d764c2432fed6566b2af66;hp=1284e58c30988017e6e0a98e72ee4867d5bd301b;hpb=949580a3bafe5c8abd1fac99202411b65900b883;p=rocksndiamonds.git diff --git a/src/game_sp/Sound.c b/src/game_sp/Sound.c index 1284e58c..4a79925e 100644 --- a/src/game_sp/Sound.c +++ b/src/game_sp/Sound.c @@ -4,209 +4,6 @@ #include "Sound.h" -// static char *VB_Name = "modSound"; - -// --- Option Explicit - -int MusicOnFlag; -int FXOnFlag; - -#if 0 - -DirectSoundBuffer ZonkFX[1 + 1]; -DirectSoundBuffer InfotronFX[1 + 1]; -DirectSoundBuffer BugFX[1 + 1]; -DirectSoundBuffer ExplosionFX[1 + 1]; -DirectSoundBuffer PushFX; -DirectSoundBuffer ExitFX; -DirectSoundBuffer BaseFX; - -#endif - -void LoadSoundFX() -{ - -#if 0 - - DSBUFFERDESC bufferDesc; - WAVEFORMATEX waveFormat; - char *FName; - int i; - - bufferDesc.lFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_STATIC; - waveFormat.nFormatTag = WAVE_FORMAT_PCM; - waveFormat.nChannels = 1; - waveFormat.lSamplesPerSec = 8000; - waveFormat.nBitsPerSample = 8; - waveFormat.nBlockAlign = waveFormat.nBitsPerSample / 8 * waveFormat.nChannels; - waveFormat.lAvgBytesPerSec = waveFormat.lSamplesPerSec * waveFormat.nBlockAlign; - FName = CAT(App.Path, "/Sound/"); - for (i = 0; i <= 1; i++) - { - ZonkFX[i] = DSound.CreateSoundBufferFromFile(CAT(FName, "Zonk.wav"), bufferDesc, waveFormat); - InfotronFX[i] = DSound.CreateSoundBufferFromFile(CAT(FName, "Infotron.wav"), bufferDesc, waveFormat); - BugFX[i] = DSound.CreateSoundBufferFromFile(CAT(FName, "Bug.wav"), bufferDesc, waveFormat); - ExplosionFX[i] = DSound.CreateSoundBufferFromFile(CAT(FName, "Explosion.wav"), bufferDesc, waveFormat); - } - - BaseFX = DSound.CreateSoundBufferFromFile(CAT(FName, "Base.wav"), bufferDesc, waveFormat); - ExitFX = DSound.CreateSoundBufferFromFile(CAT(FName, "Exit.wav"), bufferDesc, waveFormat); - PushFX = DSound.CreateSoundBufferFromFile(CAT(FName, "Push.wav"), bufferDesc, waveFormat); - // FXOnFlag = 0 - -#endif - -} - -void subSoundFXZonk() -{ -#if 0 - - int i; - - if (FXOnFlag == 0) - return; - - for (i = 0; i <= 1; i++) - { - if (! IS_NOTHING(&ZonkFX[i], sizeof(ZonkFX[i]))) - { - if (ZonkFX[i].GetStatus() != DSBSTATUS_PLAYING) - { - ZonkFX[i].Play DSBPLAY_DEFAULT; - break; - } - } - } - -#endif -} - -void subSoundFXBug() -{ -#if 0 - - int i; - - if (FXOnFlag == 0) - return; - - for (i = 0; i <= 1; i++) - { - if (! IS_NOTHING(&BugFX[i], sizeof(BugFX[i]))) - { - if (BugFX[i].GetStatus() != DSBSTATUS_PLAYING) - { - BugFX[i].Play DSBPLAY_DEFAULT; - break; - } - } - } - -#endif -} - -void subSoundFXInfotron() -{ -#if 0 - - int i; - - if (FXOnFlag == 0) - return; - - for (i = 0; i <= 1; i++) - { - if (! IS_NOTHING(&InfotronFX[i], sizeof(InfotronFX[i]))) - { - if (InfotronFX[i].GetStatus() != DSBSTATUS_PLAYING) - { - InfotronFX[i].Play DSBPLAY_DEFAULT; - break; - } - } - } - -#endif -} - -void subSoundFXExplosion() -{ -#if 0 - - int i; - - if (FXOnFlag == 0) - return; - - for (i = 0; i <= 1; i++) - { - if (! IS_NOTHING(&ExplosionFX[i], sizeof(ExplosionFX[i]))) - { - if (ExplosionFX[i].GetStatus() != DSBSTATUS_PLAYING) - { - ExplosionFX[i].Play DSBPLAY_DEFAULT; - break; - } - } - } - -#endif -} - -void subSoundFXBase() -{ -#if 0 - - if (FXOnFlag == 0) - return; - - if (IS_NOTHING(&BaseFX, sizeof(BaseFX))) - return; - - if (BaseFX.GetStatus() != DSBSTATUS_PLAYING) - { - BaseFX.Play DSBPLAY_DEFAULT; - } - -#endif -} - -void subSoundFXPush() -{ -#if 0 - - if (FXOnFlag == 0) - return; - - if (IS_NOTHING(&PushFX, sizeof(PushFX))) - return; - - if (PushFX.GetStatus() != DSBSTATUS_PLAYING) - { - PushFX.Play DSBPLAY_DEFAULT; - } - -#endif -} - -void subSoundFXExit() -{ -#if 0 - - if (FXOnFlag == 0) - return; - - if (IS_NOTHING(&ExitFX, sizeof(ExitFX))) - return; - - if (ExitFX.GetStatus() != DSBSTATUS_PLAYING) - { - ExitFX.Play DSBPLAY_DEFAULT; - } - -#endif -} void subSoundFX(int si, int element, int action) { @@ -215,7 +12,3 @@ void subSoundFX(int si, int element, int action) PlayLevelSound_SP(x, y, element, action); } - -void subMusicInit() -{ -}