From d84be39a5e2b7ca2d9e46bea701e7f8c53f41299 Mon Sep 17 00:00:00 2001 From: Eric Myllyoja Date: Wed, 7 Sep 2022 22:57:40 -0400 Subject: [PATCH] Minor tweaks and fixes --- source/funkin/LatencyState.hx | 8 ++++---- source/funkin/StoryMenuState.hx | 2 +- source/funkin/audiovis/SpectogramSprite.hx | 3 --- source/funkin/play/PlayState.hx | 7 +++++-- source/funkin/play/character/BaseCharacter.hx | 4 ++-- .../ui/stageBuildShit/StageOffsetSubstate.hx | 14 +++----------- 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/source/funkin/LatencyState.hx b/source/funkin/LatencyState.hx index 3f2778762..d3a790104 100644 --- a/source/funkin/LatencyState.hx +++ b/source/funkin/LatencyState.hx @@ -139,17 +139,17 @@ class LatencyState extends MusicBeatSubstate super.create(); } - override function stepHit() + override function stepHit():Bool { if (curStep % 4 == 2) { blocks.members[((curBeat % 8) + 1) % 8].alpha = 0.5; } - super.stepHit(); + return super.stepHit(); } - override function beatHit() + override function beatHit():Bool { if (curBeat % 8 == 0) blocks.forEach(blok -> @@ -160,7 +160,7 @@ class LatencyState extends MusicBeatSubstate blocks.members[curBeat % 8].alpha = 1; // block.visible = !block.visible; - super.beatHit(); + return super.beatHit(); } override function update(elapsed:Float) diff --git a/source/funkin/StoryMenuState.hx b/source/funkin/StoryMenuState.hx index d3023b4a3..a793648bf 100644 --- a/source/funkin/StoryMenuState.hx +++ b/source/funkin/StoryMenuState.hx @@ -34,7 +34,7 @@ class StoryMenuState extends MusicBeatState ['Cocoa', 'Eggnog', 'Winter-Horrorland'], ['Senpai', 'Roses', 'Thorns'], ['Ugh', 'Guns', 'Stress'], - ['Darnell', "lit-up", "2hot"] + ['Darnell', "lit-up", "2hot", "blazin"] ]; var curDifficulty:Int = 1; diff --git a/source/funkin/audiovis/SpectogramSprite.hx b/source/funkin/audiovis/SpectogramSprite.hx index d65c3d6d0..9d4f7d3c2 100644 --- a/source/funkin/audiovis/SpectogramSprite.hx +++ b/source/funkin/audiovis/SpectogramSprite.hx @@ -9,12 +9,9 @@ import flixel.system.FlxSound; import flixel.util.FlxColor; import funkin.audiovis.PolygonSpectogram.VISTYPE; import funkin.audiovis.VisShit.CurAudioInfo; -<<<<<<< HEAD -======= import funkin.audiovis.dsp.FFT; import haxe.Timer; import lime.system.ThreadPool; ->>>>>>> master import lime.utils.Int16Array; using Lambda; diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index fa3c39474..81a992edb 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -938,7 +938,7 @@ class PlayState extends MusicBeatState } else { - swagNote.x += FlxG.width / 2; // general offset + // swagNote.x += FlxG.width / 2; // general offset } } } @@ -1406,7 +1406,10 @@ class PlayState extends MusicBeatState var daPos:Float = 0; for (i in 0...(Std.int(curStep / 16 + sec))) { - if (SongLoad.getSong()[i].changeBPM) + var section = SongLoad.getSong()[i]; + if (section == null) + continue; + if (section.changeBPM) { daBPM = SongLoad.getSong()[i].bpm; } diff --git a/source/funkin/play/character/BaseCharacter.hx b/source/funkin/play/character/BaseCharacter.hx index 5d569b926..6ce168d0c 100644 --- a/source/funkin/play/character/BaseCharacter.hx +++ b/source/funkin/play/character/BaseCharacter.hx @@ -460,13 +460,13 @@ class BaseCharacter extends Bopper if (event.note.mustPress && characterType == BF) { // If the note is from the same strumline, play the sing animation. - this.playSingAnimation(event.note.data.dir, false, event.note.data.altNote); + this.playSingAnimation(event.note.data.dir, false); holdTimer = 0; } else if (!event.note.mustPress && characterType == DAD) { // If the note is from the same strumline, play the sing animation. - this.playSingAnimation(event.note.data.dir, false, event.note.data.altNote); + this.playSingAnimation(event.note.data.dir, false); holdTimer = 0; } } diff --git a/source/funkin/ui/stageBuildShit/StageOffsetSubstate.hx b/source/funkin/ui/stageBuildShit/StageOffsetSubstate.hx index 6c43d42c6..68549b19e 100644 --- a/source/funkin/ui/stageBuildShit/StageOffsetSubstate.hx +++ b/source/funkin/ui/stageBuildShit/StageOffsetSubstate.hx @@ -1,21 +1,13 @@ package funkin.ui.stageBuildShit; import flixel.FlxSprite; -import flixel.input.mouse.FlxMouseEventManager; +import flixel.input.mouse.FlxMouseEvent; import flixel.math.FlxPoint; -import flixel.ui.FlxButton; import funkin.play.PlayState; import funkin.play.character.BaseCharacter; import funkin.play.stage.StageData; -import haxe.Json; -import haxe.ui.ComponentBuilder; import haxe.ui.RuntimeComponentBuilder; -import haxe.ui.Toolkit; -import haxe.ui.components.Button; -import haxe.ui.containers.HBox; -import haxe.ui.containers.VBox; import haxe.ui.core.Component; -import openfl.Assets; import openfl.events.Event; import openfl.events.IOErrorEvent; import openfl.net.FileReference; @@ -46,7 +38,7 @@ class StageOffsetSubstate extends MusicBeatSubstate for (thing in PlayState.instance.currentStage) { - FlxMouseEventManager.add(thing, spr -> + FlxMouseEvent.add(thing, spr -> { char = cast thing; trace("JUST PRESSED!"); @@ -94,7 +86,7 @@ class StageOffsetSubstate extends MusicBeatSubstate { for (thing in PlayState.instance.currentStage) { - FlxMouseEventManager.remove(thing); + FlxMouseEvent.remove(thing); thing.alpha = 1; }