diff --git a/source/funkin/InitState.hx b/source/funkin/InitState.hx index eeffebdb1..6c465be9c 100644 --- a/source/funkin/InitState.hx +++ b/source/funkin/InitState.hx @@ -24,6 +24,7 @@ import funkin.play.song.SongData.SongDataParser; import funkin.play.stage.StageData.StageDataParser; import funkin.play.character.CharacterData.CharacterDataParser; import funkin.modding.module.ModuleHandler; +import funkin.ui.title.TitleState; #if discord_rpc import Discord.DiscordClient; #end diff --git a/source/funkin/MainMenuState.hx b/source/funkin/MainMenuState.hx index 2c251635c..ab2e0e560 100644 --- a/source/funkin/MainMenuState.hx +++ b/source/funkin/MainMenuState.hx @@ -22,6 +22,7 @@ import funkin.shaderslmfao.ScreenWipeShader; import funkin.ui.AtlasMenuList; import funkin.ui.MenuList.MenuItem; import funkin.ui.MenuList; +import funkin.ui.title.TitleState; import funkin.ui.story.StoryMenuState; import funkin.ui.OptionsState; import funkin.ui.PreferencesMenu; diff --git a/source/funkin/TitleState.hx b/source/funkin/ui/title/TitleState.hx similarity index 91% rename from source/funkin/TitleState.hx rename to source/funkin/ui/title/TitleState.hx index 8ba5121fa..3cd060a37 100644 --- a/source/funkin/TitleState.hx +++ b/source/funkin/ui/title/TitleState.hx @@ -192,7 +192,6 @@ class TitleState extends MusicBeatState else initialized = true; - if (FlxG.sound.music != null) FlxG.sound.music.onComplete = function() FlxG.switchState(new VideoState()); } function playMenuMusic():Void @@ -304,50 +303,19 @@ class TitleState extends MusicBeatState var targetState:FlxState = new MainMenuState(); - #if newgrounds - if (!OutdatedSubState.leftState) - { - NGio.checkVersion(function(version) { - // Check if version is outdated - var localVersion:String = "v" + Application.current.meta.get('version'); - var onlineVersion = version.split(" ")[0].trim(); - if (version.trim() != onlineVersion) - { - trace('OLD VERSION!'); - // targetState = new OutdatedSubState(); - } - else - { - // targetState = new MainMenuState(); - } - // REDO FOR ITCH/FINAL SHIT - }); - } - #end new FlxTimer().start(2, function(tmr:FlxTimer) { // These assets are very unlikely to be used for the rest of gameplay, so it unloads them from cache/memory // Saves about 50mb of RAM or so??? - Assets.cache.clear(Paths.image('gfDanceTitle')); - Assets.cache.clear(Paths.image('logoBumpin')); - Assets.cache.clear(Paths.image('titleEnter')); + // TODO: This BREAKS the title screen if you return back to it! Figure out how to fix that. + // Assets.cache.clear(Paths.image('gfDanceTitle')); + // Assets.cache.clear(Paths.image('logoBumpin')); + // Assets.cache.clear(Paths.image('titleEnter')); // ngSpr?? FlxG.switchState(targetState); }); // FlxG.sound.play(Paths.music('titleShoot'), 0.7); } if (pressedEnter && !skippedIntro && initialized) skipIntro(); - /* - #if web - if (!initialized && controls.ACCEPT) - { - // netStream.dispose(); - // FlxG.stage.removeChild(video); - - startIntro(); - skipIntro(); - } - #end - */ if (controls.UI_LEFT) swagShader.update(-elapsed * 0.1); if (controls.UI_RIGHT) swagShader.update(elapsed * 0.1); @@ -358,12 +326,6 @@ class TitleState extends MusicBeatState override function draw() { super.draw(); - - // if (gfDance != null) - // { - // trace(gfDance.frame.uv); - // maskShader.frameUV = gfDance.frame.uv; - // } } var cheatArray:Array = [0x0001, 0x0010, 0x0001, 0x0010, 0x0100, 0x1000, 0x0100, 0x1000];