diff --git a/Game.bb b/Game.bb index 0b87d08b..ff1b0312 100644 --- a/Game.bb +++ b/Game.bb @@ -13,7 +13,6 @@ Local InitErrorStr$ = "" Global ErrorMessageInitialized% = False If FileSize("BlitzToolbox.dll") = 0 Then InitErrorStr = InitErrorStr + "BlitzToolbox.dll" + Chr(13) + Chr(10) -If FileSize("FMod.dll") = 0 Then InitErrorStr = InitErrorStr + "FMod.dll" + Chr(13) + Chr(10) If FileSize("dplayx.dll") = 0 Then InitErrorStr = InitErrorStr + "dplayx.dll" + Chr(13) + Chr(10) If FileSize("d3dim700.dll") = 0 Then InitErrorStr = InitErrorStr + "d3dim700.dll" + Chr(13) + Chr(10) ; ~ Optional in fact If FileSize("FreeImage.dll") = 0 Then InitErrorStr = InitErrorStr + "FreeImage.dll" + Chr(13) + Chr(10) diff --git a/Source Code/Events_Core.bb b/Source Code/Events_Core.bb index 8ee117ed..e088d73d 100644 --- a/Source Code/Events_Core.bb +++ b/Source Code/Events_Core.bb @@ -1044,7 +1044,7 @@ Function UpdateEvents%() GiveAchievement("079") If e\SoundCHN <> 0 Then StopStream_Strict(e\SoundCHN) : e\SoundCHN = 0 : e\SoundCHN_IsStream = False - e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Speech.ogg", opt\VoiceVolume * opt\MasterVolume, 0) + e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Speech.ogg", opt\VoiceVolume * opt\MasterVolume, False) e\SoundCHN_IsStream = True e\EventState = 2.0 @@ -1055,7 +1055,7 @@ Function UpdateEvents%() If e\EventState > 5000.0 If EntityDistanceSquared(e\room\Objects[0], me\Collider) < 6.25 If e\SoundCHN <> 0 Then StopStream_Strict(e\SoundCHN) : e\SoundCHN = 0 : e\SoundCHN_IsStream = False - e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Refuse.ogg", opt\VoiceVolume * opt\MasterVolume, 0) + e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Refuse.ogg", opt\VoiceVolume * opt\MasterVolume, False) e\SoundCHN_IsStream = True e\EventState = 1.5 @@ -1092,7 +1092,7 @@ Function UpdateEvents%() If e\EventState2 = 1.0 If RemoteDoorOn If e\SoundCHN <> 0 Then StopStream_Strict(e\SoundCHN) : e\SoundCHN = 0 : e\SoundCHN_IsStream = False - e\SoundCHN = StreamSound_Strict("SFX\SCP\079\GateB.ogg", opt\VoiceVolume * opt\MasterVolume, 0) + e\SoundCHN = StreamSound_Strict("SFX\SCP\079\GateB.ogg", opt\VoiceVolume * opt\MasterVolume, False) e\SoundCHN_IsStream = True For e2.Events = Each Events @@ -9472,7 +9472,7 @@ Function UpdateEndings%() e\room\NPC[0]\State = 3.0 RemoveNPC(e\room\NPC[1]) - e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\682Battle.ogg", opt\VoiceVolume * opt\MasterVolume, 0) + e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\682Battle.ogg", opt\VoiceVolume * opt\MasterVolume, False) e\SoundCHN_IsStream = True e\EventState = 2.0 @@ -9523,7 +9523,7 @@ Function UpdateEndings%() ElseIf e\EventState > 70.0 * 35.0 And e\EventState < 70.0 * 36.5 me\CameraShake = 1.5 If e\EventState - fps\Factor[0] <= 70.0 * 35.0 - e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\DetonatingAlphaWarheads.ogg", opt\VoiceVolume * opt\MasterVolume, 0) + e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\DetonatingAlphaWarheads.ogg", opt\VoiceVolume * opt\MasterVolume, False) e\SoundCHN_IsStream = True EndIf ElseIf e\EventState > 70.0 * 39.5 And e\EventState < 70.0 * 39.8 @@ -9568,7 +9568,7 @@ Function UpdateEndings%() Else SelectedItem = Null - e\SoundCHN2 = StreamSound_Strict("SFX\Ending\GateB\AlphaWarheadsFail.ogg", opt\VoiceVolume * opt\MasterVolume, 0) + e\SoundCHN2 = StreamSound_Strict("SFX\Ending\GateB\AlphaWarheadsFail.ogg", opt\VoiceVolume * opt\MasterVolume, False) e\SoundCHN2_IsStream = True n.NPCs = CreateNPC(NPCTypeMTF, EntityX(e\room\Objects[8], True), EntityY(e\room\Objects[8], True) + 0.29, EntityZ(e\room\Objects[8], True)) diff --git a/Source Code/Graphics_Core.bb b/Source Code/Graphics_Core.bb index 3f6bdf58..25f0c1ec 100644 --- a/Source Code/Graphics_Core.bb +++ b/Source Code/Graphics_Core.bb @@ -285,7 +285,7 @@ Function PlayMovie%(MoviePath$) Local i%, SkipMessage$ Local MovieFile$ = "GFX\Menu\" + MoviePath Local Movie% = OpenMovie_Strict(MovieFile + ".wmv") - Local SplashScreenAudio% = StreamSound_Strict(MovieFile + ".ogg", opt\SFXVolume * opt\MasterVolume, 0) + Local SplashScreenAudio% = StreamSound_Strict(MovieFile + ".ogg", opt\SFXVolume * opt\MasterVolume, False) Repeat Cls() diff --git a/Source Code/Loading_Core.bb b/Source Code/Loading_Core.bb index 467610c1..869ad794 100644 --- a/Source Code/Loading_Core.bb +++ b/Source Code/Loading_Core.bb @@ -1369,7 +1369,7 @@ Music[33] = "860_1_Red" ;[End Block] Global MusicCHN% -MusicCHN = StreamSound_Strict("SFX\Music\" + Music[2] + ".ogg", opt\MusicVolume, Mode) +MusicCHN = StreamSound_Strict("SFX\Music\" + Music[2] + ".ogg", opt\MusicVolume) Global NowPlaying% = 2, ShouldPlay% = 11 Global CurrMusic% = True diff --git a/Source Code/Main_Core.bb b/Source Code/Main_Core.bb index 5aa2abd9..6b4d2cf7 100644 --- a/Source Code/Main_Core.bb +++ b/Source Code/Main_Core.bb @@ -8633,7 +8633,7 @@ Function UpdateEnding%() ShouldPlay = 22 opt\CurrMusicVolume = opt\MusicVolume StopStream_Strict(MusicCHN) : MusicCHN = 0 - MusicCHN = StreamSound_Strict("SFX\Music\" + Music[22] + ".ogg", opt\CurrMusicVolume * opt\MasterVolume, 0) + MusicCHN = StreamSound_Strict("SFX\Music\" + Music[22] + ".ogg", opt\CurrMusicVolume * opt\MasterVolume, False) NowPlaying = ShouldPlay PlaySound_Strict(snd_I\LightOffSFX) @@ -8667,7 +8667,7 @@ Function UpdateEnding%() If TempSounds[i] <> 0 Then FreeSound_Strict(TempSounds[i]) : TempSounds[i] = 0 Next StopStream_Strict(MusicCHN) : MusicCHN = 0 - MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0, Mode) + MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0) SetStreamVolume_Strict(MusicCHN, opt\MusicVolume * opt\MasterVolume) me\EndingTimer = -2000.0 ShouldDeleteGadgets = True diff --git a/Source Code/Sounds_Core.bb b/Source Code/Sounds_Core.bb index a0f1845d..c9343af1 100644 --- a/Source Code/Sounds_Core.bb +++ b/Source Code/Sounds_Core.bb @@ -118,7 +118,7 @@ Function UpdateMusic%() If NowPlaying < 66 If (Not CurrMusic) - MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0, Mode) + MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0) CurrMusic = True EndIf SetStreamVolume_Strict(MusicCHN, opt\CurrMusicVolume * opt\MasterVolume) @@ -461,7 +461,7 @@ Function PlayAnnouncement%(File$) ; ~ This function streams the announcement cur If (Not PlayerInReachableRoom(True, True)) Then Return If IntercomStreamCHN <> 0 Then StopStream_Strict(IntercomStreamCHN) : IntercomStreamCHN = 0 - IntercomStreamCHN = StreamSound_Strict(File, opt\VoiceVolume * opt\MasterVolume, 0) + IntercomStreamCHN = StreamSound_Strict(File, opt\VoiceVolume * opt\MasterVolume, False) End Function Function UpdateStreamSounds%() diff --git a/Source Code/Strict_Functions_Core.bb b/Source Code/Strict_Functions_Core.bb index 3ce99f5c..4e69a19d 100644 --- a/Source Code/Strict_Functions_Core.bb +++ b/Source Code/Strict_Functions_Core.bb @@ -135,10 +135,7 @@ Type Stream Field CHN% End Type -Const Mode% = 2 -Const TwoD% = 8192 - -Function StreamSound_Strict%(File$, Volume# = 1.0, CustomMode% = Mode) +Function StreamSound_Strict%(File$, Volume# = 1.0, Loop% = True) If FileType(lang\LanguagePath + File) = 1 Then File = lang\LanguagePath + File If FileType(File) <> 1 OpenConsoleOnError(Format(GetLocalString("runerr", "sound.notfound"), File)) @@ -147,14 +144,14 @@ Function StreamSound_Strict%(File$, Volume# = 1.0, CustomMode% = Mode) Local st.Stream = New Stream - st\CHN = PlayMusic(File, CustomMode + TwoD) + st\CHN = PlayMusic(File, Volume) If st\CHN = -1 OpenConsoleOnError(Format(Format(GetLocalString("runerr", "sound.stream.failed.n1"), File, "{0}"), st\CHN, "{1}")) Return(-1) EndIf - ChannelVolume(st\CHN, Volume) - + + ChannelLoop(st\CHN, Loop) CreateSubtitlesToken(File, Null) Return(Handle(st)) diff --git a/fmod.dll b/fmod.dll deleted file mode 100644 index 6b0e379d..00000000 Binary files a/fmod.dll and /dev/null differ