diff --git a/source/funkin/InitState.hx b/source/funkin/InitState.hx index 5e69f58b9..399f52498 100644 --- a/source/funkin/InitState.hx +++ b/source/funkin/InitState.hx @@ -245,9 +245,9 @@ class InitState extends FlxState #elseif LEVEL // -DLEVEL=week1 -DDIFFICULTY=hard startLevel(defineLevel(), defineDifficulty()); #elseif FREEPLAY // -DFREEPLAY - FlxG.switchState(new FreeplayState()); + FlxG.switchState(() -> new funkin.ui.freeplay.FreeplayState()); #elseif DIALOGUE // -DDIALOGUE - FlxG.switchState(new funkin.ui.debug.dialogue.ConversationDebugState()); + FlxG.switchState(() -> new funkin.ui.debug.dialogue.ConversationDebugState()); #elseif ANIMATE // -DANIMATE FlxG.switchState(() -> new funkin.ui.debug.anim.FlxAnimateTest()); #elseif WAVEFORM // -DWAVEFORM diff --git a/source/funkin/audio/SoundGroup.hx b/source/funkin/audio/SoundGroup.hx index df3a67ae1..0e81a0901 100644 --- a/source/funkin/audio/SoundGroup.hx +++ b/source/funkin/audio/SoundGroup.hx @@ -192,7 +192,7 @@ class SoundGroup extends FlxTypedGroup function get_playing():Bool { - if (getFirstAlive != null) return getFirstAlive().playing; + if (getFirstAlive() != null) return getFirstAlive().playing; else return false; } diff --git a/source/funkin/graphics/shaders/BlendModesShader.hx b/source/funkin/graphics/shaders/BlendModesShader.hx index acd2c1586..b7a405dd1 100644 --- a/source/funkin/graphics/shaders/BlendModesShader.hx +++ b/source/funkin/graphics/shaders/BlendModesShader.hx @@ -4,20 +4,22 @@ import flixel.addons.display.FlxRuntimeShader; import funkin.Paths; import openfl.utils.Assets; import openfl.display.BitmapData; +import openfl.display.ShaderInput; class BlendModesShader extends FlxRuntimeShader { - public var camera:BitmapData; + public var camera:ShaderInput; + public var cameraData:BitmapData; public function new() { super(Assets.getText(Paths.frag('blendModes'))); } - public function setCamera(camera:BitmapData):Void + public function setCamera(cameraData:BitmapData):Void { - this.camera = camera; + this.cameraData = cameraData; - this.setBitmapData('camera', camera); + this.setBitmapData('camera', this.cameraData); } } diff --git a/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx b/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx index 6c5152a29..376d0cebd 100644 --- a/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx +++ b/source/funkin/ui/debug/charting/commands/CopyItemsCommand.hx @@ -138,7 +138,7 @@ class CopyItemsCommand implements ChartEditorCommand state.txtCopyNotif.y = FlxG.mouse.y - 16; FlxTween.tween(state.txtCopyNotif, {y: state.txtCopyNotif.y - 32}, 0.5, { - type: FlxTween.ONESHOT, + type: FlxTweenType.ONESHOT, ease: FlxEase.quadOut, onComplete: function(_) { state.txtCopyNotif.visible = false; diff --git a/source/funkin/ui/story/StoryMenuState.hx b/source/funkin/ui/story/StoryMenuState.hx index 2f0111841..1905a7c57 100644 --- a/source/funkin/ui/story/StoryMenuState.hx +++ b/source/funkin/ui/story/StoryMenuState.hx @@ -509,10 +509,10 @@ class StoryMenuState extends MusicBeatState // super.dispatchEvent(event) dispatches event to module scripts. super.dispatchEvent(event); - if (levelProps != null && levelProps.length > 0) + if (levelProps?.members != null && levelProps.members.length > 0) { // Dispatch event to props. - for (prop in levelProps) + for (prop in levelProps.members) { ScriptEventDispatcher.callEvent(prop, event); }