Merge remote-tracking branch 'origin/master' into feature/polymod

This commit is contained in:
Eric Myllyoja 2022-01-22 20:40:04 -05:00
commit 023ab8bded
9 changed files with 177 additions and 127 deletions

View file

@ -1,5 +1,6 @@
package;
import charting.ChartingState;
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
import flixel.addons.transition.FlxTransitionableState;
import flixel.addons.transition.TransitionData;

View file

@ -61,7 +61,7 @@ class LatencyState extends FlxState
noteGrp.forEach(function(daNote:Note)
{
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * 0.45);
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.data.strumTime) * 0.45);
daNote.x = strumLine.x + 30;
if (daNote.y < strumLine.y)

View file

@ -25,7 +25,7 @@ class Main extends Sprite
#if web
var framerate:Int = 60; // How many frames per second the game should run at.
#else
var framerate:Int = 144; // How many frames per second the game should run at.
var framerate:Int = 300; // How many frames per second the game should run at.
#end
var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode.

View file

@ -16,11 +16,15 @@ import polymod.format.ParseRules.TargetSignatureElement;
class Note extends FlxSprite
{
public var strumTime:Float = 0;
public var data:NoteData = {
strumTime: 0,
sustainLength: 0,
altNote: false,
noteData: 0
};
public var mustPress:Bool = false;
public var followsTime:Bool = true; // used if you want the note to follow the time shit!
public var noteData:Int = 0;
public var canBeHit:Bool = false;
public var tooLate:Bool = false;
public var wasGoodHit:Bool = false;
@ -28,10 +32,8 @@ class Note extends FlxSprite
private var willMiss:Bool = false;
public var altNote:Bool = false;
public var invisNote:Bool = false;
public var sustainLength:Float = 0;
public var isSustainNote:Bool = false;
public var colorSwap:ColorSwap;
@ -56,7 +58,7 @@ class Note extends FlxSprite
// anything below sick threshold is sick
public static var arrowColors:Array<Float> = [1, 1, 1, 1];
public function new(strumTime:Float, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false)
public function new(strumTime:Float = 0, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false)
{
super();
@ -69,9 +71,9 @@ class Note extends FlxSprite
x += 50;
// MAKE SURE ITS DEFINITELY OFF SCREEN?
y -= 2000;
this.strumTime = strumTime;
data.strumTime = strumTime;
this.noteData = noteData;
data.noteData = noteData;
var daStage:String = PlayState.curStage;
@ -185,7 +187,7 @@ class Note extends FlxSprite
if (prevNote.isSustainNote)
{
switch (prevNote.noteData)
switch (prevNote.data.noteData)
{
case 0:
prevNote.animation.play('purplehold');
@ -218,7 +220,7 @@ class Note extends FlxSprite
public function updateColors():Void
{
colorSwap.update(arrowColors[noteData]);
colorSwap.update(arrowColors[data.noteData]);
}
override function update(elapsed:Float)
@ -235,15 +237,15 @@ class Note extends FlxSprite
}
else
{
if (!pastHalfWay && strumTime <= Conductor.songPosition)
if (!pastHalfWay && data.strumTime <= Conductor.songPosition)
{
pastHalfWay = true;
noteSpeedMulti *= 2;
}
if (strumTime > Conductor.songPosition - HIT_WINDOW)
if (data.strumTime > Conductor.songPosition - HIT_WINDOW)
{ // * 0.5 if sustain note, so u have to keep holding it closer to all the way thru!
if (strumTime < Conductor.songPosition + (HIT_WINDOW * (isSustainNote ? 0.5 : 1)))
if (data.strumTime < Conductor.songPosition + (HIT_WINDOW * (isSustainNote ? 0.5 : 1)))
canBeHit = true;
}
else
@ -257,7 +259,7 @@ class Note extends FlxSprite
{
canBeHit = false;
if (strumTime <= Conductor.songPosition)
if (data.strumTime <= Conductor.songPosition)
wasGoodHit = true;
}
@ -268,3 +270,11 @@ class Note extends FlxSprite
}
}
}
typedef NoteData =
{
var strumTime:Float;
var noteData:Int;
var sustainLength:Float;
var altNote:Bool;
}

View file

@ -2,6 +2,7 @@ package;
import Section.SwagSection;
import SongLoad.SwagSong;
import charting.ChartingState;
import flixel.FlxCamera;
import flixel.FlxObject;
import flixel.FlxSprite;
@ -1586,12 +1587,12 @@ class PlayState extends MusicBeatState
{
for (songNotes in section.sectionNotes)
{
var daStrumTime:Float = songNotes[0];
var daNoteData:Int = Std.int(songNotes[1] % 4);
var daStrumTime:Float = songNotes.strumTime;
var daNoteData:Int = Std.int(songNotes.noteData % 4);
var gottaHitNote:Bool = section.mustHitSection;
if (songNotes[1] > 3)
if (songNotes.noteData > 3)
gottaHitNote = !section.mustHitSection;
var oldNote:Note;
@ -1601,11 +1602,11 @@ class PlayState extends MusicBeatState
oldNote = null;
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote);
swagNote.sustainLength = songNotes[2];
swagNote.altNote = songNotes[3];
swagNote.data.sustainLength = songNotes.sustainLength;
swagNote.data.altNote = songNotes.altNote;
swagNote.scrollFactor.set(0, 0);
var susLength:Float = swagNote.sustainLength;
var susLength:Float = swagNote.data.sustainLength;
susLength = susLength / Conductor.stepCrochet;
unspawnNotes.push(swagNote);
@ -1646,7 +1647,7 @@ class PlayState extends MusicBeatState
function sortNotes(order:Int = FlxSort.ASCENDING, Obj1:Note, Obj2:Note)
{
return FlxSort.byValues(order, Obj1.strumTime, Obj2.strumTime);
return FlxSort.byValues(order, Obj1.data.strumTime, Obj2.data.strumTime);
}
// ^ These two sorts also look cute together ^
@ -2117,7 +2118,7 @@ class PlayState extends MusicBeatState
}
}
while (unspawnNotes[0] != null && unspawnNotes[0].strumTime - Conductor.songPosition < 1800 / SongLoad.getSpeed())
while (unspawnNotes[0] != null && unspawnNotes[0].data.strumTime - Conductor.songPosition < 1800 / SongLoad.getSpeed())
{
var dunceNote:Note = unspawnNotes[0];
notes.add(dunceNote);
@ -2144,7 +2145,8 @@ class PlayState extends MusicBeatState
var strumLineMid = strumLine.y + Note.swagWidth / 2;
if (daNote.followsTime)
daNote.y = (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SongLoad.getSpeed(), 2) * daNote.noteSpeedMulti);
daNote.y = (Conductor.songPosition - daNote.data.strumTime) * (0.45 * FlxMath.roundDecimal(SongLoad.getSpeed(),
2) * daNote.noteSpeedMulti);
if (PreferencesMenu.getPref('downscroll'))
{
@ -2188,12 +2190,12 @@ class PlayState extends MusicBeatState
altAnim = '-alt';
}
if (daNote.altNote)
if (daNote.data.altNote)
altAnim = '-alt';
if (!daNote.isSustainNote)
{
switch (Math.abs(daNote.noteData))
switch (Math.abs(daNote.data.noteData))
{
case 0:
dad.playAnim('singLEFT' + altAnim, true);
@ -2427,7 +2429,7 @@ class PlayState extends MusicBeatState
var healthMulti:Float = 1;
if (daNote.noteData >= 0)
if (daNote.data.noteData >= 0)
healthMulti *= 0.033;
else
healthMulti *= 0.002;
@ -2461,7 +2463,7 @@ class PlayState extends MusicBeatState
if (isSick)
{
var noteSplash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
noteSplash.setupNoteSplash(daNote.x, daNote.y, daNote.noteData);
noteSplash.setupNoteSplash(daNote.x, daNote.y, daNote.data.noteData);
// new NoteSplash(daNote.x, daNote.y, daNote.noteData);
grpNoteSplashes.add(noteSplash);
}
@ -2736,7 +2738,7 @@ class PlayState extends MusicBeatState
{
notes.forEachAlive(function(daNote:Note)
{
if (daNote.isSustainNote && daNote.canBeHit && daNote.mustPress && holdArray[daNote.noteData])
if (daNote.isSustainNote && daNote.canBeHit && daNote.mustPress && holdArray[daNote.data.noteData])
goodNoteHit(daNote);
});
}
@ -2756,17 +2758,18 @@ class PlayState extends MusicBeatState
{
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
{
if (directionList.contains(daNote.noteData))
if (directionList.contains(daNote.data.noteData))
{
for (coolNote in possibleNotes)
{
if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
if (coolNote.data.noteData == daNote.data.noteData
&& Math.abs(daNote.data.strumTime - coolNote.data.strumTime) < 10)
{ // if it's the same note twice at < 10ms distance, just delete it
// EXCEPT u cant delete it in this loop cuz it fucks with the collection lol
dumbNotes.push(daNote);
break;
}
else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime)
else if (coolNote.data.noteData == daNote.data.noteData && daNote.data.strumTime < coolNote.data.strumTime)
{ // if daNote is earlier than existing note (coolNote), replace
possibleNotes.remove(coolNote);
possibleNotes.push(daNote);
@ -2777,20 +2780,20 @@ class PlayState extends MusicBeatState
else
{
possibleNotes.push(daNote);
directionList.push(daNote.noteData);
directionList.push(daNote.data.noteData);
}
}
});
for (note in dumbNotes)
{
FlxG.log.add("killing dumb ass note at " + note.strumTime);
FlxG.log.add("killing dumb ass note at " + note.data.strumTime);
note.kill();
notes.remove(note, true);
note.destroy();
}
possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
possibleNotes.sort((a, b) -> Std.int(a.data.strumTime - b.data.strumTime));
if (perfectMode)
goodNoteHit(possibleNotes[0]);
@ -2803,7 +2806,7 @@ class PlayState extends MusicBeatState
}
for (coolNote in possibleNotes)
{
if (pressArray[coolNote.noteData])
if (pressArray[coolNote.data.noteData])
goodNoteHit(coolNote);
}
}
@ -2909,10 +2912,10 @@ class PlayState extends MusicBeatState
if (!note.isSustainNote)
{
combo += 1;
popUpScore(note.strumTime, note);
popUpScore(note.data.strumTime, note);
}
switch (note.noteData)
switch (note.data.noteData)
{
case 0:
boyfriend.playAnim('singLEFT', true);
@ -2926,7 +2929,7 @@ class PlayState extends MusicBeatState
playerStrums.forEach(function(spr:FlxSprite)
{
if (Math.abs(note.noteData) == spr.ID)
if (Math.abs(note.data.noteData) == spr.ID)
{
spr.animation.play('confirm', true);
}

View file

@ -1,8 +1,10 @@
package;
import Note.NoteData;
typedef SwagSection =
{
var sectionNotes:Array<Dynamic>;
var sectionNotes:Array<NoteData>;
var lengthInSteps:Int;
var typeOfSection:Int;
var mustHitSection:Bool;

View file

@ -77,14 +77,18 @@ class SongLoad
diff = SongLoad.curDiff;
var songShit:Array<SwagSection> = [];
switch (diff)
if (songData != null)
{
case 'easy':
songShit = songData.notes.easy;
case 'normal':
songShit = songData.notes.normal;
case 'hard':
songShit = songData.notes.hard;
switch (diff)
{
case 'easy':
songShit = songData.notes.easy;
case 'normal':
songShit = songData.notes.normal;
case 'hard':
songShit = songData.notes.hard;
}
}
return songShit;
@ -109,6 +113,22 @@ class SongLoad
return speedShit;
}
public static function getDefaultSwagSong():SwagSong
{
return {
song: 'Test',
notes: {easy: [], normal: [], hard: []},
bpm: 150,
needsVoices: true,
player1: 'bf',
player2: 'dad',
speed: {easy: 1, normal: 1, hard: 1},
validScore: false,
voiceList: ["BF", "BF-pixel"],
extraNotes: []
};
}
public static function parseJSONshit(rawJson:String):SwagSong
{
var swagShit:SwagSong = cast Json.parse(rawJson).song;

View file

@ -278,8 +278,6 @@ class TitleState extends MusicBeatState
override function update(elapsed:Float)
{
// trace(FlxG.renderBlit);
#if HAS_PITCH
if (FlxG.keys.pressed.UP)
FlxG.sound.music.pitch += 0.5 * elapsed;

View file

@ -1,6 +1,7 @@
package;
package charting;
import Conductor.BPMChangeEvent;
import Note.NoteData;
import Section.SwagSection;
import SongLoad.SwagSong;
import dsp.FFT;
@ -29,6 +30,7 @@ import flixel.ui.FlxSpriteButton;
import flixel.util.FlxColor;
import haxe.CallStack.StackItem;
import haxe.Json;
import haxe.Serializer;
import lime.media.AudioBuffer;
import lime.utils.Assets;
import lime.utils.Int16Array;
@ -80,7 +82,7 @@ class ChartingState extends MusicBeatState
/*
* WILL BE THE CURRENT / LAST PLACED NOTE
**/
var curSelectedNote:Array<Dynamic>;
var curSelectedNote:NoteData;
var tempBpm:Float = 0;
@ -130,18 +132,7 @@ class ChartingState extends MusicBeatState
_song = PlayState.SONG;
else
{
_song = {
song: 'Test',
notes: {easy: [], normal: [], hard: []},
bpm: 150,
needsVoices: true,
player1: 'bf',
player2: 'dad',
speed: {easy: 1, normal: 1, hard: 1},
validScore: false,
voiceList: ["BF", "BF-pixel"],
extraNotes: []
};
_song = SongLoad.songData = SongLoad.getDefaultSwagSong();
}
FlxG.mouse.visible = true;
@ -166,7 +157,8 @@ class ChartingState extends MusicBeatState
strumLine = new FlxSprite(0, 50).makeGraphic(Std.int(GRID_SIZE * 8), 4);
add(strumLine);
dummyArrow = new FlxSprite().makeGraphic(GRID_SIZE, GRID_SIZE);
dummyArrow = new FlxSprite().makeGraphic(GRID_SIZE, GRID_SIZE, 0xFFCC2288);
dummyArrow.alpha = 0.3;
add(dummyArrow);
var tabs = [
@ -320,9 +312,10 @@ class ChartingState extends MusicBeatState
{
for (i in 0...SongLoad.getSong()[curSection].sectionNotes.length)
{
var note = SongLoad.getSong()[curSection].sectionNotes[i];
note[1] = (note[1] + 4) % 8;
SongLoad.getSong()[curSection].sectionNotes[i] = note;
var note:Note = new Note(0, 0);
note.data = SongLoad.getSong()[curSection].sectionNotes[i];
note.data.noteData = (note.data.noteData + 4) % 8;
SongLoad.getSong()[curSection].sectionNotes[i] = note.data;
updateGrid();
}
});
@ -529,7 +522,7 @@ class ChartingState extends MusicBeatState
}
else if (wname == 'note_susLength')
{
curSelectedNote[2] = nums.value;
curSelectedNote.sustainLength = nums.value;
updateGrid();
}
else if (wname == 'section_bpm')
@ -562,11 +555,25 @@ class ChartingState extends MusicBeatState
{
daBPM = SongLoad.getSong()[i].bpm;
}
daPos += 4 * (1000 * 60 / daBPM);
daPos += 4 * sectionCalc(daBPM);
}
return daPos;
}
function measureStartTime():Float
{
var daBPM:Float = _song.bpm;
var daPos:Float = sectionStartTime();
daPos = Math.floor(FlxG.sound.music.time / sectionCalc(daBPM)) * sectionCalc(daBPM);
return daPos;
}
function sectionCalc(bpm:Float)
{
return (1000 * 60 / bpm);
}
var p1Muted:Bool = false;
var p2Muted:Bool = false;
@ -687,24 +694,13 @@ class ChartingState extends MusicBeatState
{
if (FlxG.mouse.overlaps(note))
{
if (FlxG.keys.pressed.CONTROL)
{
selectNote(note);
}
else
{
trace('tryin to delete note...');
deleteNote(note);
}
selectNote(note);
}
});
}
else
{
if (FlxG.mouse.x > gridBG.x
&& FlxG.mouse.x < gridBG.x + gridBG.width
&& FlxG.mouse.y > gridBG.y
&& FlxG.mouse.y < gridBG.y + (GRID_SIZE * SongLoad.getSong()[curSection].lengthInSteps))
if (FlxG.mouse.overlaps(gridBG))
{
FlxG.log.add('added note');
addNote();
@ -714,10 +710,22 @@ class ChartingState extends MusicBeatState
}
}
if (FlxG.mouse.x > gridBG.x
&& FlxG.mouse.x < gridBG.x + gridBG.width
&& FlxG.mouse.y > gridBG.y
&& FlxG.mouse.y < gridBG.y + (GRID_SIZE * SongLoad.getSong()[curSection].lengthInSteps))
if (FlxG.mouse.pressedRight)
{
if (FlxG.mouse.overlaps(curRenderedNotes))
{
curRenderedNotes.forEach(function(note:Note)
{
if (FlxG.mouse.overlaps(note))
{
trace('tryin to delete note...');
deleteNote(note);
}
});
}
}
if (FlxG.mouse.overlaps(gridBG))
{
dummyArrow.x = Math.floor(FlxG.mouse.x / GRID_SIZE) * GRID_SIZE;
if (FlxG.keys.pressed.SHIFT)
@ -786,10 +794,12 @@ class ChartingState extends MusicBeatState
if (FlxG.keys.justPressed.R)
{
if (FlxG.keys.pressed.SHIFT)
resetSection(true);
if (FlxG.keys.pressed.CONTROL)
resetSection(BEGINNING);
else if (FlxG.keys.pressed.SHIFT)
resetSection(MEASURE);
else
resetSection();
resetSection(SECTION);
}
if (FlxG.mouse.wheel != 0)
@ -909,11 +919,8 @@ class ChartingState extends MusicBeatState
{
if (curSelectedNote != null)
{
if (curSelectedNote[2] != null)
{
curSelectedNote[2] += value;
curSelectedNote[2] = Math.max(curSelectedNote[2], 0);
}
curSelectedNote.sustainLength += value;
curSelectedNote.sustainLength = Math.max(curSelectedNote.sustainLength, 0);
}
updateNoteUI();
@ -924,14 +931,9 @@ class ChartingState extends MusicBeatState
{
if (curSelectedNote != null)
{
if (curSelectedNote[3] != null)
{
trace('ALT NOTE SHIT');
curSelectedNote[3] = !curSelectedNote[3];
trace(curSelectedNote[3]);
}
else
curSelectedNote[3] = true;
trace('ALT NOTE SHIT');
curSelectedNote.altNote = !curSelectedNote.altNote;
trace(curSelectedNote.altNote);
}
}
@ -954,20 +956,24 @@ class ChartingState extends MusicBeatState
return curStep;
}
function resetSection(songBeginning:Bool = false):Void
function resetSection(songBeginning:SongResetType = SECTION):Void
{
updateGrid();
FlxG.sound.music.pause();
vocals.pause();
// Basically old shit from changeSection???
FlxG.sound.music.time = sectionStartTime();
if (songBeginning)
switch (songBeginning)
{
FlxG.sound.music.time = 0;
curSection = 0;
case SECTION:
// Basically old shit from changeSection???
FlxG.sound.music.time = sectionStartTime();
case BEGINNING:
FlxG.sound.music.time = 0;
curSection = 0;
case MEASURE:
FlxG.sound.music.time = measureStartTime(); // Math.floor(FlxG.mouse.y / GRID_SIZE) * GRID_SIZE
default:
}
vocals.time = FlxG.sound.music.time;
@ -1014,12 +1020,13 @@ class ChartingState extends MusicBeatState
{
var daSec = FlxMath.maxInt(curSection, sectionNum);
for (note in SongLoad.getSong()[daSec - sectionNum].sectionNotes)
for (noteShit in SongLoad.getSong()[daSec - sectionNum].sectionNotes)
{
var strum = note[0] + Conductor.stepCrochet * (SongLoad.getSong()[daSec].lengthInSteps * sectionNum);
var strum = noteShit.strumTime + Conductor.stepCrochet * (SongLoad.getSong()[daSec].lengthInSteps * sectionNum);
var copiedNote:Array<Dynamic> = [strum, note[1], note[2]];
SongLoad.getSong()[daSec].sectionNotes.push(copiedNote);
var copiedNote:Note = new Note(strum, noteShit.noteData);
copiedNote.data.sustainLength = noteShit.sustainLength;
SongLoad.getSong()[daSec].sectionNotes.push(copiedNote.data);
}
updateGrid();
@ -1066,7 +1073,7 @@ class ChartingState extends MusicBeatState
function updateNoteUI():Void
{
if (curSelectedNote != null)
stepperSusLength.value = curSelectedNote[2];
stepperSusLength.value = curSelectedNote.sustainLength;
}
function updateGrid():Void
@ -1091,7 +1098,7 @@ class ChartingState extends MusicBeatState
curRenderedSustains.remove(curRenderedSustains.members[0], true);
}
var sectionInfo:Array<Dynamic> = SongLoad.getSong()[curSection].sectionNotes;
var sectionInfo:Array<NoteData> = SongLoad.getSong()[curSection].sectionNotes;
if (SongLoad.getSong()[curSection].changeBPM && SongLoad.getSong()[curSection].bpm > 0)
{
@ -1124,12 +1131,12 @@ class ChartingState extends MusicBeatState
for (i in sectionInfo)
{
var daNoteInfo = i[1];
var daStrumTime = i[0];
var daSus = i[2];
var daNoteInfo = i.noteData;
var daStrumTime = i.strumTime;
var daSus = i.sustainLength;
var note:Note = new Note(daStrumTime, daNoteInfo % 4);
note.sustainLength = daSus;
note.data.sustainLength = daSus;
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
note.updateHitbox();
note.x = Math.floor(daNoteInfo * GRID_SIZE);
@ -1167,7 +1174,7 @@ class ChartingState extends MusicBeatState
for (i in SongLoad.getSong()[curSection].sectionNotes)
{
if (i.strumTime == note.strumTime && i.noteData % 4 == note.noteData)
if (i.strumTime == note.data.strumTime && i.noteData % 4 == note.data.noteData)
{
curSelectedNote = SongLoad.getSong()[curSection].sectionNotes[swagNum];
}
@ -1183,7 +1190,7 @@ class ChartingState extends MusicBeatState
{
for (i in SongLoad.getSong()[curSection].sectionNotes)
{
if (i[0] == note.strumTime && i[1] % 4 == note.noteData)
if (i.strumTime == note.data.strumTime && i.noteData % 4 == note.data.noteData)
{
var placeIDK:Int = Std.int(((Math.floor(dummyArrow.y / GRID_SIZE) * GRID_SIZE)) / 40);
@ -1253,13 +1260,16 @@ class ChartingState extends MusicBeatState
FlxG.sound.play(Paths.sound('pianoStuff/piano-00' + Std.string((bullshit % 8) + 1)), FlxG.random.float(0.3, 0.6));
// trace('bullshit $bullshit'); // trace(Math.floor(dummyArrow.y / GRID_SIZE) * GRID_SIZE);
SongLoad.getSong()[curSection].sectionNotes.push([noteStrum, noteData, noteSus, noteAlt]);
var daNewNote:Note = new Note(noteStrum, noteData);
daNewNote.data.sustainLength = noteSus;
daNewNote.data.altNote = noteAlt;
SongLoad.getSong()[curSection].sectionNotes.push(daNewNote.data);
curSelectedNote = SongLoad.getSong()[curSection].sectionNotes[SongLoad.getSong()[curSection].sectionNotes.length - 1];
if (FlxG.keys.pressed.CONTROL)
{
SongLoad.getSong()[curSection].sectionNotes.push([noteStrum, (noteData + 4) % 8, noteSus, noteAlt]);
// SongLoad.getSong()[curSection].sectionNotes.push([noteStrum, (noteData + 4) % 8, noteSus, noteAlt]);
}
trace(noteStrum);
@ -1331,15 +1341,14 @@ class ChartingState extends MusicBeatState
function loadAutosave():Void
{
PlayState.SONG = SongLoad.parseJSONshit(FlxG.save.data.autosave);
PlayState.SONG = FlxG.save.data.autosave;
FlxG.resetState();
}
function autosaveSong():Void
{
FlxG.save.data.autosave = Json.stringify({
"song": _song
});
FlxG.save.data.autosave = _song;
trace(FlxG.save.data.autosave);
FlxG.save.flush();
}
@ -1408,3 +1417,10 @@ class ChartingState extends MusicBeatState
FlxG.log.error("Problem saving Level data");
}
}
enum SongResetType
{
BEGINNING;
MEASURE; // not sure if measure is 1/4 of a "SECTION" which is definitely a... bar.. right? its nerd shit whatever
SECTION;
}