Fix Steps
This commit is contained in:
parent
d0821fb2b4
commit
92168df845
@ -1,6 +1,7 @@
|
||||
package;
|
||||
|
||||
import openfl.system.System;
|
||||
import lime.app.Application;
|
||||
#if sys
|
||||
import sys.io.File;
|
||||
#end
|
||||
@ -242,6 +243,8 @@ class ChartingState extends MusicBeatState
|
||||
var data = TimingStruct.AllTimings[currentIndex - 1];
|
||||
data.endBeat = beat;
|
||||
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
|
||||
var step = ((60 / data.bpm) * 1000) / 4;
|
||||
TimingStruct.AllTimings[currentIndex].startStep = Math.floor(((data.endBeat / (data.bpm / 60)) * 1000) / step);
|
||||
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
|
||||
}
|
||||
|
||||
@ -417,6 +420,8 @@ class ChartingState extends MusicBeatState
|
||||
var data = TimingStruct.AllTimings[currentIndex - 1];
|
||||
data.endBeat = beat;
|
||||
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
|
||||
var step = ((60 / data.bpm) * 1000) / 4;
|
||||
TimingStruct.AllTimings[currentIndex].startStep = Math.floor(((data.endBeat / (data.bpm / 60)) * 1000) / step);
|
||||
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
|
||||
}
|
||||
|
||||
@ -610,6 +615,8 @@ class ChartingState extends MusicBeatState
|
||||
var data = TimingStruct.AllTimings[currentIndex - 1];
|
||||
data.endBeat = beat;
|
||||
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
|
||||
var step = ((60 / data.bpm) * 1000) / 4;
|
||||
TimingStruct.AllTimings[currentIndex].startStep = Math.floor(((data.endBeat / (data.bpm / 60)) * 1000) / step);
|
||||
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
|
||||
}
|
||||
|
||||
@ -638,7 +645,7 @@ class ChartingState extends MusicBeatState
|
||||
var eventPos = new FlxUIInputText(150,100,80,"");
|
||||
var eventAdd = new FlxButton(95,155,"Add Event", function() {
|
||||
|
||||
var pog:Song.Event = new Song.Event("New Event " + HelperFunctions.truncateFloat(curDecimalBeat, 3),HelperFunctions.truncateFloat(curDecimalBeat, 3),_song.bpm,"BPM Change");
|
||||
var pog:Song.Event = new Song.Event("New Event " + HelperFunctions.truncateFloat(curDecimalBeat, 3),HelperFunctions.truncateFloat(curDecimalBeat, 3),_song.bpm + "","BPM Change");
|
||||
|
||||
trace("adding " + pog.name);
|
||||
|
||||
@ -653,13 +660,13 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
eventName.text = pog.name;
|
||||
eventType.selectedLabel = pog.type;
|
||||
eventValue.text = pog.value + "";
|
||||
eventValue.text = pog.value;
|
||||
eventPos.text = pog.position + "";
|
||||
currentSelectedEventName = pog.name;
|
||||
currentEventPosition = pog.position;
|
||||
|
||||
savedType = pog.type;
|
||||
savedValue = pog.value + "";
|
||||
savedValue = pog.value;
|
||||
|
||||
var listofnames = [];
|
||||
|
||||
@ -695,6 +702,8 @@ class ChartingState extends MusicBeatState
|
||||
var data = TimingStruct.AllTimings[currentIndex - 1];
|
||||
data.endBeat = beat;
|
||||
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
|
||||
var step = ((60 / data.bpm) * 1000) / 4;
|
||||
TimingStruct.AllTimings[currentIndex].startStep = Math.floor(((data.endBeat / (data.bpm / 60)) * 1000) / step);
|
||||
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
|
||||
}
|
||||
|
||||
@ -737,13 +746,13 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
eventName.text = firstEvent.name;
|
||||
eventType.selectedLabel = firstEvent.type;
|
||||
eventValue.text = firstEvent.value + "";
|
||||
eventValue.text = firstEvent.value;
|
||||
eventPos.text = firstEvent.position + "";
|
||||
currentSelectedEventName = firstEvent.name;
|
||||
currentEventPosition = firstEvent.position;
|
||||
|
||||
savedType = firstEvent.type;
|
||||
savedValue = firstEvent.value + "";
|
||||
savedValue = firstEvent.value;
|
||||
|
||||
var listofnames = [];
|
||||
|
||||
@ -779,6 +788,8 @@ class ChartingState extends MusicBeatState
|
||||
var data = TimingStruct.AllTimings[currentIndex - 1];
|
||||
data.endBeat = beat;
|
||||
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
|
||||
var step = ((60 / data.bpm) * 1000) / 4;
|
||||
TimingStruct.AllTimings[currentIndex].startStep = Math.floor(((data.endBeat / (data.bpm / 60)) * 1000) / step);
|
||||
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
|
||||
}
|
||||
|
||||
@ -838,7 +849,7 @@ class ChartingState extends MusicBeatState
|
||||
trace("bruh");
|
||||
eventType.selectedLabel = firstEventObject.type;
|
||||
trace("bruh");
|
||||
eventValue.text = firstEventObject.value + "";
|
||||
eventValue.text = firstEventObject.value;
|
||||
trace("bruh");
|
||||
currentSelectedEventName = firstEventObject.name;
|
||||
trace("bruh");
|
||||
@ -858,7 +869,7 @@ class ChartingState extends MusicBeatState
|
||||
trace('selecting ' + name + ' found: ' + event);
|
||||
|
||||
eventName.text = event.name;
|
||||
eventValue.text = event.value + "";
|
||||
eventValue.text = event.value;
|
||||
eventPos.text = event.position + "";
|
||||
eventType.selectedLabel = event.type;
|
||||
currentSelectedEventName = event.name;
|
||||
@ -1161,14 +1172,6 @@ class ChartingState extends MusicBeatState
|
||||
});
|
||||
|
||||
var clearSectionButton:FlxButton = new FlxButton(10, 150, "Clear Section", clearSection);
|
||||
var startSection:FlxButton = new FlxButton(10, 85, "Play Here", function() {
|
||||
PlayState.SONG = _song;
|
||||
FlxG.sound.music.stop();
|
||||
if (!PlayState.isSM)
|
||||
vocals.stop();
|
||||
PlayState.startTime = lastUpdatedSection.startTime;
|
||||
LoadingState.loadAndSwitchState(new PlayState());
|
||||
});
|
||||
|
||||
var swapSection:FlxButton = new FlxButton(10, 170, "Swap Section", function()
|
||||
{
|
||||
@ -1241,7 +1244,6 @@ class ChartingState extends MusicBeatState
|
||||
tab_group_section.add(copyButton);
|
||||
tab_group_section.add(clearSectionButton);
|
||||
tab_group_section.add(swapSection);
|
||||
tab_group_section.add(startSection);
|
||||
|
||||
UI_box.addGroup(tab_group_section);
|
||||
}
|
||||
@ -1491,21 +1493,6 @@ class ChartingState extends MusicBeatState
|
||||
updateHeads();
|
||||
|
||||
for(i in sectionRenderes)
|
||||
{
|
||||
var diff = i.y - strumLine.y;
|
||||
if (diff < 4000 && diff >= -4000)
|
||||
{
|
||||
i.active = true;
|
||||
i.visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
i.active = false;
|
||||
i.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
for(i in curRenderedNotes)
|
||||
{
|
||||
var diff = i.y - strumLine.y;
|
||||
if (diff < 4000 && diff >= -4000)
|
||||
@ -1519,8 +1506,22 @@ class ChartingState extends MusicBeatState
|
||||
i.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
for(i in curRenderedNotes)
|
||||
{
|
||||
var diff = i.y - strumLine.y;
|
||||
if (diff < 4000 && diff >= -4000)
|
||||
{
|
||||
i.active = true;
|
||||
i.visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
i.active = false;
|
||||
i.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var doInput = true;
|
||||
|
||||
for (i in Typeables)
|
||||
@ -1629,6 +1630,8 @@ class ChartingState extends MusicBeatState
|
||||
var data = TimingStruct.AllTimings[currentIndex - 1];
|
||||
data.endBeat = beat;
|
||||
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
|
||||
var step = ((60 / data.bpm) * 1000) / 4;
|
||||
TimingStruct.AllTimings[currentIndex].startStep = Math.floor(((data.endBeat / (data.bpm / 60)) * 1000) / step);
|
||||
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
|
||||
}
|
||||
|
||||
@ -1722,6 +1725,8 @@ class ChartingState extends MusicBeatState
|
||||
+ currentBPM
|
||||
+ "\nCurBeat: "
|
||||
+ HelperFunctions.truncateFloat(curDecimalBeat,3)
|
||||
+ "\nCurStep: "
|
||||
+ curStep
|
||||
+ "\nZoom: "
|
||||
+ zoomFactor;
|
||||
|
||||
@ -2138,13 +2143,13 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
if (check_mustHitSection.checked)
|
||||
{
|
||||
leftIcon.changeIcon(_song.player1);
|
||||
rightIcon.changeIcon(_song.player2);
|
||||
leftIcon.animation.play(_song.player1);
|
||||
rightIcon.animation.play(_song.player2);
|
||||
}
|
||||
else
|
||||
{
|
||||
leftIcon.changeIcon(_song.player2);
|
||||
rightIcon.changeIcon(_song.player1);
|
||||
leftIcon.animation.play(_song.player2);
|
||||
rightIcon.animation.play(_song.player1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user