Skip to content

Commit

Permalink
what the fuck dude
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Jun 29, 2024
1 parent 8e5fdd9 commit fe0198e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 4 additions & 0 deletions source/funkin/backend/system/MusicBeatState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
18 changes: 8 additions & 10 deletions source/funkin/game/Init.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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());
}
}

Expand All @@ -45,7 +43,7 @@ class Volume
public static var volumeDownKeys:Array<FlxKey> = [FlxKey.NUMPADMINUS, FlxKey.MINUS];
public static var volumeUpKeys:Array<FlxKey> = [FlxKey.NUMPADPLUS, FlxKey.PLUS];

public static function init()
public static function init():Void
{
FlxG.sound.muteKeys = muteKeys;
FlxG.sound.volumeDownKeys = volumeDownKeys;
Expand All @@ -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;
}
Expand Down
5 changes: 3 additions & 2 deletions source/funkin/game/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions source/funkin/game/states/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions source/funkin/game/states/VideoHandlerState.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package funkin.game.states;

// TODO: umm make video states easier :3

0 comments on commit fe0198e

Please sign in to comment.