From 416be99967eb3eecb237615372d045e9ad8731c0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 8 Oct 2022 09:54:12 +0200 Subject: [PATCH] - fixed: SW's intro video must not stop playing music. --- source/common/cutscenes/movieplayer.cpp | 1 + wadsrc/static/zscript/engine/screenjob.zs | 3 ++- wadsrc/static/zscript/games/sw/ui/screens.zs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/common/cutscenes/movieplayer.cpp b/source/common/cutscenes/movieplayer.cpp index afd710e2c..a13d0c91e 100644 --- a/source/common/cutscenes/movieplayer.cpp +++ b/source/common/cutscenes/movieplayer.cpp @@ -55,6 +55,7 @@ protected: { NOSOUNDCUTOFF = 1, FIXEDVIEWPORT = 2, // Forces fixed 640x480 screen size like for Blood's intros. + NOMUSICCUTOFF = 4, }; int flags; diff --git a/wadsrc/static/zscript/engine/screenjob.zs b/wadsrc/static/zscript/engine/screenjob.zs index 62f86bda4..71345f709 100644 --- a/wadsrc/static/zscript/engine/screenjob.zs +++ b/wadsrc/static/zscript/engine/screenjob.zs @@ -204,6 +204,7 @@ struct MoviePlayer native { NOSOUNDCUTOFF = 1, FIXEDVIEWPORT = 2, // Forces fixed 640x480 screen size like for Blood's intros. + NOMUSICCUTOFF = 4, } native static MoviePlayer Create(String filename, Array soundinfo, int flags, int frametime, int firstframetime, int lastframetime); @@ -236,7 +237,7 @@ class MoviePlayerJob : SkippableScreenJob override void Start() { - System.StopMusic(); + if (!(flag & MoviePlayer.NOMUSICCUTOFF)) System.StopMusic(); } diff --git a/wadsrc/static/zscript/games/sw/ui/screens.zs b/wadsrc/static/zscript/games/sw/ui/screens.zs index 9ae4e279f..364c92e49 100644 --- a/wadsrc/static/zscript/games/sw/ui/screens.zs +++ b/wadsrc/static/zscript/games/sw/ui/screens.zs @@ -381,7 +381,7 @@ class SWCutscenes ui 5, SWSnd.DIGI_INTRO_SLASH, 15, SWSnd.DIGI_INTRO_WHIRL); runner.Append(new("SWDRealmsScreen").Init()); - runner.Append(MoviePlayerJob.CreateWithSoundinfo("sw.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 8, 360, 128)); + runner.Append(MoviePlayerJob.CreateWithSoundinfo("sw.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF | MoviePlayer.NOMUSICCUTOFF, 8, 360, 128)); } }