fix some stuff
This commit is contained in:
parent
d0d2adcbfe
commit
ffb726d8a1
@ -129,7 +129,7 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
blackBorder.alpha = 0.3;
|
||||
|
||||
snapText = new FlxText(60,10,0,"Snap: 1/" + snap + " (Press Control to unsnap the cursor)\nAdd Notes: 1-8 (or click)\nDiff: 0", 14);
|
||||
snapText = new FlxText(60,10,0,"Snap: 1/" + snap + " (Press SHIFT to unsnap the cursor)\nAdd Notes: 1-8 (or click)\nDiff: 0", 14);
|
||||
snapText.scrollFactor.set();
|
||||
|
||||
gridBlackLine = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height), FlxColor.BLACK);
|
||||
@ -660,7 +660,7 @@ class ChartingState extends MusicBeatState
|
||||
}
|
||||
|
||||
var writingNotes:Bool = false;
|
||||
var doSnapShit:Bool = true;
|
||||
var doSnapShit:Bool = false;
|
||||
|
||||
public var diff:Float = 0;
|
||||
|
||||
@ -668,7 +668,7 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
updateHeads();
|
||||
|
||||
snapText.text = "Song Diff: " + diff + "\nSnap: 1/" + snap + " (" + (doSnapShit ? "Control to disable" : "Snap Disabled, Control to renable") + ")\nAdd Notes: 1-8 (or click)";
|
||||
snapText.text = "Snap: 1/" + snap + " (" + (doSnapShit ? "Shift to disable" : "Snap Disabled, Shift to renable. It's a bit buggy") + ")\nAdd Notes: 1-8 (or click)";
|
||||
|
||||
curStep = recalculateSteps();
|
||||
|
||||
@ -681,7 +681,7 @@ class ChartingState extends MusicBeatState
|
||||
if (snap <= 1)
|
||||
snap = 1;*/
|
||||
|
||||
if (FlxG.keys.justPressed.CONTROL)
|
||||
if (FlxG.keys.justPressed.SHIFT)
|
||||
doSnapShit = !doSnapShit;
|
||||
|
||||
Conductor.songPosition = FlxG.sound.music.time;
|
||||
@ -961,17 +961,30 @@ class ChartingState extends MusicBeatState
|
||||
vocals.pause();
|
||||
claps.splice(0, claps.length);
|
||||
|
||||
var stepMs = curStep * Conductor.stepCrochet;
|
||||
var amount = FlxG.mouse.wheel;
|
||||
|
||||
|
||||
trace(Conductor.stepCrochet / snap);
|
||||
if(amount > 0 && strumLine.y < gridBG.y)
|
||||
amount = 0;
|
||||
|
||||
if (doSnapShit)
|
||||
FlxG.sound.music.time = stepMs - (FlxG.mouse.wheel * Conductor.stepCrochet / snap);
|
||||
else
|
||||
FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 0.4);
|
||||
trace(stepMs + " + " + Conductor.stepCrochet / snap + " -> " + FlxG.sound.music.time);
|
||||
{
|
||||
var increase:Int = 0;
|
||||
|
||||
if (amount < 0)
|
||||
increase = 1;
|
||||
else
|
||||
increase = -1;
|
||||
|
||||
trace(increase + " - " + curStep + " - " + (curStep + increase));
|
||||
|
||||
curStep += increase;
|
||||
|
||||
var stepMs = curStep * Conductor.stepCrochet;
|
||||
|
||||
FlxG.sound.music.time = stepMs;
|
||||
}
|
||||
else
|
||||
FlxG.sound.music.time -= (amount * Conductor.stepCrochet * 0.4);
|
||||
vocals.time = FlxG.sound.music.time;
|
||||
}
|
||||
|
||||
@ -1187,7 +1200,7 @@ class ChartingState extends MusicBeatState
|
||||
function updateGrid():Void
|
||||
{
|
||||
remove(gridBG);
|
||||
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * _song.notes[curSection].lengthInSteps);
|
||||
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16);
|
||||
add(gridBG);
|
||||
|
||||
remove(gridBlackLine);
|
||||
@ -1263,8 +1276,6 @@ class ChartingState extends MusicBeatState
|
||||
}
|
||||
}
|
||||
|
||||
if (_song != null)
|
||||
diff = DiffCalc.CalculateDiff(_song);
|
||||
}
|
||||
|
||||
private function addSection(lengthInSteps:Int = 16):Void
|
||||
|
@ -28,6 +28,8 @@ class Conductor
|
||||
public static var safeZoneOffset:Float = Math.floor((safeFrames / 60) * 1000); // is calculated in create(), is safeFrames in milliseconds
|
||||
public static var timeScale:Float = Conductor.safeZoneOffset / 166;
|
||||
|
||||
public static var lengthInSteps:Float = 0;
|
||||
|
||||
public static var bpmChangeMap:Array<BPMChangeEvent> = [];
|
||||
|
||||
public function new()
|
||||
@ -74,5 +76,9 @@ class Conductor
|
||||
|
||||
crochet = ((60 / bpm) * 1000);
|
||||
stepCrochet = crochet / 4;
|
||||
|
||||
lengthInSteps = (FlxG.sound.music.length / stepCrochet);
|
||||
|
||||
trace("\nLength in in steps: " + lengthInSteps);
|
||||
}
|
||||
}
|
@ -16,7 +16,6 @@ class SmallNote // basically Note.hx but small as fuck
|
||||
|
||||
class DiffCalc
|
||||
{
|
||||
|
||||
public static var scale = 3 * 1.8;
|
||||
|
||||
public static function CalculateDiff(song:SwagSong, ?accuracy:Float = .93)
|
||||
@ -77,6 +76,8 @@ class DiffCalc
|
||||
}
|
||||
}
|
||||
|
||||
// collect all of the notes in each col
|
||||
|
||||
var leftHandCol:Array<Float> = []; // d 0
|
||||
var leftMHandCol:Array<Float> = []; // f 1
|
||||
var rightMHandCol:Array<Float> = []; // j 2
|
||||
@ -106,6 +107,8 @@ class DiffCalc
|
||||
|
||||
var segmentsTwo = new haxe.ds.Vector(Math.floor(length));
|
||||
|
||||
// set em all to array's (so no null's)
|
||||
|
||||
for(i in 0...segmentsOne.length)
|
||||
segmentsOne[i] = new Array<SmallNote>();
|
||||
for(i in 0...segmentsTwo.length)
|
||||
@ -141,6 +144,7 @@ class DiffCalc
|
||||
segmentsTwo[i] = null;
|
||||
}*/
|
||||
|
||||
// get nps for both hands
|
||||
|
||||
var hand_npsOne:Array<Float> = new Array<Float>();
|
||||
var hand_npsTwo:Array<Float> = new Array<Float>();
|
||||
@ -158,6 +162,7 @@ class DiffCalc
|
||||
hand_npsTwo.push(i.length * scale * 1.6);
|
||||
}
|
||||
|
||||
// get the diff vector's for all of the hands
|
||||
|
||||
var hand_diffOne:Array<Float> = new Array<Float>();
|
||||
var hand_diffTwo:Array<Float> = new Array<Float>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user