fixed bullshit
This commit is contained in:
1 parent
32c27dfb30
commit
e443b1916d
6 files changed
+41
-13
No files matched your search
@@ -1 +1 @@
|
||||
{"song":{"song":"Dadbattle","bpm":180,"sections":45,"notes":[{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[10667,2],[11000,0],[11167,1],[11333,2],[11750,0],[11833,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[12000,2],[12167,3],[12333,0],[12500,1],[12667,2],[13083,0],[13250,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[13333.666666666666,2],[13666.666666666666,0],[13833.666666666666,1],[13999.666666666666,2],[14416.666666666666,0],[14499.666666666666,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[14666.666666666666,2],[14833.666666666666,3],[14999.666666666666,0],[15166.666666666666,1],[15333.666666666666,2],[15749.666666666666,0],[15916.666666666666,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[16000,1],[16333,0],[16500,3],[16667,1],[16917,2]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[17333,1],[17348,1],[17750,0],[17917,0],[18083,3],[18250,3],[18417,3],[18583,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[18666.666666666668,1],[18999.666666666668,0],[19166.666666666668,3],[19333.666666666668,1],[19583.666666666668,2]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[19999.666666666668,1],[20014.666666666668,1],[20416.666666666668,0],[20583.666666666668,0],[20749.666666666668,3],[20916.666666666668,3],[21083.666666666668,3],[21249.666666666668,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[21750,2],[21917,1],[22083,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[22833,1],[23000,3],[23250,0]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[24417,2],[24750,1],[25000,0],[25167,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[25333,2],[25342,2],[25500,3],[25583,0],[25750,1],[25917,3],[26083,2]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[27083.333333333332,2],[27250.333333333332,1],[27416.333333333332,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[28166.333333333332,1],[28333.333333333332,3],[28583.333333333332,0]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[29750.333333333332,2],[30083.333333333332,1],[30333.333333333332,0],[30500.333333333332,1]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[30666.333333333332,2],[30675.333333333332,2],[30833.333333333332,3],[30916.333333333332,0],[31083.333333333332,1],[31250.333333333332,3],[31416.333333333332,2]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[32167,0],[32333,3],[32500,2],[32750,1],[33000,0]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[33500,2],[33667,3],[33833,1],[34083,2],[34417,0]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[34669,0],[35000,1],[35333,3],[35667,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[36008,2],[36333,3],[36750,0],[36750,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[37583,1],[37750,3],[37917,2],[38083,0],[38167,2],[38333,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[38679,0],[38750,3],[38833,0],[39000,1],[39167,0],[39333,2],[39500,3],[39667,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[40167,0],[40333,3],[40500,1],[40750,2],[40917,3],[41083,1],[41250,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"notes":[[41337,4],[41750,6],[41583,5],[41917,7],[42083,6],[42250,5],[42417,4],[42583,5],[41348,0],[41583,1],[41750,0],[41917,3],[42167,2],[42333,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[42833.666666666664,0],[42999.666666666664,3],[43166.666666666664,2],[43416.666666666664,1],[43666.666666666664,0]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[44166.666666666664,2],[44333.666666666664,3],[44499.666666666664,1],[44749.666666666664,2],[45083.666666666664,0]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[45335.666666666664,0],[45666.666666666664,1],[45999.666666666664,3],[46333.666666666664,1]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"notes":[[46674.666666666664,2],[46999.666666666664,3],[47416.666666666664,0],[47416.666666666664,Line truncated
|
||||
{"song":{"song":"Dadbattle","bpm":180,"sections":45,"notes":[{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[10667,2],[11000,0],[11167,1],[11333,2],[11750,0],[11833,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[12000,2],[12167,3],[12333,0],[12500,1],[12667,2],[13083,0],[13250,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[13333.666666666666,2],[13666.666666666666,0],[13833.666666666666,1],[13999.666666666666,2],[14416.666666666666,0],[14499.666666666666,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[14666.666666666666,2],[14833.666666666666,3],[14999.666666666666,0],[15166.666666666666,1],[15333.666666666666,2],[15749.666666666666,0],[15916.666666666666,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[16000,1],[16333,0],[16500,3],[16667,1],[16917,2]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[17333,1],[17348,1],[17750,0],[17917,0],[18083,3],[18250,3],[18417,3],[18583,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[18666.666666666668,1],[18999.666666666668,0],[19166.666666666668,3],[19333.666666666668,1],[19583.666666666668,2]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[19999.666666666668,1],[20014.666666666668,1],[20416.666666666668,0],[20583.666666666668,0],[20749.666666666668,3],[20916.666666666668,3],[21083.666666666668,3],[21249.666666666668,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[21750,2],[21917,1],[22083,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[22833,1],[23000,3],[23250,0]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[24417,2],[24750,1],[25000,0],[25167,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[25333,2],[25342,2],[25500,3],[25583,0],[25750,1],[25917,3],[26083,2]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[27083.333333333332,2],[27250.333333333332,1],[27416.333333333332,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[28166.333333333332,1],[28333.333333333332,3],[28583.333333333332,0]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[29750.333333333332,2],[30083.333333333332,1],[30333.333333333332,0],[30500.333333333332,1]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[30666.333333333332,2],[30675.333333333332,2],[30833.333333333332,3],[30916.333333333332,0],[31083.333333333332,1],[31250.333333333332,3],[31416.333333333332,2]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[32167,0],[32333,3],[32500,2],[32750,1],[33000,0]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[33500,2],[33667,3],[33833,1],[34083,2],[34417,0]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[34669,0],[35000,1],[35333,3],[35667,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[36008,2],[36333,3],[36750,0],[36750,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[37583,1],[37750,3],[37917,2],[38083,0],[38167,2],[38333,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[38679,0],[38750,3],[38833,0],[39000,1],[39167,0],[39333,2],[39500,3],[39667,1]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[40167,0],[40333,3],[40500,1],[40750,2],[40917,3],[41083,1],[41250,3]]},{"mustHitSection":false,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[41337,4],[41750,6],[41583,5],[41917,7],[42083,6],[42250,5],[42417,4],[42583,5],[41348,0],[41583,1],[41750,0],[41917,3],[42167,2],[42333,3]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[42833.666666666664,0],[42999.666666666664,3],[43166.666666666664,2],[43416.666666666664,1],[43666.666666666664,0]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[44166.666666666664,2],[44333.666666666664,3],[44499.666666666664,1],[44749.666666666664,2],[45083.666666666664,0]]},{"mustHitSection":true,"typeOfSection":0,"lengthInSteps":16,"sectionNotes":[[45335.Line truncated
|
||||
+13
-7
@@ -443,7 +443,10 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
for (note in _song.notes[daSec - sectionNum].sectionNotes)
|
||||
{
|
||||
_song.notes[daSec].sectionNotes.push(note);
|
||||
var strum = note.strumTime + Conductor.stepCrochet * (_song.notes[daSec].lengthInSteps * sectionNum);
|
||||
|
||||
var copiedNote:NoteMeta = new NoteMeta(strum, note.noteData, note.sustainLength);
|
||||
_song.notes[daSec].sectionNotes.push(copiedNote);
|
||||
}
|
||||
|
||||
updateGrid();
|
||||
@@ -469,12 +472,15 @@ class ChartingState extends MusicBeatState
|
||||
for (i in sectionInfo)
|
||||
{
|
||||
var daNoteInfo = i[1];
|
||||
var daStrumTime = i[0];
|
||||
var daSus = i[2];
|
||||
|
||||
var note:Note = new Note(i[0], daNoteInfo % 4);
|
||||
var note:Note = new Note(daStrumTime, daNoteInfo % 4);
|
||||
note.sustainLength = daSus;
|
||||
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
||||
note.updateHitbox();
|
||||
note.x = Math.floor(i[1] * GRID_SIZE);
|
||||
note.y = getYfromStrum(note.strumTime) % gridBG.height;
|
||||
note.x = Math.floor(daNoteInfo * GRID_SIZE);
|
||||
note.y = getYfromStrum(daStrumTime) % gridBG.height;
|
||||
|
||||
curRenderedNotes.add(note);
|
||||
}
|
||||
@@ -501,8 +507,8 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
private function addNote():Void
|
||||
{
|
||||
var swagNote:Note = new Note(Math.round(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16))),
|
||||
Math.floor(FlxG.mouse.x / GRID_SIZE));
|
||||
var swagNote:NoteMeta = new NoteMeta(Math.round(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16))),
|
||||
Math.floor(FlxG.mouse.x / GRID_SIZE), 0);
|
||||
|
||||
_song.notes[curSection].sectionNotes.push(swagNote);
|
||||
|
||||
@@ -587,7 +593,7 @@ class ChartingState extends MusicBeatState
|
||||
_file.addEventListener(Event.COMPLETE, onSaveComplete);
|
||||
_file.addEventListener(Event.CANCEL, onSaveCancel);
|
||||
_file.addEventListener(IOErrorEvent.IO_ERROR, onSaveError);
|
||||
_file.save(data.trim(), json.song.song.toLowerCase() + ".json");
|
||||
_file.save(data.trim(), _song.song.toLowerCase() + ".json");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package;
|
||||
|
||||
class NoteMeta
|
||||
{
|
||||
public var strumTime:Float = 0;
|
||||
public var noteData:Int = 0;
|
||||
public var sustainLength:Float = 0;
|
||||
|
||||
public function new(strumTime:Float, noteData:Int, sustain:Float)
|
||||
{
|
||||
this.strumTime = strumTime;
|
||||
this.noteData = noteData;
|
||||
sustainLength = sustain;
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -274,12 +274,12 @@ class PlayState extends MusicBeatState
|
||||
sectionScores[0].push(0);
|
||||
sectionScores[1].push(0);
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -291,6 +291,7 @@ class PlayState extends MusicBeatState
|
||||
oldNote = null;
|
||||
|
||||
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote);
|
||||
swagNote.sustainLength = songNotes.sustainLength;
|
||||
swagNote.scrollFactor.set(0, 0);
|
||||
|
||||
unspawnNotes.push(swagNote);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package;
|
||||
|
||||
class Section
|
||||
{
|
||||
public var sectionNotes:Array<Note> = [];
|
||||
public var sectionNotes:Array<Dynamic> = [];
|
||||
|
||||
public var lengthInSteps:Int = 16;
|
||||
public var typeOfSection:Int = 0;
|
||||
|
||||
+7
-1
@@ -51,7 +51,13 @@ class Song
|
||||
|
||||
var songData:Song = Json.parse(rawJson).song;
|
||||
|
||||
trace('LOADED FROM JSON: ' + songData.song);
|
||||
// trace('LOADED FROM JSON: ' + songData.notes);
|
||||
|
||||
for (i in 0...songData.notes.length)
|
||||
{
|
||||
trace('LOADED FROM JSON: ' + songData.notes[i].sectionNotes);
|
||||
// songData.notes[i].sectionNotes = songData.notes[i].sectionNotes
|
||||
}
|
||||
/*
|
||||
daNotes = songData.notes;
|
||||
daSong = songData.song;
|
||||
|
||||
Reference in new issue
Block a user