mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-23 23:33:55 +00:00
WIP shit for nicer charting hehe
This commit is contained in:
parent
ca629dd03e
commit
c883f958b1
|
@ -374,16 +374,24 @@ class ChartingState extends MusicBeatState
|
||||||
|
|
||||||
var updatedSection:Bool = false;
|
var updatedSection:Bool = false;
|
||||||
|
|
||||||
|
function lengthBpmBullshit():Float
|
||||||
|
{
|
||||||
|
if (_song.notes[curSection].changeBPM)
|
||||||
|
return _song.notes[curSection].lengthInSteps * (_song.notes[curSection].bpm / _song.bpm);
|
||||||
|
else
|
||||||
|
return _song.notes[curSection].lengthInSteps;
|
||||||
|
}
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
Conductor.songPosition = FlxG.sound.music.time;
|
Conductor.songPosition = FlxG.sound.music.time;
|
||||||
_song.song = typingShit.text;
|
_song.song = typingShit.text;
|
||||||
|
|
||||||
strumLine.y = getYfromStrum(Conductor.songPosition % (Conductor.stepCrochet * _song.notes[curSection].lengthInSteps));
|
strumLine.y = getYfromStrum(Conductor.songPosition % (Conductor.stepCrochet * lengthBpmBullshit()));
|
||||||
|
|
||||||
if (curBeat % 4 == 0)
|
if (curBeat % 4 == 0)
|
||||||
{
|
{
|
||||||
if (curStep > (_song.notes[curSection].lengthInSteps) * (curSection + 1))
|
if (curStep > lengthBpmBullshit() * (curSection + 1))
|
||||||
{
|
{
|
||||||
trace(curStep);
|
trace(curStep);
|
||||||
trace((_song.notes[curSection].lengthInSteps) * (curSection + 1));
|
trace((_song.notes[curSection].lengthInSteps) * (curSection + 1));
|
||||||
|
@ -525,14 +533,14 @@ class ChartingState extends MusicBeatState
|
||||||
vocals.pause();
|
vocals.pause();
|
||||||
|
|
||||||
var daNum:Int = 0;
|
var daNum:Int = 0;
|
||||||
var daLength:Int = 0;
|
var daLength:Float = 0;
|
||||||
while (daNum <= sec)
|
while (daNum <= sec)
|
||||||
{
|
{
|
||||||
daLength += _song.notes[daNum].lengthInSteps;
|
daLength += lengthBpmBullshit();
|
||||||
daNum++;
|
daNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
FlxG.sound.music.time = (daLength - (_song.notes[sec].lengthInSteps)) * Conductor.stepCrochet;
|
FlxG.sound.music.time = (daLength - lengthBpmBullshit()) * Conductor.stepCrochet;
|
||||||
vocals.time = FlxG.sound.music.time;
|
vocals.time = FlxG.sound.music.time;
|
||||||
updateCurStep();
|
updateCurStep();
|
||||||
}
|
}
|
||||||
|
@ -620,7 +628,7 @@ class ChartingState extends MusicBeatState
|
||||||
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
||||||
note.updateHitbox();
|
note.updateHitbox();
|
||||||
note.x = Math.floor(daNoteInfo * GRID_SIZE);
|
note.x = Math.floor(daNoteInfo * GRID_SIZE);
|
||||||
note.y = getYfromStrum(daStrumTime) % gridBG.height;
|
note.y = Math.floor(getYfromStrum(daStrumTime)) % gridBG.height;
|
||||||
|
|
||||||
curRenderedNotes.add(note);
|
curRenderedNotes.add(note);
|
||||||
|
|
||||||
|
@ -691,7 +699,7 @@ class ChartingState extends MusicBeatState
|
||||||
|
|
||||||
private function addNote():Void
|
private function addNote():Void
|
||||||
{
|
{
|
||||||
var noteStrum = Math.round(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16)));
|
var noteStrum = getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * lengthBpmBullshit()));
|
||||||
var noteData = Math.floor(FlxG.mouse.x / GRID_SIZE);
|
var noteData = Math.floor(FlxG.mouse.x / GRID_SIZE);
|
||||||
var noteSus = 0;
|
var noteSus = 0;
|
||||||
|
|
||||||
|
@ -699,7 +707,7 @@ class ChartingState extends MusicBeatState
|
||||||
|
|
||||||
curSelectedNote = _song.notes[curSection].sectionNotes[_song.notes[curSection].sectionNotes.length - 1];
|
curSelectedNote = _song.notes[curSection].sectionNotes[_song.notes[curSection].sectionNotes.length - 1];
|
||||||
|
|
||||||
trace(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16)));
|
trace(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * lengthBpmBullshit()))));
|
||||||
trace(curSection);
|
trace(curSection);
|
||||||
|
|
||||||
updateGrid();
|
updateGrid();
|
||||||
|
|
|
@ -34,7 +34,7 @@ class MusicBeatState extends FlxUIState
|
||||||
everyStep();
|
everyStep();
|
||||||
|
|
||||||
updateCurStep();
|
updateCurStep();
|
||||||
curBeat = Math.round(curStep / 4);
|
curBeat = Math.floor(curStep / 4);
|
||||||
|
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ class TitleState extends MusicBeatState
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SKIP_TO_PLAYSTATE
|
#if SKIP_TO_PLAYSTATE
|
||||||
FlxG.switchState(new StoryMenuState());
|
FlxG.switchState(new ChartingState());
|
||||||
#else
|
#else
|
||||||
startIntro();
|
startIntro();
|
||||||
#end
|
#end
|
||||||
|
|
Loading…
Reference in a new issue