From fe0198e3b867714e46fbf5dc9aa4b2d98d80a427 Mon Sep 17 00:00:00 2001 From: HackDev <80620538+Hackx2@users.noreply.github.com> Date: Sat, 29 Jun 2024 15:00:28 +0100 Subject: [PATCH] what the fuck dude --- TODO.md | 6 +++--- source/funkin/backend/system/MusicBeatState.hx | 4 ++++ source/funkin/game/Init.hx | 18 ++++++++---------- source/funkin/game/states/PlayState.hx | 5 +++-- source/funkin/game/states/TitleState.hx | 5 ----- source/funkin/game/states/VideoHandlerState.hx | 3 +++ 6 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 source/funkin/game/states/VideoHandlerState.hx diff --git a/TODO.md b/TODO.md index dc84dc5..bdd0117 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,8 @@ # ```TODO``` -* Make a macro to change the current version from github.com -* finish Init State. -* add bg to FPS (so it readable frfr) +* ~~finish Init State.~~ +* Finsh Video Handler State +* add winning icon support :3c OLD: * Might add winning icons (only if i can get the icons for them :3) diff --git a/source/funkin/backend/system/MusicBeatState.hx b/source/funkin/backend/system/MusicBeatState.hx index aa08464..cc3d0da 100644 --- a/source/funkin/backend/system/MusicBeatState.hx +++ b/source/funkin/backend/system/MusicBeatState.hx @@ -41,6 +41,10 @@ class MusicBeatState extends FlxUIState FlxTransitionableState.skipNextTransOut = false; } + public static function init() { + trace('Init Complete'); // Makes Sure MusicBeatState isnt null fr + } + public function addBehindObject(obj:FlxBasic, obj2:FlxBasic) return insert(members.indexOf(obj2), obj); diff --git a/source/funkin/game/Init.hx b/source/funkin/game/Init.hx index c2f6cb3..bd221f5 100644 --- a/source/funkin/game/Init.hx +++ b/source/funkin/game/Init.hx @@ -3,7 +3,7 @@ package funkin.game; import flixel.input.keyboard.FlxKey; import funkin.backend.utils.Paths; -class Init extends MusicBeatState +class Init extends flixel.FlxState { override public function create():Void { @@ -16,26 +16,24 @@ class Init extends MusicBeatState Paths.pushGlobalMods(); #end funkin.backend.data.WeekData.loadTheFirstEnabledMod(); - + Logs.init(); Volume.init(); funkin.backend.Highscore.load(); funkin.backend.utils.ClientPrefs.init(); + MusicBeatState.init(); #if DISCORD_ALLOWED DiscordClient.prepare(); #end - if (ClientPrefs.data.mouseEvents && !ClientPrefs.data.lowQuality) - FlxG.mouse.visible = true; - else - FlxG.mouse.visible = false; - super.create(); // Extra stuff goes here :3 + if (FlxG.save.data != null && FlxG.save.data.fullscreen) + FlxG.fullscreen = FlxG.save.data.fullscreen; - MusicBeatState.switchState(new TitleState()); + FlxG.switchState(new TitleState()); } } @@ -45,7 +43,7 @@ class Volume public static var volumeDownKeys:Array = [FlxKey.NUMPADMINUS, FlxKey.MINUS]; public static var volumeUpKeys:Array = [FlxKey.NUMPADPLUS, FlxKey.PLUS]; - public static function init() + public static function init():Void { FlxG.sound.muteKeys = muteKeys; FlxG.sound.volumeDownKeys = volumeDownKeys; @@ -58,7 +56,7 @@ class Logs // Modded trace func { private static final fuckbaby:String = "[Astro System]"; // prefix i guess - public static function init() + public static function init():Void { haxe.Log.trace = tracev2; } diff --git a/source/funkin/game/states/PlayState.hx b/source/funkin/game/states/PlayState.hx index 807e392..4b412d8 100644 --- a/source/funkin/game/states/PlayState.hx +++ b/source/funkin/game/states/PlayState.hx @@ -3335,9 +3335,10 @@ class PlayState extends MusicBeatState else iconP1.animation.curAnim.curFrame = 0; - if (healthBar.percent > 80) + if (healthBar.percent > 80){ iconP2.animation.curAnim.curFrame = 1; - else + iconP1.animation.curAnim.curFrame = 2; + } else iconP2.animation.curAnim.curFrame = 0; if (FlxG.keys.anyJustPressed(debugKeysCharacter) && !endingSong && !inCutscene) { diff --git a/source/funkin/game/states/TitleState.hx b/source/funkin/game/states/TitleState.hx index 81e427c..2a3d965 100644 --- a/source/funkin/game/states/TitleState.hx +++ b/source/funkin/game/states/TitleState.hx @@ -137,11 +137,6 @@ class TitleState extends MusicBeatState if (!initialized) { - if (FlxG.save.data != null && FlxG.save.data.fullscreen) - { - FlxG.fullscreen = FlxG.save.data.fullscreen; - // trace('LOADED FULLSCREEN SETTING!!'); - } persistentUpdate = true; persistentDraw = true; } diff --git a/source/funkin/game/states/VideoHandlerState.hx b/source/funkin/game/states/VideoHandlerState.hx new file mode 100644 index 0000000..e113e8e --- /dev/null +++ b/source/funkin/game/states/VideoHandlerState.hx @@ -0,0 +1,3 @@ +package funkin.game.states; + +// TODO: umm make video states easier :3 \ No newline at end of file