From 95e53ebc38ac9226fda268a58c9dfca73d828c9d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 30 Mar 2021 15:10:15 -0700 Subject: [PATCH] basically down scroll --- source/Note.hx | 4 ++++ source/PlayState.hx | 21 +++++++++++++++++++-- source/ui/PreferencesMenu.hx | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/source/Note.hx b/source/Note.hx index 786a23e53..d0b582e50 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -7,6 +7,7 @@ import flixel.math.FlxMath; import flixel.util.FlxColor; import flixel.util.FlxTimer; import shaderslmfao.ColorSwap; +import ui.PreferencesMenu; using StringTools; @@ -144,6 +145,9 @@ class Note extends FlxSprite noteScore * 0.2; alpha = 0.6; + if (PreferencesMenu.getPref('downscroll')) + angle = 180; + x += width / 2; switch (noteData) diff --git a/source/PlayState.hx b/source/PlayState.hx index 5c7e5584f..0dd29b668 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -708,6 +708,12 @@ class PlayState extends MusicBeatState Conductor.songPosition = -5000; strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10); + + if (PreferencesMenu.getPref('downscroll')) + { + strumLine.y = FlxG.height - 150; // 150 just random ass number lol + } + strumLine.scrollFactor.set(); strumLineNotes = new FlxTypedGroup(); @@ -747,6 +753,9 @@ class PlayState extends MusicBeatState healthBarBG.scrollFactor.set(); add(healthBarBG); + if (PreferencesMenu.getPref('downscroll')) + healthBarBG.y = FlxG.height * 0.1; + healthBar = new FlxBar(healthBarBG.x + 4, healthBarBG.y + 4, RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8), this, 'health', 0, 2); healthBar.scrollFactor.set(); @@ -1638,7 +1647,10 @@ class PlayState extends MusicBeatState daNote.active = true; } - daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); + if (PreferencesMenu.getPref('downscroll')) + daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); + else + daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); // i am so fucking sorry for this if condition if (daNote.isSustainNote @@ -1690,7 +1702,12 @@ class PlayState extends MusicBeatState // WIP interpolation shit? Need to fix the pause issue // daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed)); - if (daNote.y < -daNote.height) + var noteMiss:Bool = daNote.y < -daNote.height; + + if (PreferencesMenu.getPref('downscroll')) + noteMiss = daNote.y > FlxG.height; + + if (noteMiss) { if (daNote.tooLate || !daNote.wasGoodHit) { diff --git a/source/ui/PreferencesMenu.hx b/source/ui/PreferencesMenu.hx index eadd31ec0..d9038d004 100644 --- a/source/ui/PreferencesMenu.hx +++ b/source/ui/PreferencesMenu.hx @@ -34,7 +34,7 @@ class PreferencesMenu extends ui.OptionsState.Page public static function initPrefs():Void { preferenceCheck('censor-naughty', false); - preferenceCheck('downscroll', false); + preferenceCheck('downscroll', true); preferenceCheck('flashing-menu', true); preferenceCheck('camera-zoom', true); }