diff --git a/assets/data/charts/milf/bump.hx b/assets/data/charts/milf/bump.hx index c0fb462e..750d8770 100644 --- a/assets/data/charts/milf/bump.hx +++ b/assets/data/charts/milf/bump.hx @@ -5,8 +5,4 @@ function beatHit(curBeat:Int) { case 200: camZoomingInterval = 4; } -} - -function onPlayerHit(event:NoteHitEvent) { - event.direction = 3 - event.direction; } \ No newline at end of file diff --git a/buildnumber.txt b/buildnumber.txt index 551f8ca3..bc6a950b 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -562 \ No newline at end of file +569 \ No newline at end of file diff --git a/source/funkin/desktop/WindowContentSprite.hx b/source/funkin/desktop/WindowContentSprite.hx index c8a2b8b9..20b9d202 100644 --- a/source/funkin/desktop/WindowContentSprite.hx +++ b/source/funkin/desktop/WindowContentSprite.hx @@ -20,7 +20,7 @@ class WindowContentSprite extends FlxSprite { public override function update(elapsed:Float) { super.update(elapsed); - cam.render() + // cam.render() } public override function draw() { super.draw(); diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx index f7d41e7d..d0dfdae9 100644 --- a/source/funkin/game/Note.hx +++ b/source/funkin/game/Note.hx @@ -5,6 +5,7 @@ import flixel.graphics.frames.FlxAtlasFrames; import flixel.math.FlxMath; import flixel.util.FlxColor; import flixel.math.FlxRect; +import flixel.math.FlxPoint; import funkin.system.Conductor; #if polymod import polymod.format.ParseRules.TargetSignatureElement; @@ -180,6 +181,32 @@ class Note extends FlxSprite } } + public var angleOffsets:Bool = true; + + override function draw() { + if (angleOffsets && Std.int(angle % 360) != 0) { + var oldOffset = FlxPoint.get(offset.x, offset.y); + // var oldOrigin = FlxPoint.get(origin.x, origin.y); + + offset.set( + (Math.cos(angle / 180 * Math.PI) * offset.x) + (Math.sin(angle / 180 * Math.PI) * offset.y), + (Math.sin(angle / 180 * Math.PI) * offset.x) + (Math.cos(angle / 180 * Math.PI) * offset.y)); + // origin.set( + // (-Math.cos(angle / 180 * Math.PI) * origin.x) + (-Math.sin(angle / 180 * Math.PI) * origin.y), + // (-Math.sin(angle / 180 * Math.PI) * origin.x) + (-Math.cos(angle / 180 * Math.PI) * origin.y)); + + super.draw(); + + offset.set(oldOffset.x, oldOffset.y); + // origin.set(oldOrigin.x, oldOrigin.y); + + oldOffset.put(); + // oldOrigin.put(); + return; + } + super.draw(); + } + override function update(elapsed:Float) { super.update(elapsed); diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 7d019b9a..7682cc3f 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1,5 +1,6 @@ package funkin.game; +import funkin.options.Options; import funkin.scripting.Script; import flixel.util.FlxDestroyUtil; #if desktop @@ -119,6 +120,7 @@ class PlayState extends MusicBeatState public var songScore:Int = 0; + public var downscroll:Bool = Options.downscroll; public var misses:Int = 0; public var scoreTxt:FlxText; public var missesTxt:FlxText; diff --git a/source/funkin/game/Strum.hx b/source/funkin/game/Strum.hx index f1739002..8be9a6d6 100644 --- a/source/funkin/game/Strum.hx +++ b/source/funkin/game/Strum.hx @@ -1,5 +1,6 @@ package funkin.game; +import funkin.options.Options; import flixel.FlxSprite; import flixel.math.FlxMath; import flixel.math.FlxPoint; @@ -10,12 +11,25 @@ class Strum extends FlxSprite { public var lastHit:Float = -5000; public var scrollSpeed:Null = null; // custom scroll speed per strum + public var noteAngle:Null = null; // custom scroll speed per strum + public var downscroll:Null = false; // custom downscroll per strum public function getScrollSpeed() { if (scrollSpeed != null) return scrollSpeed; if (PlayState.instance != null) return PlayState.instance.scrollSpeed; return 1; } + + public function getNotesAngle() { + if (noteAngle != null) return noteAngle; + return angle; + } + + public function getDownscroll() { + if (downscroll != null) return downscroll; + if (PlayState.instance != null) return PlayState.instance.downscroll; + return Options.downscroll; + } public override function update(elapsed:Float) { super.update(elapsed); @@ -28,12 +42,24 @@ class Strum extends FlxSprite { public function updateNotePosition(daNote:Note) { var offset = FlxPoint.get(daNote.isSustainNote ? ((Note.swagWidth - daNote.width) / 2) : 0, (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(PlayState.instance.scrollSpeed, 2))); + var realOffset = FlxPoint.get(0, 0); if (daNote.isSustainNote) offset.y -= Note.swagWidth / 2; - // TODO: angle stuff - daNote.x = x + offset.x; - daNote.y = y - offset.y; + + var noteAngle = getNotesAngle(); + daNote.angle = daNote.isSustainNote ? noteAngle : angle; + if (Std.int(noteAngle % 360) != 0) { + realOffset.x = (Math.cos(noteAngle / 180 * Math.PI) * offset.x) + (Math.sin(noteAngle / 180 * Math.PI) * offset.y); + realOffset.y = (Math.sin(noteAngle / 180 * Math.PI) * offset.x) + (Math.cos(noteAngle / 180 * Math.PI) * offset.y); + } else { + realOffset.x = offset.x; + realOffset.y = offset.y; + } + if (!downscroll) + realOffset.y *= -1; + daNote.setPosition(x + realOffset.x, y + realOffset.y); offset.put(); + realOffset.put(); } public function updateClipRect(daNote:Note) { diff --git a/source/funkin/mods/ModsFolder.hx b/source/funkin/mods/ModsFolder.hx index 1ee5794a..4a235fd6 100644 --- a/source/funkin/mods/ModsFolder.hx +++ b/source/funkin/mods/ModsFolder.hx @@ -121,28 +121,6 @@ class ModsFolder { #end } - public static function checkForOutdatedAssets(assets:ModsAssetLibrary) { - // TODO: Fix this - #if sys - @:privateAccess - for(asset=>path in assets.paths) { - if (asset == null || path == null) continue; - var editedTime:Null = assets.getEditedTime(asset); - if (editedTime == null) continue; - try { - var stat = FileSystem.stat(path); - if (stat.mtime.getTime() > editedTime) { - // refresh - trace('Refreshing ${asset}'); - Assets.cache.clear(asset); - @:privateAccess - FlxG.bitmap.removeKey(asset); - } - } - } - #end - } - private static function onStateSwitch(newState:FlxState) { Assets.cache.clear(); lime.utils.Assets.cache.clear(); diff --git a/source/funkin/options/keybinds/KeybindsOptions.hx b/source/funkin/options/keybinds/KeybindsOptions.hx index 5307957b..93dcdbc6 100644 --- a/source/funkin/options/keybinds/KeybindsOptions.hx +++ b/source/funkin/options/keybinds/KeybindsOptions.hx @@ -141,7 +141,7 @@ class KeybindsOptions extends MusicBeatSubstate { k++; for(e in category.settings) { - // TODO!! + var xOffset:Float = 200; var sparrowIcon:String = null; var sparrowAnim:String = null;