Fixed Note Speed
This commit is contained in:
parent
fc36958af9
commit
0cb23f7972
@ -40,8 +40,9 @@ class Note extends FlxSprite
|
||||
if (prevNote == null)
|
||||
prevNote = this;
|
||||
|
||||
if (FlxG.save.data.downscroll)
|
||||
flipY = true;
|
||||
// And have up and down arrows flipped too? Nop
|
||||
/* if (FlxG.save.data.downscroll)
|
||||
flipY = true; */
|
||||
|
||||
this.prevNote = prevNote;
|
||||
isSustainNote = sustainNote;
|
||||
@ -49,6 +50,7 @@ class Note extends FlxSprite
|
||||
x += 50;
|
||||
// MAKE SURE ITS DEFINITELY OFF SCREEN?
|
||||
y -= 2000;
|
||||
|
||||
this.strumTime = strumTime + FlxG.save.data.offset;
|
||||
|
||||
this.noteData = noteData;
|
||||
@ -65,19 +67,29 @@ class Note extends FlxSprite
|
||||
animation.add('blueScroll', [5]);
|
||||
animation.add('purpleScroll', [4]);
|
||||
|
||||
if (isSustainNote)
|
||||
{
|
||||
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
|
||||
|
||||
animation.add('purpleholdend', [4]);
|
||||
animation.add('greenholdend', [6]);
|
||||
animation.add('redholdend', [7]);
|
||||
animation.add('blueholdend', [5]);
|
||||
|
||||
// Hold piece
|
||||
animation.add('purplehold', [0]);
|
||||
animation.add('greenhold', [2]);
|
||||
animation.add('redhold', [3]);
|
||||
animation.add('bluehold', [1]);
|
||||
|
||||
if (isSustainNote)
|
||||
{
|
||||
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
|
||||
|
||||
if(!FlxG.save.data.downscroll)
|
||||
{
|
||||
// Trail end
|
||||
animation.add('purpleholdend', [4]);
|
||||
animation.add('greenholdend', [6]);
|
||||
animation.add('redholdend', [7]);
|
||||
animation.add('blueholdend', [5]);
|
||||
}else {
|
||||
animation.add('purpleholdend', [4], 0, false, false, true);
|
||||
animation.add('greenholdend', [6], 0, false, false, true);
|
||||
animation.add('redholdend', [7], 0, false, false, true);
|
||||
animation.add('blueholdend', [5], 0, false, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
|
||||
@ -91,16 +103,24 @@ class Note extends FlxSprite
|
||||
animation.addByPrefix('blueScroll', 'blue0');
|
||||
animation.addByPrefix('purpleScroll', 'purple0');
|
||||
|
||||
animation.addByPrefix('purpleholdend', 'pruple end hold');
|
||||
animation.addByPrefix('greenholdend', 'green hold end');
|
||||
animation.addByPrefix('redholdend', 'red hold end');
|
||||
animation.addByPrefix('blueholdend', 'blue hold end');
|
||||
|
||||
animation.addByPrefix('purplehold', 'purple hold piece');
|
||||
animation.addByPrefix('greenhold', 'green hold piece');
|
||||
animation.addByPrefix('redhold', 'red hold piece');
|
||||
animation.addByPrefix('bluehold', 'blue hold piece');
|
||||
|
||||
if(!FlxG.save.data.downscroll)
|
||||
{
|
||||
animation.addByPrefix('purpleholdend', 'pruple end hold');
|
||||
animation.addByPrefix('greenholdend', 'green hold end');
|
||||
animation.addByPrefix('redholdend', 'red hold end');
|
||||
animation.addByPrefix('blueholdend', 'blue hold end');
|
||||
}else {
|
||||
animation.addByPrefix('purpleholdend', 'pruple end hold', 0, false, false, true);
|
||||
animation.addByPrefix('greenholdend', 'green hold end', 0, false, false, true);
|
||||
animation.addByPrefix('redholdend', 'red hold end', 0, false, false, true);
|
||||
animation.addByPrefix('blueholdend', 'blue hold end', 0, false, false, true);
|
||||
}
|
||||
|
||||
setGraphicSize(Std.int(width * 0.7));
|
||||
updateHitbox();
|
||||
antialiasing = true;
|
||||
@ -164,7 +184,7 @@ class Note extends FlxSprite
|
||||
prevNote.animation.play('redhold');
|
||||
}
|
||||
|
||||
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
|
||||
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * FlxG.save.data.noteSpeed;
|
||||
prevNote.updateHitbox();
|
||||
// prevNote.setGraphicSize();
|
||||
}
|
||||
|
@ -17,6 +17,8 @@ class OptionsMenu extends MusicBeatState
|
||||
{
|
||||
var selector:FlxText;
|
||||
var curSelected:Int = 0;
|
||||
var chartSpeed:FlxText;
|
||||
var speedState:String;
|
||||
|
||||
var controlsStrings:Array<String> = [];
|
||||
|
||||
@ -31,6 +33,7 @@ class OptionsMenu extends MusicBeatState
|
||||
"\n" + (FlxG.save.data.downscroll ? 'Downscroll' : 'Upscroll') +
|
||||
"\nAccuracy " + (!FlxG.save.data.accuracyDisplay ? "off" : "on") +
|
||||
"\nSong Position " + (!FlxG.save.data.songPosition ? "off" : "on") +
|
||||
"\nNote Speed" +
|
||||
"\nEtterna Mode " + (!FlxG.save.data.etternaMode ? "off" : "on") +
|
||||
"\nLoad replays");
|
||||
|
||||
@ -61,6 +64,20 @@ class OptionsMenu extends MusicBeatState
|
||||
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
||||
add(versionShit);
|
||||
|
||||
var tmp_Speed:Float = FlxG.save.data.noteSpeed;
|
||||
|
||||
chartSpeed = new FlxText(FlxG.width - 387, FlxG.height - 18, 0, "Note Speed (Hover, then Left and Right): " + tmp_Speed, 12);
|
||||
chartSpeed.scrollFactor.set();
|
||||
chartSpeed.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
||||
|
||||
if(tmp_Speed == -1) chartSpeed.x = FlxG.width - 470;
|
||||
else if(tmp_Speed == 1.5 || tmp_Speed == 2.5 || tmp_Speed == 3.5) chartSpeed.x = FlxG.width - 405;
|
||||
else chartSpeed.x = FlxG.width - 387;
|
||||
|
||||
if(FlxG.save.data.noteSpeed > 0) chartSpeed.text = "Note Speed (Hover, then Left and Right): " + FlxG.save.data.noteSpeed.toString();
|
||||
else chartSpeed.text = "Note Speed (Hover, then Left and Right): Song Based";
|
||||
add(chartSpeed);
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
@ -76,22 +93,73 @@ class OptionsMenu extends MusicBeatState
|
||||
changeSelection(1);
|
||||
|
||||
if (controls.RIGHT_R)
|
||||
{
|
||||
if(curSelected != 5)
|
||||
{
|
||||
FlxG.save.data.offset++;
|
||||
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset;
|
||||
}else {
|
||||
if(FlxG.save.data.noteSpeed < 4.0)
|
||||
if(FlxG.save.data.noteSpeed == -1) FlxG.save.data.noteSpeed = 1.0;
|
||||
else FlxG.save.data.noteSpeed += 0.5;
|
||||
|
||||
grpControls.remove(grpControls.members[curSelected]);
|
||||
var ctrl:Alphabet = new Alphabet(0, (70 * curSelected) + 30, "Note Speed", true, false);
|
||||
ctrl.isMenuItem = true;
|
||||
ctrl.targetY = curSelected - 5;
|
||||
grpControls.add(ctrl);
|
||||
|
||||
if(FlxG.save.data.noteSpeed > 0) speedState = FlxG.save.data.noteSpeed.toString();
|
||||
else speedState = "Song Based";
|
||||
|
||||
chartSpeed.text = "Note Speed (Hover, then Left and Right): " + speedState;
|
||||
|
||||
trace(FlxG.save.data.noteSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
if (controls.LEFT_R)
|
||||
{
|
||||
if(curSelected != 5)
|
||||
{
|
||||
FlxG.save.data.offset--;
|
||||
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset;
|
||||
}else {
|
||||
if(FlxG.save.data.noteSpeed > 1.0) FlxG.save.data.noteSpeed -= 0.5;
|
||||
else FlxG.save.data.noteSpeed = -1;
|
||||
|
||||
trace(FlxG.save.data.noteSpeed);
|
||||
var speedState = "";
|
||||
|
||||
if(FlxG.save.data.noteSpeed > 0) speedState = FlxG.save.data.noteSpeed.toString();
|
||||
else speedState = "Song Based";
|
||||
|
||||
chartSpeed.text = "Note Speed (Hover, then Left and Right): " + speedState;
|
||||
|
||||
grpControls.remove(grpControls.members[curSelected]);
|
||||
var ctrl:Alphabet = new Alphabet(0, (70 * curSelected) + 30, "Note Speed", true, false);
|
||||
ctrl.isMenuItem = true;
|
||||
ctrl.targetY = curSelected - 5;
|
||||
grpControls.add(ctrl);
|
||||
|
||||
trace(FlxG.save.data.noteSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
if(controls.LEFT_R && curSelected == 5 || controls.RIGHT_R && curSelected == 5 )
|
||||
{
|
||||
var tmp_Speed:Float = FlxG.save.data.noteSpeed;
|
||||
|
||||
if(tmp_Speed == -1) chartSpeed.x = FlxG.width - 470;
|
||||
else if(tmp_Speed == 1.5 || tmp_Speed == 2.5 || tmp_Speed == 3.5) chartSpeed.x = FlxG.width - 405;
|
||||
else chartSpeed.x = FlxG.width - 387;
|
||||
}
|
||||
|
||||
if (controls.ACCEPT)
|
||||
{
|
||||
if (curSelected != 6)
|
||||
if (curSelected != 7 && curSelected != 5)
|
||||
grpControls.remove(grpControls.members[curSelected]);
|
||||
|
||||
switch(curSelected)
|
||||
{
|
||||
case 0:
|
||||
@ -129,13 +197,13 @@ class OptionsMenu extends MusicBeatState
|
||||
ctrl.isMenuItem = true;
|
||||
ctrl.targetY = curSelected - 4;
|
||||
grpControls.add(ctrl);
|
||||
case 5:
|
||||
case 6:
|
||||
FlxG.save.data.etternaMode = !FlxG.save.data.etternaMode;
|
||||
var ctrl:Alphabet = new Alphabet(0, (70 * curSelected) + 30, "Etterna Mode " + (!FlxG.save.data.etternaMode ? "off" : "on"), true, false);
|
||||
ctrl.isMenuItem = true;
|
||||
ctrl.targetY = curSelected - 5;
|
||||
ctrl.targetY = curSelected - 6;
|
||||
grpControls.add(ctrl);
|
||||
case 6:
|
||||
case 7:
|
||||
trace('switch');
|
||||
FlxG.switchState(new LoadReplayState());
|
||||
}
|
||||
|
@ -1878,9 +1878,14 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
|
||||
if (FlxG.save.data.downscroll)
|
||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
|
||||
if(FlxG.save.data.noteSpeed != -1)
|
||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(FlxG.save.data.noteSpeed, 2)));
|
||||
else daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
|
||||
else
|
||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
|
||||
if(FlxG.save.data.noteSpeed != -1)
|
||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(FlxG.save.data.noteSpeed, 2)));
|
||||
else daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
|
||||
|
||||
//trace(daNote.y);
|
||||
// WIP interpolation shit? Need to fix the pause issue
|
||||
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
|
||||
|
Loading…
x
Reference in New Issue
Block a user