Skip to content

Commit

Permalink
update jbms-parser, fix #100
Browse files Browse the repository at this point in the history
  • Loading branch information
exch-bms2 committed Oct 6, 2018
1 parent 7d3f628 commit 0550686
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Binary file modified lib/jbms-parser.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions src/bms/player/beatoraja/PlayDataAccessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,7 @@ public void wrireReplayData(ReplayData[] rd, BMSModel[] models, int lnmode, int
boolean ln = false;
for (int i = 0; i < models.length; i++) {
hashes[i] = models[i].getSHA256();
ln |= models[i].getTotalNotes(BMSModel.TOTALNOTES_LONG_KEY)
+ models[i].getTotalNotes(BMSModel.TOTALNOTES_LONG_SCRATCH) > 0;
ln |= models[i].containsUndefinedLongNote();
}
this.wrireReplayData(rd, hashes, ln, lnmode, index, constraint);

Expand Down
2 changes: 2 additions & 0 deletions src/bms/player/beatoraja/PlayerResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import bms.model.BMSDecoder;
import bms.model.BMSGenerator;
import bms.model.BMSModel;
import bms.model.BMSModelUtils;
import bms.model.BMSONDecoder;
import bms.player.beatoraja.CourseData.CourseDataConstraint;
import bms.player.beatoraja.TableData.TableFolder;
Expand Down Expand Up @@ -188,6 +189,7 @@ public BMSModel loadBMSModel(Path f, int lnmode) {
generator = decoder.getBMSGenerator();
}

BMSModelUtils.setStartNoteSection(model, 1.0);
BMSPlayerRule.validate(model, bmson);
return model;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bms/player/beatoraja/play/BMSPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public void render() {
control.setEnableControl(true);
control.setEnableCursor(true);
if (property.freq != 100) {
model.setFrequency(property.freq / 100f);
BMSModelUtils.changeFrequency(model, property.freq / 100f);
if (main.getConfig().getAudioFreqOption() == Config.AUDIO_PLAY_FREQ) {
main.getAudioProcessor().setGlobalPitch(property.freq / 100f);
}
Expand Down
8 changes: 4 additions & 4 deletions src/bms/player/beatoraja/song/SongInformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public SongInformation() {
}

public SongInformation(BMSModel model) {
n = model.getTotalNotes(BMSModel.TOTALNOTES_KEY);
ln = model.getTotalNotes(BMSModel.TOTALNOTES_LONG_KEY);
s = model.getTotalNotes(BMSModel.TOTALNOTES_SCRATCH);
ls = model.getTotalNotes(BMSModel.TOTALNOTES_LONG_SCRATCH);
n = BMSModelUtils.getTotalNotes(model, BMSModelUtils.TOTALNOTES_KEY);
ln = BMSModelUtils.getTotalNotes(model, BMSModelUtils.TOTALNOTES_LONG_KEY);
s = BMSModelUtils.getTotalNotes(model, BMSModelUtils.TOTALNOTES_SCRATCH);
ls = BMSModelUtils.getTotalNotes(model, BMSModelUtils.TOTALNOTES_LONG_SCRATCH);
total = model.getTotal();

int[][] data = new int[model.getLastTime() / 1000 + 2][7];
Expand Down

0 comments on commit 0550686

Please sign in to comment.