diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 3a0b97eb..c5376442 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1422,14 +1422,12 @@ class PlayState extends MusicBeatState __pressed.clear(); __justPressed.clear(); __justReleased.clear(); - - // TODO: player identifier in event __pressed.pushGroup(p.controls.NOTE_LEFT, p.controls.NOTE_DOWN, p.controls.NOTE_UP, p.controls.NOTE_RIGHT); __justPressed.pushGroup(p.controls.NOTE_LEFT_P, p.controls.NOTE_DOWN_P, p.controls.NOTE_UP_P, p.controls.NOTE_RIGHT_P); __justReleased.pushGroup(p.controls.NOTE_LEFT_R, p.controls.NOTE_DOWN_R, p.controls.NOTE_UP_R, p.controls.NOTE_RIGHT_R); - var event = scripts.event("onKeyShit", EventManager.get(InputSystemEvent).recycle(__pressed, __justPressed, __justReleased)); + var event = scripts.event("onKeyShit", EventManager.get(InputSystemEvent).recycle(__pressed, __justPressed, __justReleased, p, id)); if (event.cancelled) return; __pressed = CoolUtil.getDefault(event.pressed, []); diff --git a/source/funkin/game/Stage.hx b/source/funkin/game/Stage.hx index ecfe913d..76709338 100644 --- a/source/funkin/game/Stage.hx +++ b/source/funkin/game/Stage.hx @@ -64,7 +64,6 @@ class Stage extends FlxBasic implements IBeatReceiver { state.add(spr); spr; case "box": - trace('HOLY FUCK BOX DETECTED'); // TODO: someone help this aint doing shit!! >:( if ( !node.has.name || !node.has.width || !node.has.height) continue; var spr = new FlxSprite( @@ -73,11 +72,9 @@ class Stage extends FlxBasic implements IBeatReceiver { ).makeGraphic( Std.parseInt(node.att.width), Std.parseInt(node.att.height), - (node.has.color) ? Std.parseInt(node.att.color) : 0xFFFFFFFF + (node.has.color) ? CoolUtil.getColorFromDynamic(node.att.color) : 0xFFFFFFFF ); - trace(node.att.name, node.att.width, node.att.height); - stageSprites.set(node.getAtt("name"), spr); state.add(spr); spr; diff --git a/source/funkin/menus/TitleState.hx b/source/funkin/menus/TitleState.hx index 16e95b4e..641da17a 100644 --- a/source/funkin/menus/TitleState.hx +++ b/source/funkin/menus/TitleState.hx @@ -78,13 +78,15 @@ class TitleState extends MusicBeatState loadXML(); #end - titleText = new FlxSprite(100, FlxG.height * 0.8); - titleText.frames = Paths.getFrames('menus/titlescreen/titleEnter'); - titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24); - titleText.animation.addByPrefix('press', "ENTER PRESSED", 24); - titleText.antialiasing = true; - titleText.animation.play('idle'); - titleText.updateHitbox(); + if (titleText == null) { + titleText = new FlxSprite(100, FlxG.height * 0.8); + titleText.frames = Paths.getFrames('menus/titlescreen/titleEnter'); + titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24); + titleText.animation.addByPrefix('press', "ENTER PRESSED", 24); + titleText.antialiasing = true; + titleText.animation.play('idle'); + titleText.updateHitbox(); + } add(titleText); textGroup = new FlxGroup(); @@ -287,7 +289,8 @@ class TitleState extends MusicBeatState for(sprNode in node.elements) { var spr = XMLUtil.createSpriteFromXML(sprNode, parentFolder); switch(node.name) { - // TODO: press enter to begin customisation + case "press-enter": + titleText = spr; default: titleScreenSprites.add(spr); } diff --git a/source/funkin/menus/credits/CreditsMain.hx b/source/funkin/menus/credits/CreditsMain.hx index 5e7fc153..d059f7e5 100644 --- a/source/funkin/menus/credits/CreditsMain.hx +++ b/source/funkin/menus/credits/CreditsMain.hx @@ -23,4 +23,8 @@ class CreditsMain extends OptionsScreen { ]; super.create(); } + + public override function exit() { + FlxG.switchState(new MainMenuState()); + } } \ No newline at end of file diff --git a/source/funkin/options/categories/MiscOptions.hx b/source/funkin/options/categories/MiscOptions.hx index 3be2b7e1..0608f94d 100644 --- a/source/funkin/options/categories/MiscOptions.hx +++ b/source/funkin/options/categories/MiscOptions.hx @@ -27,7 +27,7 @@ class MiscOptions extends OptionsScreen { "Reset Save Data", "Select this option to reset save data. This will remove all of your highscores", function() { - // TODO!! + }) ]; super.create(); diff --git a/source/funkin/scripting/events/InputSystemEvent.hx b/source/funkin/scripting/events/InputSystemEvent.hx index 1a676e1a..0b913e39 100644 --- a/source/funkin/scripting/events/InputSystemEvent.hx +++ b/source/funkin/scripting/events/InputSystemEvent.hx @@ -1,5 +1,7 @@ package funkin.scripting.events; +import funkin.game.StrumLine; + class InputSystemEvent extends CancellableEvent { /** * Array containing whenever a specific control is pressed or not. @@ -18,4 +20,14 @@ class InputSystemEvent extends CancellableEvent { * For example, `justReleased[0]` will return whenever the left strum was just released. */ public var justReleased:Array; + + /** + * Strumline which input is being processed. + */ + public var strumLine:StrumLine; + + /** + * ID of the Strumline. + */ + public var strumLineID:Int; } \ No newline at end of file diff --git a/source/funkin/system/CommandLineHandler.hx b/source/funkin/system/CommandLineHandler.hx index af94cd3d..ff92b6b9 100644 --- a/source/funkin/system/CommandLineHandler.hx +++ b/source/funkin/system/CommandLineHandler.hx @@ -25,7 +25,7 @@ class CommandLineHandler { Sys.println("[ERROR] You need to specify the mod name"); Sys.exit(0); } else { - // TODO + Main.modToLoad = arg.trim(); } case "-modfolder": i++; diff --git a/source/funkin/system/Main.hx b/source/funkin/system/Main.hx index c5b4c304..e4e3cf54 100644 --- a/source/funkin/system/Main.hx +++ b/source/funkin/system/Main.hx @@ -32,13 +32,14 @@ import sys.thread.Thread; #if sys import sys.io.File; #end -// TODO: REMOVE TEST import funkin.mods.ModsFolder; class Main extends Sprite { public static var instance:Main; + public static var modToLoad:String = null; + public static var scaleMode:FunkinRatioScaleMode; var gameWidth:Int = 1280; // Width of the game in pixels (might be less / more in actual pixels depending on your zoom). @@ -212,7 +213,7 @@ class Main extends Sprite FlxG.signals.postStateSwitch.add(onStateSwitchPost); #if MOD_SUPPORT - ModsFolder.switchMod(Options.lastLoadedMod); + ModsFolder.switchMod(modToLoad.getDefault(Options.lastLoadedMod)); #end initTransition();