From 368df4b82c34a5cbdfc3ca9ee74204613741521f Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Mon, 28 Nov 2022 21:48:30 +0100 Subject: [PATCH] z --- buildnumber.txt | 2 +- source/funkin/cutscenes/MP4Handler.hx | 4 +++- source/funkin/cutscenes/VideoCutscene.hx | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index e73f888e..57a2e3e3 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1324 \ No newline at end of file +1325 \ No newline at end of file diff --git a/source/funkin/cutscenes/MP4Handler.hx b/source/funkin/cutscenes/MP4Handler.hx index 23ca81af..185f297a 100644 --- a/source/funkin/cutscenes/MP4Handler.hx +++ b/source/funkin/cutscenes/MP4Handler.hx @@ -1,5 +1,6 @@ package funkin.cutscenes; +#if sys import vlc.bitmap.VlcBitmap; import flixel.util.FlxTimer; import funkin.options.PlayerSettings; @@ -172,4 +173,5 @@ class MP4Handler if (FlxG.sound.volume <= 0.1 || FlxG.sound.muted) bitmap.volume = 0; } -} \ No newline at end of file +} +#end \ No newline at end of file diff --git a/source/funkin/cutscenes/VideoCutscene.hx b/source/funkin/cutscenes/VideoCutscene.hx index 2c3b71bd..aabebb2a 100644 --- a/source/funkin/cutscenes/VideoCutscene.hx +++ b/source/funkin/cutscenes/VideoCutscene.hx @@ -9,8 +9,10 @@ class VideoCutscene extends Cutscene { var path:String; var localPath:String; + #if sys var video:MP4Handler; var videoSprite:FlxSprite; + #end var cutsceneCamera:FlxCamera; public function new(path:String, callback:Void->Void) { @@ -25,6 +27,7 @@ class VideoCutscene extends Cutscene { cutsceneCamera.bgColor = 0; FlxG.cameras.add(cutsceneCamera, false); + #if sys video = new MP4Handler(); video.finishCallback = close; video.canvasWidth = cutsceneCamera.width; @@ -36,12 +39,16 @@ class VideoCutscene extends Cutscene { add(videoSprite); video.playMP4(localPath, false, videoSprite); + #end cameras = [cutsceneCamera]; } public override function update(elapsed:Float) { super.update(elapsed); + #if !sys + close(); + #end } public override function destroy() { FlxG.cameras.remove(camera, true);