diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 7fe4b38..36ac10b 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -360,6 +360,16 @@ class FreeplayState extends MusicBeatState FlxG.sound.playMusic(Paths.inst(songs[curSelected].songName), 0); #end + var hmm; + try + { + hmm = songData.get(songs[curSelected].songName)[curDifficulty]; + if (hmm != null) + Conductor.changeBPM(hmm.bpm); + } + catch(ex) + {} + var bullShit:Int = 0; for (i in 0...iconArray.length) diff --git a/source/TitleState.hx b/source/TitleState.hx index 922570c..dadc361 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -110,34 +110,6 @@ class TitleState extends MusicBeatState function startIntro() { - if (!initialized) - { - var diamond:FlxGraphic = FlxGraphic.fromClass(GraphicTransTileDiamond); - diamond.persist = true; - diamond.destroyOnNoUse = false; - - FlxTransitionableState.defaultTransIn = new TransitionData(FADE, FlxColor.BLACK, 1, new FlxPoint(0, -1), {asset: diamond, width: 32, height: 32}, - new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4)); - FlxTransitionableState.defaultTransOut = new TransitionData(FADE, FlxColor.BLACK, 0.7, new FlxPoint(0, 1), - {asset: diamond, width: 32, height: 32}, new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4)); - - transIn = FlxTransitionableState.defaultTransIn; - transOut = FlxTransitionableState.defaultTransOut; - - // HAD TO MODIFY SOME BACKEND SHIT - // IF THIS PR IS HERE IF ITS ACCEPTED UR GOOD TO GO - // https://github.com/HaxeFlixel/flixel-addons/pull/348 - - // var music:FlxSound = new FlxSound(); - // music.loadStream(Paths.music('freakyMenu')); - // FlxG.sound.list.add(music); - // music.play(); - FlxG.sound.playMusic(Paths.music('freakyMenu'), 0); - - FlxG.sound.music.fadeIn(4, 0, 0.7); - } - - Conductor.changeBPM(102); persistentUpdate = true; var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK); @@ -146,23 +118,17 @@ class TitleState extends MusicBeatState // bg.updateHitbox(); add(bg); + logoBl = new FlxSprite(-150, 1500); if(Main.watermarks) { - logoBl = new FlxSprite(-150, 1500); logoBl.frames = Paths.getSparrowAtlas('KadeEngineLogoBumpin'); - logoBl.antialiasing = true; - logoBl.animation.addByPrefix('bump', 'logo bumpin', 24, false); - logoBl.updateHitbox(); - // logoBl.screenCenter(); - // logoBl.color = FlxColor.BLACK; } else { - logoBl = new FlxSprite(-150, -100); logoBl.frames = Paths.getSparrowAtlas('logoBumpin'); - logoBl.antialiasing = true; - logoBl.animation.addByPrefix('bump', 'logo bumpin', 24, false); - logoBl.updateHitbox(); - // logoBl.screenCenter(); - // logoBl.color = FlxColor.BLACK; } + logoBl.antialiasing = true; + logoBl.animation.addByPrefix('bump', 'logo bumpin', 24, false); + logoBl.updateHitbox(); + // logoBl.screenCenter(); + // logoBl.color = FlxColor.BLACK; gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07); gfDance.frames = Paths.getSparrowAtlas('gfDanceTitle'); @@ -218,8 +184,33 @@ class TitleState extends MusicBeatState if (initialized) skipIntro(); - else + else { + var diamond:FlxGraphic = FlxGraphic.fromClass(GraphicTransTileDiamond); + diamond.persist = true; + diamond.destroyOnNoUse = false; + + FlxTransitionableState.defaultTransIn = new TransitionData(FADE, FlxColor.BLACK, 1, new FlxPoint(0, -1), {asset: diamond, width: 32, height: 32}, + new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4)); + FlxTransitionableState.defaultTransOut = new TransitionData(FADE, FlxColor.BLACK, 0.7, new FlxPoint(0, 1), + {asset: diamond, width: 32, height: 32}, new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4)); + + transIn = FlxTransitionableState.defaultTransIn; + transOut = FlxTransitionableState.defaultTransOut; + + // HAD TO MODIFY SOME BACKEND SHIT + // IF THIS PR IS HERE IF ITS ACCEPTED UR GOOD TO GO + // https://github.com/HaxeFlixel/flixel-addons/pull/348 + + // var music:FlxSound = new FlxSound(); + // music.loadStream(Paths.music('freakyMenu')); + // FlxG.sound.list.add(music); + // music.play(); + FlxG.sound.playMusic(Paths.music('freakyMenu'), 0); + + FlxG.sound.music.fadeIn(4, 0, 0.7); + Conductor.changeBPM(102); initialized = true; + } // credGroup.add(credTextShit); }