diff --git a/LLSIG/src/main/java/LLSIG/LLSIG.java b/LLSIG/src/main/java/LLSIG/LLSIG.java index ecbe381..8fb8041 100644 --- a/LLSIG/src/main/java/LLSIG/LLSIG.java +++ b/LLSIG/src/main/java/LLSIG/LLSIG.java @@ -52,7 +52,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{ public boolean METRONOME = false; public boolean BPM_MEASURE = false; public boolean PLAYING = true; //Whether or not a song is loaded and playing. - public boolean EDITOR = true; //Whether or not we are in beatmap editing mode. + public boolean EDITOR = false; //Whether or not we are in beatmap editing mode. public boolean HOLDING_CTRL_KEY = false; public static double EDITOR_CURSOR_BEAT = 0; @@ -135,6 +135,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{ window.add(canvas); window.setVisible(true); window.addKeyListener(this); + window.addMouseWheelListener(this); new Thread() { public void run(){ @@ -175,6 +176,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{ l.clearOutInactiveNotes(); }*/ l.clearOutDeletedNotes(); + l.addFromQueue(); } for (BeatTiming bt : timings) { if (bt.active&&musicPlayer.getPlayPosition()>=bt.offset&&bt.offset>offset) { @@ -412,6 +414,8 @@ public class LLSIG implements KeyListener,MouseWheelListener{ LLSIG.game.lanes.get(lane).addNote(n,true); LLSIG.game.lanes.get(lane).lastNoteAdded=n; l.keyPressed=true; + clap.setFramePosition(0); + clap.start(); } } } else @@ -508,6 +512,8 @@ public class LLSIG implements KeyListener,MouseWheelListener{ lastNote.setNoteType(NoteType.HOLD); lastNote.setBeatSnapEnd(EDITOR_CURSOR_BEAT); lastNote.active2=false; + clap.setFramePosition(0); + clap.start(); } } LLSIG.game.lanes.get(lane).keyPressed=false; @@ -540,6 +546,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{ } } } + keyState[lane]=false; } } diff --git a/LLSIG/src/main/java/LLSIG/Lane.java b/LLSIG/src/main/java/LLSIG/Lane.java index f326814..244b55d 100644 --- a/LLSIG/src/main/java/LLSIG/Lane.java +++ b/LLSIG/src/main/java/LLSIG/Lane.java @@ -1,8 +1,10 @@ package main.java.LLSIG; +import java.util.ArrayList; import java.util.List; public class Lane{ List noteChart; + List addQueue = new ArrayList(); int currentNoteIndex = 0; TimingRating lastRating = TimingRating.MISS; double lastNote = -1; @@ -49,23 +51,26 @@ public class Lane{ addNote(n,false); } public void addNote(Note n,boolean performReorderingOfList) { - if (performReorderingOfList) { - boolean added=false; - for (int i=0;in.start) { - noteChart.add(i,n); - added=true; - break; + addQueue.add(n); + } + + public void addFromQueue() { + for (Note n : addQueue) { + boolean added=false; + for (int i=0;in.start) { + noteChart.add(i,n); + added=true; + break; + } + } + if (!added) { + noteChart.add(n); } - } - if (!added) { - noteChart.add(n); - } - } else { - noteChart.add(n); + System.out.println("Note added: "+n); } - System.out.println("Note added: "+n); + addQueue.clear(); } public void markMissedNotes() { if (LLSIG.game.PLAYING) { diff --git a/LLSIG/src/main/java/LLSIG/Note.java b/LLSIG/src/main/java/LLSIG/Note.java index 947f748..541dd8e 100644 --- a/LLSIG/src/main/java/LLSIG/Note.java +++ b/LLSIG/src/main/java/LLSIG/Note.java @@ -7,6 +7,7 @@ public class Note { boolean active2=false; //Set to false when the end section of the note has been scored. double beatSnapStart,beatSnapEnd = -1; boolean deleted=false; //Set this marker to delete it on the next frame (when using the editor) + boolean multiple=false; //Whether or not to display an indicator showing this is a multi-press note. public Note(NoteType type,double start,double end) { this.type=type; this.start=start;