Skip to content

Commit

Permalink
more stuff
Browse files Browse the repository at this point in the history
changing the note colors now actually changes the color of the notes, strums when lit up and splashes
chart editor has less lag
  • Loading branch information
JordanSantiagoYT authored Aug 5, 2023
1 parent 992d2f1 commit a6c6c7c
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 29 deletions.
33 changes: 18 additions & 15 deletions source/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,26 @@ class Note extends FlxSprite

if(noteData > -1) {
texture = '';
if(ClientPrefs.noteStyleThing == 'VS Nonsense V2') {
texture = 'Nonsense_NOTE_assets';
}
if(ClientPrefs.noteStyleThing == 'DNB 3D') {
texture = 'NOTE_assets_3D';
}
if(ClientPrefs.noteStyleThing == 'VS AGOTI') {
texture = 'AGOTINOTE_assets';
}
if(ClientPrefs.noteStyleThing == 'Doki Doki+') {
texture = 'NOTE_assets_doki';
}
if(ClientPrefs.noteStyleThing == 'TGT V4') {
texture = 'TGTNOTE_assets';
}
colorSwap = new ColorSwap();
shader = colorSwap.shader;
colorSwap.hue = ClientPrefs.arrowHSV[noteData][0] / 360;
colorSwap.saturation = ClientPrefs.arrowHSV[noteData][1] / 100;
colorSwap.brightness = ClientPrefs.arrowHSV[noteData][2] / 100;

x += swagWidth * (noteData);
if(!isSustainNote && noteData > -1 && noteData < 4) { //Doing this 'if' check to fix the warnings on Senpai songs
Expand Down Expand Up @@ -264,21 +282,6 @@ class Note extends FlxSprite
if(skin == null || skin.length < 1) {
skin = 'NOTE_assets';
}
if(ClientPrefs.noteStyleThing == 'VS Nonsense V2') {
skin = 'Nonsense_NOTE_assets';
}
if(ClientPrefs.noteStyleThing == 'DNB 3D') {
skin = 'NOTE_assets_3D';
}
if(ClientPrefs.noteStyleThing == 'VS AGOTI') {
skin = 'AGOTINOTE_assets';
}
if(ClientPrefs.noteStyleThing == 'Doki Doki+') {
skin = 'NOTE_assets_doki';
}
if(ClientPrefs.noteStyleThing == 'TGT V4') {
skin = 'TGTNOTE_assets';
}
}

var animName:String = null;
Expand Down
3 changes: 3 additions & 0 deletions source/NoteSplash.hx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class NoteSplash extends FlxSprite

colorSwap = new ColorSwap();
shader = colorSwap.shader;
colorSwap.hue = ClientPrefs.arrowHSV[note][0] / 360;
colorSwap.saturation = ClientPrefs.arrowHSV[note][1] / 100;
colorSwap.brightness = ClientPrefs.arrowHSV[note][2] / 100;

setupNoteSplash(x, y, note);
antialiasing = ClientPrefs.globalAntialiasing;
Expand Down
40 changes: 38 additions & 2 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,42 @@ class PlayState extends MusicBeatState
['PERFECT!!!!!!', 1] //The value on this one isn't used actually, since Perfect is always "1"
];
}
if (ClientPrefs.rateNameStuff == 'Psych Quotes')
{
ratingStuff = [
['How are you this bad?', 0.1], //From 0% to 9%
['You Suck!', 0.2], //From 10% to 19%
['Horribly Shit', 0.3], //From 20% to 29%
['Shit', 0.4], //From 30% to 39%
['Bad', 0.5], //From 40% to 49%
['Bruh', 0.6], //From 50% to 59%
['Meh', 0.69], //From 60% to 68%
['Nice', 0.7], //69%
['Good', 0.8], //From 70% to 79%
['Great', 0.9], //From 80% to 89%
['Sick!', 1], //From 90% to 99%
['Perfect!!', 1] //The value on this one isn't used actually, since Perfect is always "1"
];
}
if (ClientPrefs.rateNameStuff == 'Shaggyverse Quotes')
{
ratingStuff = [
['G - Ruh Rouh!', 0.2], //From 0% to 19%
['F - OOF', 0.4], //From 20% to 39%
["E - Like, You're Bad", 0.5], //From 40% to 49%
['D - Like, how are you still alive?', 0.6], //From 50% to 59%
['C - ZOINKS!', 0.69], //From 60% to 68%
["Nice - WOW, that's a funny number man!", 0.7], //69%
["B - That's like, really cool...", 0.75], //From 70% to 74%
["B+ - Hey, man, you're starting to improve!", 0.8], //From 75% to 79%
['A - This is a challenge!', 0.85], //From 80% to 84%
['AA - Hey Scoob, This kid is good!', 0.9], //From 85% to 90%
['S - Like, Thats Good', 0.95], //From 90% to 94%
['SS - Like, Thats Great!', 0.99], //From 95% to 98%
['SSS - Like, Thats Sick!', 1], //99%
['SSSS - Like, WOW', 1] //The value on this one isn't used actually, since Perfect is always "1"
];
}
if (ClientPrefs.rateNameStuff == 'Letters')
{
ratingStuff = [
Expand Down Expand Up @@ -6894,7 +6930,7 @@ class PlayState extends MusicBeatState
coolText.screenCenter();
coolText.x = FlxG.width * 0.35;
//
if(ClientPrefs.scoreZoom && !cpuControlled)
if(ClientPrefs.scoreZoom && ClientPrefs.hideScore && !cpuControlled)
{
if(scoreTxtTween != null) {
scoreTxtTween.cancel();
Expand Down Expand Up @@ -8487,7 +8523,7 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT
strum = playerStrums.members[note.noteData];
}
if(strum != null) {
spawnNoteSplash(strum.x, strum.y, note.noteData, note);
spawnNoteSplash(strum.x, strum.y, note.noteData);
}
}
}
Expand Down
38 changes: 26 additions & 12 deletions source/editors/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ class ChartingState extends MusicBeatState
&& FlxG.mouse.y < gridBG.y + gridBG.height)
if (!FlxG.keys.pressed.CONTROL) //stop crashing
addNote(); //allows you to draw notes by holding left click
updateGrid(false);
updateGrid(false);
updateNoteUI();
}

Expand Down Expand Up @@ -2110,7 +2110,7 @@ class ChartingState extends MusicBeatState
} else if (curSelectedNote[1] == 6 + 1) {
curSelectedNote[1] = 0;
}
updateGrid();
updateGrid(false);
}
if (FlxG.keys.pressed.LEFT)
if (curSelectedNote != null && curSelectedNote[1] > -1 && curSelectedNote[2] != null) {
Expand All @@ -2119,7 +2119,7 @@ class ChartingState extends MusicBeatState
} else if (curSelectedNote[1] == 0) {
curSelectedNote[1] = 7;
}
updateGrid();
updateGrid(false);
}
}

Expand Down Expand Up @@ -2758,7 +2758,7 @@ class ChartingState extends MusicBeatState
}

updateNoteUI();
updateGrid();
updateGrid(false);
}

function recalculateSteps(add:Float = 0):Int
Expand All @@ -2782,7 +2782,7 @@ class ChartingState extends MusicBeatState

function resetSection(songBeginning:Bool = false):Void
{
updateGrid(songBeginning);
updateGrid(!songBeginning);

FlxG.sound.music.pause();
// Basically old shit from changeSection???
Expand Down Expand Up @@ -2842,7 +2842,7 @@ class ChartingState extends MusicBeatState
}
Conductor.songPosition = FlxG.sound.music.time;
updateWaveform();
updateGrid(true);
if (updateTheGridBITCH) updateGrid(true);
}

function updateSectionUI():Void
Expand Down Expand Up @@ -2933,11 +2933,26 @@ class ChartingState extends MusicBeatState

function updateGrid(?andNext:Bool = true):Void
{
curRenderedNotes.forEach(note -> {
curRenderedNotes.remove(note, true);
note.destroy();
});
curRenderedNotes.clear();
curRenderedSustains.clear();
curRenderedNoteType.forEach(txt -> {
curRenderedNoteType.remove(txt, true);
txt.destroy();
});
curRenderedNoteType.clear();
if (andNext) nextRenderedNotes.clear();
if (andNext) nextRenderedSustains.clear();
if (andNext)
{
nextRenderedNotes.forEach(note -> {
nextRenderedNotes.remove(note, true);
note.destroy();
});
nextRenderedNotes.clear();
nextRenderedSustains.clear();
}

if (_song.notes[curSec].changeBPM && _song.notes[curSec].bpm > 0)
{
Expand Down Expand Up @@ -3006,9 +3021,9 @@ class ChartingState extends MusicBeatState
}
}

// NEXT SECTION
// NEXT SECTION, which shouldnt even update if you're in the current section
var beats:Float = getSectionBeats(1);
if(curSec < _song.notes.length-1) {
if(curSec < _song.notes.length-1 && andNext) {
for (i in _song.notes[curSec+1].sectionNotes)
{
var note:Note = setupNoteData(i, true);
Expand Down Expand Up @@ -3153,7 +3168,7 @@ class ChartingState extends MusicBeatState
}
changeEventSelected();

updateGrid();
updateGrid(false);
updateNoteUI();
}

Expand Down Expand Up @@ -3205,7 +3220,6 @@ class ChartingState extends MusicBeatState
//trace('tryin to delete note...');
if(!delnote) deleteNote(note);
delnote = true;
updateGrid(false);
}
});
}
Expand Down

0 comments on commit a6c6c7c

Please sign in to comment.