Skip to content

Commit

Permalink
You can actually tell which note is which
Browse files Browse the repository at this point in the history
  • Loading branch information
poec987 committed Jun 25, 2024
1 parent 9304197 commit f5c77b2
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 4 deletions.
Binary file added assets/shared/images/noteTypes/Kill Santa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/shared/images/noteTypes/Laugh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/shared/images/noteTypes/No Animation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/shared/images/noteTypes/Normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 30 additions & 2 deletions source/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class ChartingState extends MusicBeatState

var curRenderedNotes:FlxTypedGroup<Note>;
var curRenderedSustains:FlxTypedGroup<FlxSprite>;
var curRenderedTypes:FlxTypedGroup<FlxSprite>;
var shownNotes:Array<Note> = [];

var gridBG:FlxSprite;
Expand Down Expand Up @@ -113,6 +114,7 @@ class ChartingState extends MusicBeatState

curRenderedNotes = new FlxTypedGroup<Note>();
curRenderedSustains = new FlxTypedGroup<FlxSprite>();
curRenderedTypes = new FlxTypedGroup<FlxSprite>();

if (PlayState.SONG != null)
_song = PlayState.SONG;
Expand Down Expand Up @@ -176,6 +178,7 @@ class ChartingState extends MusicBeatState

add(curRenderedNotes);
add(curRenderedSustains);
add(curRenderedTypes);

super.create();
}
Expand Down Expand Up @@ -335,14 +338,16 @@ class ChartingState extends MusicBeatState

var noteTypes:Array<String> = [
"Normal",
"Test",
// "Test",
"No Animation",
"Laugh",
"Kill Santa"
];

var noteTypeDropDown:FlxUIDropDownMenu;

var selectedNoteType:String;

function addNoteUI():Void
{
var tab_group_note = new FlxUI(null, UI_box);
Expand All @@ -356,7 +361,14 @@ class ChartingState extends MusicBeatState

noteTypeDropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(noteTypes, true), function(type:String)
{
curSelectedNote[3] = noteTypes[Std.parseInt(type)];
if (curSelectedNote != null) {
curSelectedNote[3] = noteTypes[Std.parseInt(type)];
selectedNoteType = noteTypes[Std.parseInt(type)];
} else {
selectedNoteType = noteTypes[Std.parseInt(type)];
}

updateGrid();
});

tab_group_note.add(stepperSusLength);
Expand Down Expand Up @@ -900,6 +912,11 @@ class ChartingState extends MusicBeatState
curRenderedSustains.remove(curRenderedSustains.members[0], true);
}

while (curRenderedTypes.members.length > 0)
{
curRenderedTypes.remove(curRenderedTypes.members[0], true);
}

var sectionInfo:Array<Dynamic> = _song.notes[curSection].sectionNotes;

if (_song.notes[curSection].changeBPM && _song.notes[curSection].bpm > 0)
Expand Down Expand Up @@ -936,6 +953,7 @@ class ChartingState extends MusicBeatState
var daNoteInfo = i[1];
var daStrumTime = i[0];
var daSus = i[2];
var daType = i[3];

var note:Note = new Note(daStrumTime, daNoteInfo % 4);
note.sustainLength = daSus;
Expand All @@ -946,6 +964,12 @@ class ChartingState extends MusicBeatState

curRenderedNotes.add(note);

var sillyNoteType:FlxSprite = new FlxSprite(Math.floor(daNoteInfo * GRID_SIZE), Math.floor(getYfromStrum((daStrumTime - sectionStartTime()) % (Conductor.stepCrochet * _song.notes[curSection].lengthInSteps)))).loadGraphic(Paths.image("noteTypes/"+daType));
sillyNoteType.setGraphicSize(GRID_SIZE, GRID_SIZE);
sillyNoteType.updateHitbox();

curRenderedTypes.add(sillyNoteType);

if (daSus > 0)
{
var sustainVis:FlxSprite = new FlxSprite(note.x + (GRID_SIZE / 2),
Expand Down Expand Up @@ -1026,6 +1050,10 @@ class ChartingState extends MusicBeatState
var noteSus = 0;
var noteType = "Normal";

if (selectedNoteType != null) {
noteType = selectedNoteType;
}

_song.notes[curSection].sectionNotes.push([noteStrum, noteData, noteSus, noteType]);

curSelectedNote = _song.notes[curSection].sectionNotes[_song.notes[curSection].sectionNotes.length - 1];
Expand Down
5 changes: 3 additions & 2 deletions source/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@ class FreeplayState extends MusicBeatState
"Funkin");

pages[1] = new FreeplayPage([
newSong("Tutorial-BSide", 1, "gf")
newSong("Tutorial-BSide", 1, "gf"),
newSong("Spookeez-Erect", 1, "spooky")
],
"Remixes");

pages[2] = new FreeplayPage([
newSong("Do-You-Get-The-Refrance", 1, "impostor", true),
newSong("dotdotdot", 1, "sonicexe"),
newSong("Stop-It-Right-There-Criminal-Scum", 1, "dave")
newSong("Stop-Right-There-Criminal-Scum", 1, "dave")
],
"Extras");

Expand Down

0 comments on commit f5c77b2

Please sign in to comment.