diff --git a/assets/videos/bambiStartup.mp4 b/assets/splash/videos/bambiStartup.mp4 similarity index 100% rename from assets/videos/bambiStartup.mp4 rename to assets/splash/videos/bambiStartup.mp4 diff --git a/assets/videos/broCopiedDenpa.mp4 b/assets/splash/videos/broCopiedDenpa.mp4 similarity index 100% rename from assets/videos/broCopiedDenpa.mp4 rename to assets/splash/videos/broCopiedDenpa.mp4 diff --git a/assets/videos/haxe.mp4 b/assets/splash/videos/haxe.mp4 similarity index 100% rename from assets/videos/haxe.mp4 rename to assets/splash/videos/haxe.mp4 diff --git a/assets/splash/videos/oops.mp4 b/assets/splash/videos/oops.mp4 new file mode 100644 index 00000000000..14758ab5751 Binary files /dev/null and b/assets/splash/videos/oops.mp4 differ diff --git a/source/Paths.hx b/source/Paths.hx index 2ead89de3e3..c8e9f80a8a5 100644 --- a/source/Paths.hx +++ b/source/Paths.hx @@ -451,7 +451,7 @@ class Paths return getPath('$key.lua', TEXT, library); } //Video loading (part of it) - static public function video(key:String) + static public function video(key:String, ?library:String = null) { #if MODS_ALLOWED var file:String = modsVideo(key); @@ -459,7 +459,7 @@ class Paths return file; } #end - return 'assets/videos/$key.$VIDEO_EXT'; + return 'assets/${(library != null) ? '$library/' : ''}videos/$key.$VIDEO_EXT'; } //Sound loading. static public function sound(key:String, ?library:String):Sound diff --git a/source/StartupState.hx b/source/StartupState.hx index 752cf36f31b..57f91b29407 100644 --- a/source/StartupState.hx +++ b/source/StartupState.hx @@ -20,11 +20,13 @@ class StartupState extends MusicBeatState var skipTxt:FlxText; var maxIntros:Int = 3; + var maxSecretIntros:Int = -1; // trolley override public function create():Void { - #if VIDEOS_ALLOWED maxIntros += 2; #end + #if VIDEOS_ALLOWED maxIntros = maxSecretIntros += 2; #end var theIntro:Int = FlxG.random.int(0, maxIntros); + var theSecretIntro:Int = FlxG.random.int(0, maxSecretIntros); FlxTransitionableState.skipNextTransIn = true; FlxTransitionableState.skipNextTransOut = true; logo = new FlxSprite().loadGraphic(Paths.image('sillyLogo', 'splash')); @@ -46,7 +48,7 @@ class StartupState extends MusicBeatState FlxTween.tween(skipTxt, {alpha: 1}, 1); new FlxTimer().start(0.1, function(tmr:FlxTimer) { - if (!FlxG.random.bool(0.1)){ + /*if (!FlxG.random.bool(0.25)){ switch (theIntro) { case 0: FlxG.sound.play(Paths.sound('startup', 'splash')); @@ -83,8 +85,16 @@ class StartupState extends MusicBeatState playVideo('broCopiedDenpa'); } } - else - playVideo('haxe'); // Lily wanted this + else*/ + { + switch (theSecretIntro) + { + case 1: + playVideo('haxe'); + default: + playVideo('oops'); + } + } }); super.create(); @@ -96,7 +106,7 @@ class StartupState extends MusicBeatState #if VIDEOS_ALLOWED var vidSprite = new MP4Handler(); // it plays but it doesn't show??? #if (hxCodec < "3.0.0") - vidSprite.playVideo(Paths.video(name), false, false); + vidSprite.playVideo(Paths.video(name, 'splash'), false, false); vidSprite.finishCallback = function() { try { vidSprite.dispose(); } @@ -107,7 +117,7 @@ class StartupState extends MusicBeatState FlxG.switchState(TitleState.new); }; #else - vidSprite.play(Paths.video(name)); + vidSprite.play(Paths.video(name, 'splash')); vidSprite.onEndReached.add(function(){ vidSprite.dispose(); if (callback != null)