MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / start_audio_effect

Function start_audio_effect

src/SB/Game/zTalkBox.cpp:905–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903 { { "wait", 4 }, parse_tag_wait, NULL, (void*)trigger_wait },
904 };
905 static void start_audio_effect(ztalkbox& talk)
906 {
907 static bool registered = false;
908
909 if (!registered)
910 {
911 registered = true;
912 }
913
914 xDebugAddTweak("Temp|Talk Music Fade", &music_fade, 0.0f, 1.0f, NULL, NULL, 0);
915 xDebugAddTweak("Temp|Talk Music Fade Delay", &music_fade_delay, 0.0f, 10.0f, NULL, NULL, 0);
916
917 switch (talk.asset->audio_effect)
918 {
919 case 0:
920
921 break;
922 case 1:
923 zMusicSetVolume(music_fade, music_fade_delay);
924 break;
925 }
926
927 if (talk.asset->trap)
928 {
929 zEntPlayer_SNDStopStream();
930 }
931 }
932 static void stop_audio_effect()
933 {
934 if ((shared.active) && (shared.active->asset->audio_effect != 1))

Callers 1

activateFunction · 0.85

Calls 3

zMusicSetVolumeFunction · 0.85
zEntPlayer_SNDStopStreamFunction · 0.85
xDebugAddTweakFunction · 0.70

Tested by

no test coverage detected