diff --git a/source/ChartingState.hx b/source/ChartingState.hx index aadcc1f3b..369450ce8 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -73,7 +73,7 @@ class ChartingState extends MusicBeatState FlxG.sound.music.pause(); FlxG.sound.music.time = 0; }; - Conductor.changeBPM(120); + Conductor.changeBPM(100); var saveButton:FlxButton = new FlxButton(0, 0, "Save", function() { @@ -239,23 +239,11 @@ class ChartingState extends MusicBeatState { var daNoteInfo = i[1]; - switch (daNoteInfo) - { - case 0: - daNoteInfo = 4; - case 1: - daNoteInfo = 3; - case 2: - daNoteInfo = 1; - case 3: - daNoteInfo = 2; - } - var note:Note = new Note(i[0], daNoteInfo); note.setGraphicSize(GRID_SIZE, GRID_SIZE); note.updateHitbox(); note.x = Math.floor(i[1] * GRID_SIZE); - note.y = getYfromStrum(note.strumTime); + note.y = getYfromStrum(note.strumTime) % (Conductor.stepCrochet * sections[curSection].lengthInSteps); curRenderedNotes.add(note); } @@ -268,13 +256,16 @@ class ChartingState extends MusicBeatState private function addNote():Void { - sections[curSection].notes.push([getStrumTime(dummyArrow.y), Math.floor(FlxG.mouse.x / GRID_SIZE)]); + sections[curSection].notes.push([ + getStrumTime(dummyArrow.y) * FlxMath.maxInt(curSection, 1), + Math.floor(FlxG.mouse.x / GRID_SIZE) + ]); updateGrid(); } function getStrumTime(yPos:Float):Float { - return FlxMath.remapToRange(yPos, gridBG.y, gridBG.y + gridBG.height, 0, (16 * Conductor.stepCrochet) * FlxMath.maxInt(curSection, 1)); + return FlxMath.remapToRange(yPos, gridBG.y, gridBG.y + gridBG.height, 0, 16 * Conductor.stepCrochet); } function getYfromStrum(strumTime:Float, ?isNote:Bool = true):Float diff --git a/source/Note.hx b/source/Note.hx index 4b14e10b5..3fc3ee0bb 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -54,20 +54,20 @@ class Note extends FlxSprite updateHitbox(); antialiasing = true; - switch (Math.abs(noteData)) + switch (noteData) { - case 1: - x += swagWidth * 2; - animation.play('greenScroll'); - case 2: - x += swagWidth * 3; - animation.play('redScroll'); - case 3: - x += swagWidth * 1; - animation.play('blueScroll'); - case 4: + case 0: x += swagWidth * 0; animation.play('purpleScroll'); + case 1: + x += swagWidth * 1; + animation.play('blueScroll'); + case 2: + x += swagWidth * 2; + animation.play('greenScroll'); + case 3: + x += swagWidth * 3; + animation.play('redScroll'); } trace(prevNote); diff --git a/source/PlayState.hx b/source/PlayState.hx index 5242e9573..433a1ecf4 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -274,34 +274,32 @@ class PlayState extends MusicBeatState sectionScores[0].push(0); sectionScores[1].push(0); - var daStrumTime:Float = songNotes[0]; + var daStrumTime:Float = songNotes[0] + ((Conductor.stepCrochet * 16) * playerCounter); + trace(daStrumTime); var daNoteData:Int = songNotes[1]; - if (daNoteData != 0) + var daStrumTime:Float = daStrumTime; + + var oldNote:Note; + if (unspawnNotes.length > 0) + oldNote = unspawnNotes[Std.int(unspawnNotes.length - 1)]; + else + oldNote = null; + + var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote); + swagNote.scrollFactor.set(0, 0); + + unspawnNotes.push(swagNote); + + swagNote.x += ((FlxG.width / 2) * playerCounter); // general offset + + if (playerCounter == 1) // is the player { - var daStrumTime:Float = daStrumTime; - - var oldNote:Note; - if (unspawnNotes.length > 0) - oldNote = unspawnNotes[Std.int(unspawnNotes.length - 1)]; - else - oldNote = null; - - var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote); - swagNote.scrollFactor.set(0, 0); - - unspawnNotes.push(swagNote); - - swagNote.x += ((FlxG.width / 2) * playerCounter); // general offset - - if (playerCounter == 1) // is the player - { - swagNote.mustPress = true; - } - else - { - sectionScores[0][daBeats] += swagNote.noteScore; - } + swagNote.mustPress = true; + } + else + { + sectionScores[0][daBeats] += swagNote.noteScore; } }