pog changes
This commit is contained in:
parent
7ff4cd9214
commit
b72908264d
@ -1,5 +1,6 @@
|
||||
package;
|
||||
|
||||
import flixel.FlxCamera;
|
||||
import flixel.addons.ui.FlxUIText;
|
||||
import haxe.zip.Writer;
|
||||
import Conductor.BPMChangeEvent;
|
||||
@ -42,6 +43,10 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
var _file:FileReference;
|
||||
|
||||
public var playClaps:Bool = false;
|
||||
|
||||
public var snap:Int = 2;
|
||||
|
||||
var UI_box:FlxUITabMenu;
|
||||
|
||||
/**
|
||||
@ -91,6 +96,8 @@ class ChartingState extends MusicBeatState
|
||||
private var lastNote:Note;
|
||||
var claps:Array<Note> = [];
|
||||
|
||||
public var snapText:FlxText;
|
||||
|
||||
override function create()
|
||||
{
|
||||
curSection = lastSection;
|
||||
@ -117,6 +124,9 @@ class ChartingState extends MusicBeatState
|
||||
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16);
|
||||
add(gridBG);
|
||||
|
||||
snapText = new FlxText(-100,10,0,"Snap: 1/" + snap + " (Control + Left or Right to change.)\nAdd Notes: 1-8 (or click)\n", 24);
|
||||
snapText.scrollFactor.set();
|
||||
|
||||
gridBlackLine = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height), FlxColor.BLACK);
|
||||
add(gridBlackLine);
|
||||
|
||||
@ -183,6 +193,10 @@ class ChartingState extends MusicBeatState
|
||||
add(curRenderedNotes);
|
||||
add(curRenderedSustains);
|
||||
|
||||
add(snapText);
|
||||
|
||||
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
@ -263,6 +277,14 @@ class ChartingState extends MusicBeatState
|
||||
stepperSongVol.value = FlxG.sound.music.volume;
|
||||
stepperSongVol.name = 'song_instvol';
|
||||
|
||||
|
||||
var hitsounds = new FlxUICheckBox(10, stepperSongVol.y + 35, null, null, "Play hitsounds", 100);
|
||||
hitsounds.checked = false;
|
||||
hitsounds.callback = function()
|
||||
{
|
||||
playClaps = hitsounds.checked;
|
||||
};
|
||||
|
||||
var stepperSongVolLabel = new FlxText(74, 110, 'Instrumental Volume');
|
||||
|
||||
var characters:Array<String> = CoolUtil.coolTextFile(Paths.txt('characterList'));
|
||||
@ -328,6 +350,7 @@ class ChartingState extends MusicBeatState
|
||||
tab_group_song.add(stepperVocalVolLabel);
|
||||
tab_group_song.add(stepperSongVol);
|
||||
tab_group_song.add(stepperSongVolLabel);
|
||||
tab_group_song.add(hitsounds);
|
||||
|
||||
var tab_group_assets = new FlxUI(null, UI_box);
|
||||
tab_group_assets.name = "Assets";
|
||||
@ -436,7 +459,6 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
var applyLength:FlxButton = new FlxButton(10, 100, 'Apply Data');
|
||||
|
||||
tab_group_note.add(writingNotesText);
|
||||
tab_group_note.add(stepperSusLength);
|
||||
tab_group_note.add(stepperSusLengthLabel);
|
||||
tab_group_note.add(applyLength);
|
||||
@ -608,6 +630,8 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
updateHeads();
|
||||
|
||||
snapText.text = "Snap: " + snap;
|
||||
|
||||
curStep = recalculateSteps();
|
||||
|
||||
if (FlxG.keys.justPressed.ALT && UI_box.selected_tab == 0)
|
||||
@ -615,48 +639,41 @@ class ChartingState extends MusicBeatState
|
||||
writingNotes = !writingNotes;
|
||||
}
|
||||
|
||||
if (writingNotes)
|
||||
writingNotesText.text = "WRITING NOTES";
|
||||
else
|
||||
writingNotesText.text = "";
|
||||
|
||||
if (FlxG.keys.pressed.CONTROL && FlxG.keys.justPressed.RIGHT)
|
||||
snap = snap * 2;
|
||||
if (FlxG.keys.pressed.CONTROL && FlxG.keys.justPressed.LEFT)
|
||||
snap = Math.round(snap / 2);
|
||||
if (snap >= 192)
|
||||
snap = 192;
|
||||
if (snap <= 2)
|
||||
snap = 2;
|
||||
Conductor.songPosition = FlxG.sound.music.time;
|
||||
_song.song = typingShit.text;
|
||||
|
||||
var upP = controls.UP_P;
|
||||
var rightP = controls.RIGHT_P;
|
||||
var downP = controls.DOWN_P;
|
||||
var leftP = controls.LEFT_P;
|
||||
var left = FlxG.keys.justPressed.ONE;
|
||||
var down = FlxG.keys.justPressed.TWO;
|
||||
var up = FlxG.keys.justPressed.THREE;
|
||||
var right = FlxG.keys.justPressed.FOUR;
|
||||
var leftO = FlxG.keys.justPressed.FIVE;
|
||||
var downO = FlxG.keys.justPressed.SIX;
|
||||
var upO = FlxG.keys.justPressed.SEVEN;
|
||||
var rightO = FlxG.keys.justPressed.EIGHT;
|
||||
|
||||
var controlArray:Array<Bool> = [leftP, downP, upP, rightP];
|
||||
var pressArray = [left, down, up, right, leftO, downO, upO, rightO];
|
||||
|
||||
if ((upP || rightP || downP || leftP) && writingNotes)
|
||||
for (p in 0...pressArray.length)
|
||||
{
|
||||
for(i in 0...controlArray.length)
|
||||
{
|
||||
if (controlArray[i])
|
||||
{
|
||||
for (n in 0..._song.notes[curSection].sectionNotes.length)
|
||||
{
|
||||
var note = _song.notes[curSection].sectionNotes[n];
|
||||
if (note == null)
|
||||
continue;
|
||||
if (note[0] == Conductor.songPosition && note[1] % 4 == i)
|
||||
{
|
||||
trace('GAMING');
|
||||
_song.notes[curSection].sectionNotes.remove(note);
|
||||
}
|
||||
}
|
||||
trace('adding note');
|
||||
_song.notes[curSection].sectionNotes.push([Conductor.songPosition, i, 0]);
|
||||
updateGrid();
|
||||
}
|
||||
}
|
||||
|
||||
var i = pressArray[p];
|
||||
if (i)
|
||||
addNote(new Note(Conductor.songPosition,p));
|
||||
}
|
||||
|
||||
strumLine.y = getYfromStrum((Conductor.songPosition - sectionStartTime()) % (Conductor.stepCrochet * _song.notes[curSection].lengthInSteps));
|
||||
|
||||
|
||||
|
||||
if (playClaps)
|
||||
{
|
||||
curRenderedNotes.forEach(function(note:Note)
|
||||
{
|
||||
if (FlxG.sound.music.playing)
|
||||
@ -672,7 +689,7 @@ class ChartingState extends MusicBeatState
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/*curRenderedNotes.forEach(function(note:Note) {
|
||||
if (strumLine.overlaps(note) && strumLine.y == note.y) // yandere dev type shit
|
||||
{
|
||||
@ -857,7 +874,7 @@ class ChartingState extends MusicBeatState
|
||||
var shiftThing:Int = 1;
|
||||
if (FlxG.keys.pressed.SHIFT)
|
||||
shiftThing = 4;
|
||||
if (!writingNotes)
|
||||
if (!FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
if (FlxG.keys.justPressed.RIGHT || FlxG.keys.justPressed.D)
|
||||
changeSection(curSection + shiftThing);
|
||||
@ -892,7 +909,7 @@ class ChartingState extends MusicBeatState
|
||||
FlxG.sound.music.pause();
|
||||
vocals.pause();
|
||||
|
||||
FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 0.4);
|
||||
FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.crochet / snap * 0.4);
|
||||
vocals.time = FlxG.sound.music.time;
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,9 @@ class KadeEngineData
|
||||
if (FlxG.save.data.botplay == null)
|
||||
FlxG.save.data.botplay = false;
|
||||
|
||||
if (FlxG.save.data.cpuStrums == null)
|
||||
FlxG.save.data.cpuStrums = false;
|
||||
|
||||
Conductor.recalculateTimings();
|
||||
|
||||
Main.watermarks = FlxG.save.data.watermark;
|
||||
|
@ -35,7 +35,7 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
var newGaming:FlxText;
|
||||
var newGaming2:FlxText;
|
||||
var newInput:Bool = true;
|
||||
public static var firstStart:Bool = true;
|
||||
|
||||
public static var nightly:String = "";
|
||||
|
||||
@ -44,6 +44,7 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
var magenta:FlxSprite;
|
||||
var camFollow:FlxObject;
|
||||
public static var finishedFunnyMove:Bool = false;
|
||||
|
||||
override function create()
|
||||
{
|
||||
@ -59,9 +60,9 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
persistentUpdate = persistentDraw = true;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menuBG'));
|
||||
var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.image('menuBG'));
|
||||
bg.scrollFactor.x = 0;
|
||||
bg.scrollFactor.y = 0.15;
|
||||
bg.scrollFactor.y = 0.10;
|
||||
bg.setGraphicSize(Std.int(bg.width * 1.1));
|
||||
bg.updateHitbox();
|
||||
bg.screenCenter();
|
||||
@ -73,7 +74,7 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
magenta = new FlxSprite(-80).loadGraphic(Paths.image('menuDesat'));
|
||||
magenta.scrollFactor.x = 0;
|
||||
magenta.scrollFactor.y = 0.15;
|
||||
magenta.scrollFactor.y = 0.10;
|
||||
magenta.setGraphicSize(Std.int(magenta.width * 1.1));
|
||||
magenta.updateHitbox();
|
||||
magenta.screenCenter();
|
||||
@ -90,7 +91,7 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
for (i in 0...optionShit.length)
|
||||
{
|
||||
var menuItem:FlxSprite = new FlxSprite(0, 60 + (i * 160));
|
||||
var menuItem:FlxSprite = new FlxSprite(0, FlxG.height * 1.6);
|
||||
menuItem.frames = tex;
|
||||
menuItem.animation.addByPrefix('idle', optionShit[i] + " basic", 24);
|
||||
menuItem.animation.addByPrefix('selected', optionShit[i] + " white", 24);
|
||||
@ -100,8 +101,17 @@ class MainMenuState extends MusicBeatState
|
||||
menuItems.add(menuItem);
|
||||
menuItem.scrollFactor.set();
|
||||
menuItem.antialiasing = true;
|
||||
if (firstStart)
|
||||
FlxTween.tween(menuItem,{y: 60 + (i * 160)},1 + (i * 0.25) ,{ease: FlxEase.bounceInOut, onComplete: function(flxTween:FlxTween)
|
||||
{
|
||||
finishedFunnyMove = true;
|
||||
}});
|
||||
else
|
||||
menuItem.y = 60 + (i * 160);
|
||||
}
|
||||
|
||||
firstStart = false;
|
||||
|
||||
FlxG.camera.follow(camFollow, null, 0.60 * (60 / FlxG.save.data.fpsCap));
|
||||
|
||||
var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, gameVer + (Main.watermarks ? " FNF - " + kadeEngineVer + " Kade Engine" : ""), 12);
|
||||
@ -230,6 +240,8 @@ class MainMenuState extends MusicBeatState
|
||||
}
|
||||
|
||||
function changeItem(huh:Int = 0)
|
||||
{
|
||||
if (finishedFunnyMove)
|
||||
{
|
||||
curSelected += huh;
|
||||
|
||||
@ -237,12 +249,12 @@ class MainMenuState extends MusicBeatState
|
||||
curSelected = 0;
|
||||
if (curSelected < 0)
|
||||
curSelected = menuItems.length - 1;
|
||||
|
||||
}
|
||||
menuItems.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
spr.animation.play('idle');
|
||||
|
||||
if (spr.ID == curSelected)
|
||||
if (spr.ID == curSelected && finishedFunnyMove)
|
||||
{
|
||||
spr.animation.play('selected');
|
||||
camFollow.setPosition(spr.getGraphicMidpoint().x, spr.getGraphicMidpoint().y);
|
||||
|
@ -103,6 +103,29 @@ class DFJKOption extends Option
|
||||
}
|
||||
}
|
||||
|
||||
class CpuStrums extends Option
|
||||
{
|
||||
public function new(desc:String)
|
||||
{
|
||||
super();
|
||||
description = desc;
|
||||
}
|
||||
|
||||
public override function press():Bool
|
||||
{
|
||||
FlxG.save.data.cpuStrums = !FlxG.save.data.cpuStrums;
|
||||
|
||||
display = updateDisplay();
|
||||
return true;
|
||||
}
|
||||
|
||||
private override function updateDisplay():String
|
||||
{
|
||||
return FlxG.save.data.dfjk ? "Light CPU Strums" : "CPU Strums stay static";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DownscrollOption extends Option
|
||||
{
|
||||
public function new(desc:String)
|
||||
|
@ -43,6 +43,7 @@ class OptionsMenu extends MusicBeatState
|
||||
new AccuracyOption("Display accuracy information."),
|
||||
new NPSDisplayOption("Shows your current Notes Per Second."),
|
||||
new SongPositionOption("Show the songs current position (as a bar)"),
|
||||
new CpuStrums("CPU's strumline lights up when a note hits it."),
|
||||
#else
|
||||
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay.")
|
||||
#end
|
||||
|
@ -2374,6 +2374,8 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
}
|
||||
|
||||
if (FlxG.save.data.cpuStrums)
|
||||
{
|
||||
cpuStrums.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
if (spr.animation.finished)
|
||||
@ -2382,6 +2384,7 @@ class PlayState extends MusicBeatState
|
||||
spr.centerOffsets();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!inCutscene)
|
||||
keyShit();
|
||||
|
@ -304,6 +304,8 @@ class TitleState extends MusicBeatState
|
||||
transitioning = true;
|
||||
// FlxG.sound.music.stop();
|
||||
|
||||
MainMenuState.firstStart = true;
|
||||
|
||||
new FlxTimer().start(2, function(tmr:FlxTimer)
|
||||
{
|
||||
// Get current version of Kade Engine
|
||||
|
Loading…
x
Reference in New Issue
Block a user