From 705d0ed5b975af83a5cc82799f2db391d23920e9 Mon Sep 17 00:00:00 2001 From: Eric Myllyoja Date: Sun, 12 Jun 2022 00:02:49 -0400 Subject: [PATCH] Updated hmm deps, no more forks! --- hmm.json | 15 +++------ source/funkin/Controls.hx | 33 ++++++++++--------- source/funkin/animate/TimelineFrame.hx | 4 +-- source/funkin/audiovis/SpectogramSprite.hx | 6 ++-- source/funkin/play/PicoFight.hx | 5 +-- source/funkin/ui/stageBuildShit/SprStage.hx | 4 +-- .../ui/stageBuildShit/StageBuilderState.hx | 6 ++-- 7 files changed, 33 insertions(+), 40 deletions(-) diff --git a/hmm.json b/hmm.json index a43055549..0f03b9155 100644 --- a/hmm.json +++ b/hmm.json @@ -7,18 +7,11 @@ "ref": "2d83fa8", "url": "https://github.com/Aidan63/linc_discord-rpc" }, - { - "name": "firetongue", - "type": "git", - "dir": null, - "ref": "c5666c8", - "url": "https://github.com/larsiusprime/firetongue" - }, { "name": "flixel", "type": "git", "dir": null, - "ref": "93a049d6", + "ref": "0637ac4", "url": "https://github.com/haxeflixel/flixel" }, { @@ -35,8 +28,8 @@ "name": "hscript", "type": "git", "dir": null, - "ref": "1f5c498", - "url": "https://github.com/mastereric/hscript" + "ref": "7124b6c", + "url": "https://github.com/HaxeFoundation/hscript" }, { "name": "hxcpp", @@ -62,7 +55,7 @@ "name": "polymod", "type": "git", "dir": null, - "ref": "cd4600c", + "ref": "4c2c949", "url": "https://github.com/larsiusprime/polymod" }, { diff --git a/source/funkin/Controls.hx b/source/funkin/Controls.hx index 31b2933f2..ef649f6c6 100644 --- a/source/funkin/Controls.hx +++ b/source/funkin/Controls.hx @@ -1,5 +1,6 @@ package funkin; +import flixel.util.FlxDirectionFlags; import flixel.FlxObject; import flixel.input.FlxInput; import flixel.input.actions.FlxAction; @@ -544,7 +545,7 @@ class Controls extends FlxActionSet forEachBound(control, function(action, state) addKeys(action, keys, state)); } - public function bindSwipe(control:Control, swipeDir:Int = FlxObject.UP, ?swpLength:Float = 90) + public function bindSwipe(control:Control, swipeDir:Int = FlxDirectionFlags.UP, ?swpLength:Float = 90) { forEachBound(control, function(action, press) action.add(new FlxActionInputDigitalMobileSwipeGameplay(swipeDir, press, swpLength))); } @@ -635,16 +636,16 @@ class Controls extends FlxActionSet #if FLX_TOUCH // MAKE BETTER TOUCH BIND CODE - bindSwipe(Control.NOTE_UP, FlxObject.UP, 40); - bindSwipe(Control.NOTE_DOWN, FlxObject.DOWN, 40); - bindSwipe(Control.NOTE_LEFT, FlxObject.LEFT, 40); - bindSwipe(Control.NOTE_RIGHT, FlxObject.RIGHT, 40); + bindSwipe(Control.NOTE_UP, FlxDirectionFlags.UP, 40); + bindSwipe(Control.NOTE_DOWN, FlxDirectionFlags.DOWN, 40); + bindSwipe(Control.NOTE_LEFT, FlxDirectionFlags.LEFT, 40); + bindSwipe(Control.NOTE_RIGHT, FlxDirectionFlags.RIGHT, 40); // feels more like drag when up/down are inversed - bindSwipe(Control.UI_UP, FlxObject.DOWN); - bindSwipe(Control.UI_DOWN, FlxObject.UP); - bindSwipe(Control.UI_LEFT, FlxObject.LEFT); - bindSwipe(Control.UI_RIGHT, FlxObject.RIGHT); + bindSwipe(Control.UI_UP, FlxDirectionFlags.DOWN); + bindSwipe(Control.UI_DOWN, FlxDirectionFlags.UP); + bindSwipe(Control.UI_LEFT, FlxDirectionFlags.LEFT); + bindSwipe(Control.UI_RIGHT, FlxDirectionFlags.RIGHT); #end #if android @@ -870,7 +871,7 @@ class FlxActionInputDigitalMobileSwipeGameplay extends FlxActionInputDigital var activateLength:Float = 90; var hapticPressure:Int = 100; - public function new(swipeDir:Int = FlxObject.ANY, Trigger:FlxInputState, ?swipeLength:Float = 90) + public function new(swipeDir:Int = FlxDirectionFlags.ANY, Trigger:FlxInputState, ?swipeLength:Float = 90) { super(OTHER, swipeDir, Trigger); @@ -933,9 +934,9 @@ class FlxActionInputDigitalMobileSwipeGameplay extends FlxActionInputDigital /* switch (inputID) { - case FlxObject.UP: + case FlxDirectionFlags.UP: return - case FlxObject.DOWN: + case FlxDirectionFlags.DOWN: } */ } @@ -955,13 +956,13 @@ class FlxActionInputDigitalMobileSwipeGameplay extends FlxActionInputDigital { switch (inputID) { - case FlxObject.UP: + case FlxDirectionFlags.UP: if (degAngle >= 45 && degAngle <= 90 + 45) return properTouch(swp); - case FlxObject.DOWN: + case FlxDirectionFlags.DOWN: if (-degAngle >= 45 && -degAngle <= 90 + 45) return properTouch(swp); - case FlxObject.LEFT: + case FlxDirectionFlags.LEFT: if (degAngle <= 45 && -degAngle <= 45) return properTouch(swp); - case FlxObject.RIGHT: + case FlxDirectionFlags.RIGHT: if (degAngle >= 90 + 45 && degAngle <= -90 + -45) return properTouch(swp); } } diff --git a/source/funkin/animate/TimelineFrame.hx b/source/funkin/animate/TimelineFrame.hx index dbd5bfc7a..8cae38d76 100644 --- a/source/funkin/animate/TimelineFrame.hx +++ b/source/funkin/animate/TimelineFrame.hx @@ -2,7 +2,7 @@ package funkin.animate; import funkin.animate.ParseAnimate.Frame; import flixel.FlxSprite; -import flixel.input.mouse.FlxMouseEventManager; +import flixel.input.mouse.FlxMouseEvent; import flixel.util.FlxColor; class TimelineFrame extends FlxSprite @@ -17,7 +17,7 @@ class TimelineFrame extends FlxSprite makeGraphic((10 * length) + (2 * (length - 1)), 10, FlxColor.RED); - FlxMouseEventManager.add(this, null, null, function(spr:TimelineFrame) + FlxMouseEvent.add(this, null, null, function(spr:TimelineFrame) { alpha = 0.5; }, function(spr:TimelineFrame) diff --git a/source/funkin/audiovis/SpectogramSprite.hx b/source/funkin/audiovis/SpectogramSprite.hx index b3cb6ff62..89a57cbd9 100644 --- a/source/funkin/audiovis/SpectogramSprite.hx +++ b/source/funkin/audiovis/SpectogramSprite.hx @@ -113,7 +113,7 @@ class SpectogramSprite extends FlxTypedSpriteGroup prevLine.x = (curAud.balanced * swagheight / 2 + swagheight / 2) + x; prevLine.y = (i / group.members.length * daHeight) + y; - var line = FlxVector.get(prevLine.x - group.members[i].x, prevLine.y - group.members[i].y); + var line = FlxPoint.get(prevLine.x - group.members[i].x, prevLine.y - group.members[i].y); group.members[i].setGraphicSize(Std.int(Math.max(line.length, 1)), Std.int(1)); group.members[i].angle = line.degrees; @@ -230,7 +230,7 @@ class SpectogramSprite extends FlxTypedSpriteGroup prevLine.x = (freqIDK * swagheight / 2 + swagheight / 2) + x; prevLine.y = (i / group.members.length * daHeight) + y; - var line = FlxVector.get(prevLine.x - group.members[i].x, prevLine.y - group.members[i].y); + var line = FlxPoint.get(prevLine.x - group.members[i].x, prevLine.y - group.members[i].y); // dont draw a line until i figure out a nicer way to view da spikes and shit idk lol! // group.members[i].setGraphicSize(Std.int(Math.max(line.length, 1)), Std.int(1)); @@ -290,7 +290,7 @@ class SpectogramSprite extends FlxTypedSpriteGroup prevLine.x = (curAud.balanced * swagheight / 2 + swagheight / 2) + x; prevLine.y = (Std.int(remappedSample) / lengthOfShit * daHeight) + y; - var line = FlxVector.get(prevLine.x - group.members[Std.int(remappedSample)].x, prevLine.y - group.members[Std.int(remappedSample)].y); + var line = FlxPoint.get(prevLine.x - group.members[Std.int(remappedSample)].x, prevLine.y - group.members[Std.int(remappedSample)].y); group.members[Std.int(remappedSample)].setGraphicSize(Std.int(Math.max(line.length, 1)), Std.int(1)); group.members[Std.int(remappedSample)].angle = line.degrees; diff --git a/source/funkin/play/PicoFight.hx b/source/funkin/play/PicoFight.hx index a5dddac3a..0cc72932d 100644 --- a/source/funkin/play/PicoFight.hx +++ b/source/funkin/play/PicoFight.hx @@ -8,6 +8,7 @@ import flixel.math.FlxMath; import flixel.util.FlxColor; import funkin.Note.NoteData; import funkin.audiovis.PolygonSpectogram; +import flixel.util.FlxDirectionFlags; class PicoFight extends MusicBeatState { @@ -88,12 +89,12 @@ class PicoFight extends MusicBeatState if (notes.strumTime < Conductor.songPosition + (Conductor.crochet * 4)) { spawnNote(notes); - spawnNote(notes, FlxObject.RIGHT); + spawnNote(notes, FlxDirectionFlags.RIGHT); } } } - function spawnNote(note:NoteData, facing:Int = FlxObject.LEFT) + function spawnNote(note:NoteData, facing:Int = FlxDirectionFlags.LEFT) { var spr:FlxSprite = new FlxSprite(0, (FlxG.height / 2) - 60).makeGraphic(10, 120, Note.codeColors[note.noteData]); spr.ID = Std.int(note.strumTime); // using ID as strum, lol! diff --git a/source/funkin/ui/stageBuildShit/SprStage.hx b/source/funkin/ui/stageBuildShit/SprStage.hx index 95eba9325..23387aedd 100644 --- a/source/funkin/ui/stageBuildShit/SprStage.hx +++ b/source/funkin/ui/stageBuildShit/SprStage.hx @@ -1,7 +1,7 @@ package funkin.ui.stageBuildShit; import flixel.FlxSprite; -import flixel.input.mouse.FlxMouseEventManager; +import flixel.input.mouse.FlxMouseEvent; import flixel.math.FlxPoint; class SprStage extends FlxSprite @@ -18,7 +18,7 @@ class SprStage extends FlxSprite { super(x, y); - FlxMouseEventManager.add(this, dragShitFunc, null, function(spr:SprStage) + FlxMouseEvent.add(this, dragShitFunc, null, function(spr:SprStage) { if (isSelected() || StageBuilderState.curTool == SELECT) alpha = 0.5; diff --git a/source/funkin/ui/stageBuildShit/StageBuilderState.hx b/source/funkin/ui/stageBuildShit/StageBuilderState.hx index 5ebb6df57..3d9a555a0 100644 --- a/source/funkin/ui/stageBuildShit/StageBuilderState.hx +++ b/source/funkin/ui/stageBuildShit/StageBuilderState.hx @@ -5,7 +5,7 @@ import flixel.FlxSprite; import flixel.addons.display.FlxGridOverlay; import flixel.group.FlxGroup; import flixel.input.mouse.FlxMouseButton.FlxMouseButtonID; -import flixel.input.mouse.FlxMouseEventManager; +import flixel.input.mouse.FlxMouseEvent; import flixel.math.FlxPoint; import flixel.text.FlxText; import flixel.ui.FlxButton; @@ -93,8 +93,6 @@ class StageBuilderState extends MusicBeatState var saveSceneBtn:FlxButton = new FlxButton(20, 50, "Save Scene", saveScene); hudGrp.add(saveSceneBtn); - FlxMouseEventManager.init(); - #if desktop FlxG.stage.window.onDropFile.add(function(path:String) { @@ -424,7 +422,7 @@ class StageBuilderState extends MusicBeatState { sprGrp.sort(daLayerSorting, FlxSort.ASCENDING); - FlxMouseEventManager.reorder(); + FlxMouseEvent.reorder(); } function daLayerSorting(order:Int = FlxSort.ASCENDING, layer1:SprStage, layer2:SprStage):Int