Cleanup cinematics.cpp

Don't stop main sound subsystem as it now not interfere MVE playback. Removed unused debug variable.
This commit is contained in:
Azamat H. Hackimov 2024-07-07 04:09:19 +03:00
parent 9672475f70
commit def4737f53

View File

@ -30,14 +30,6 @@
#include <cstring>
#ifdef DEBUG
static struct {
float last_frame_time;
float frame_interval_time;
float fps;
} MovieCallbackData;
#endif
static bool Cinematic_lib_init = false;
static int Cinematic_x = 0, Cinematic_y = 0, Cinematic_w = 0, Cinematic_h = 0;
@ -87,19 +79,6 @@ bool PlayMovie(const std::filesystem::path &moviename) {
filename.replace_extension(extension.u8string() + ".mve");
}
// shutdown sound.
bool sound_sys_active = Sound_system.IsActive();
if (sound_sys_active) {
Sound_system.KillSoundLib(false);
}
// start movie.
#ifdef DEBUG
MovieCallbackData.last_frame_time = timer_GetTime();
MovieCallbackData.frame_interval_time = 1.0f;
MovieCallbackData.fps = 0.0f;
#endif
// Initializes the subtitles for a given movie file
SubtInitSubtitles(moviename);
@ -116,11 +95,6 @@ bool PlayMovie(const std::filesystem::path &moviename) {
retval = false;
}
// startup D3 sound.
if (sound_sys_active) {
Sound_system.InitSoundLib(Descent, Sound_mixer, Sound_quality, false);
}
return retval;
}