diff --git a/source/Conductor.hx b/source/Conductor.hx index cbcc10bfb..9f3f50031 100644 --- a/source/Conductor.hx +++ b/source/Conductor.hx @@ -6,6 +6,7 @@ import Song.SwagSong; * ... * @author */ + typedef BPMChangeEvent = { var stepTime:Int; @@ -27,7 +28,9 @@ class Conductor public static var bpmChangeMap:Array = []; - public function new() {} + public function new() + { + } public static function mapBPMChanges(song:SwagSong) { @@ -36,11 +39,11 @@ class Conductor var curBPM:Float = song.bpm; var totalSteps:Int = 0; var totalPos:Float = 0; - for (i in 0...song.notes[PlayState.storyDifficulty].length) + for (i in 0...song.notes.length) { - if (song.notes[PlayState.storyDifficulty][i].changeBPM && song.notes[PlayState.storyDifficulty][i].bpm != curBPM) + if(song.notes[i].changeBPM && song.notes[i].bpm != curBPM) { - curBPM = song.notes[PlayState.storyDifficulty][i].bpm; + curBPM = song.notes[i].bpm; var event:BPMChangeEvent = { stepTime: totalSteps, songTime: totalPos, @@ -49,7 +52,7 @@ class Conductor bpmChangeMap.push(event); } - var deltaSteps:Int = song.notes[PlayState.storyDifficulty][i].lengthInSteps; + var deltaSteps:Int = song.notes[i].lengthInSteps; totalSteps += deltaSteps; totalPos += ((60 / curBPM) * 1000 / 4) * deltaSteps; } diff --git a/source/Note.hx b/source/Note.hx index 63e18be4c..00acfcb34 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -187,7 +187,7 @@ class Note extends FlxSprite prevNote.animation.play('redhold'); } - prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed[PlayState.storyDifficulty]; + prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed; prevNote.updateHitbox(); // prevNote.setGraphicSize(); } diff --git a/source/PlayState.hx b/source/PlayState.hx index ed6377643..cecedd341 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1594,7 +1594,7 @@ class PlayState extends MusicBeatState var noteData:Array; // NEW SHIT - noteData = songData.notes[storyDifficulty]; + noteData = songData.notes; for (section in noteData) { @@ -2003,9 +2003,9 @@ class PlayState extends MusicBeatState changeSection(-1); #end - if (generatedMusic && SONG.notes[storyDifficulty][Std.int(curStep / 16)] != null) + if (generatedMusic && SONG.notes[Std.int(curStep / 16)] != null) { - cameraRightSide = SONG.notes[storyDifficulty][Std.int(curStep / 16)].mustHitSection; + cameraRightSide = SONG.notes[Std.int(curStep / 16)].mustHitSection; cameraMovement(); } @@ -2093,8 +2093,7 @@ class PlayState extends MusicBeatState } } - while (unspawnNotes[0] != null - && unspawnNotes[0].strumTime - Conductor.songPosition < 1800 / SONG.speed[PlayState.storyDifficulty]) + while (unspawnNotes[0] != null && unspawnNotes[0].strumTime - Conductor.songPosition < 1800 / SONG.speed) { var dunceNote:Note = unspawnNotes[0]; notes.add(dunceNote); @@ -2123,7 +2122,7 @@ class PlayState extends MusicBeatState if (PreferencesMenu.getPref('downscroll')) { - daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed[storyDifficulty], 2))); + daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); if (daNote.isSustainNote) { @@ -2146,7 +2145,7 @@ class PlayState extends MusicBeatState } else { - daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed[storyDifficulty], 2))); + daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); if (daNote.isSustainNote && (!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit))) @@ -2167,9 +2166,9 @@ class PlayState extends MusicBeatState var altAnim:String = ""; - if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)] != null) + if (SONG.notes[Math.floor(curStep / 16)] != null) { - if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)].altAnim) + if (SONG.notes[Math.floor(curStep / 16)].altAnim) altAnim = '-alt'; } @@ -2263,9 +2262,9 @@ class PlayState extends MusicBeatState var daPos:Float = 0; for (i in 0...(Std.int(curStep / 16 + sec))) { - if (SONG.notes[storyDifficulty][i].changeBPM) + if (SONG.notes[i].changeBPM) { - daBPM = SONG.notes[storyDifficulty][i].bpm; + daBPM = SONG.notes[i].bpm; } daPos += 4 * (1000 * 60 / daBPM); } @@ -2974,17 +2973,17 @@ class PlayState extends MusicBeatState notes.sort(sortNotes, FlxSort.DESCENDING); } - if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)] != null) + if (SONG.notes[Math.floor(curStep / 16)] != null) { - if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)].changeBPM) + if (SONG.notes[Math.floor(curStep / 16)].changeBPM) { - Conductor.changeBPM(SONG.notes[storyDifficulty][Math.floor(curStep / 16)].bpm); + Conductor.changeBPM(SONG.notes[Math.floor(curStep / 16)].bpm); FlxG.log.add('CHANGED BPM!'); } // else // Conductor.changeBPM(SONG.bpm); } - // FlxG.log.add('change bpm' + SONG.notes[storyDifficulty][Std.int(curStep / 16)].changeBPM); + // FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM); wiggleShit.update(Conductor.crochet); // HARDCODING FOR MILF ZOOMS! diff --git a/source/Song.hx b/source/Song.hx index 73ca02fe3..2ea2a2f81 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -10,10 +10,10 @@ using StringTools; typedef SwagSong = { var song:String; - var notes:Array>; + var notes:Array; var bpm:Float; var needsVoices:Bool; - var speed:Array; + var speed:Float; var player1:String; var player2:String; @@ -26,7 +26,7 @@ class Song public var notes:Array; public var bpm:Float; public var needsVoices:Bool = true; - public var speed:Array = [1, 1, 1]; + public var speed:Float = 1; public var player1:String = 'bf'; public var player2:String = 'dad';