note_counter.put(s, e);
entities_matrix.add(note_counter.get(s));
}
start_time = lastLoopTime = SystemTimer.getTime();
EventList event_list = construct_velocity_tree(chart.getEvents());
event_list.fixEventList(EventList.FixMethod.OPEN2JAM, true);
judge.setTiming(timing);
//Let's randomize "-"
switch(opt.getChannelModifier())
{
case Mirror:
event_list.channelMirror();
break;
case Shuffle:
event_list.channelShuffle();
break;
case Random:
event_list.channelRandom();
break;
}
bgaEntity = (BgaEntity) skin.getEntityMap().get("BGA");
entities_matrix.add(bgaEntity);
bga_sprites = new HashMap<Integer, Sprite>();
if(chart.hasVideo()) {
bgaEntity.isVideo = true;
bgaEntity.videoFile = chart.getVideo();
bgaEntity.initVideo();
} else if(!chart.getBgaIndex().isEmpty()) {
// get all the bgaEntity sprites
for(Entry<Integer, File> entry: chart.getImages().entrySet()) {
BufferedImage img;
try {
img = ImageIO.read(entry.getValue());
Sprite s = ResourceFactory.get().getSprite(img);
bga_sprites.put(entry.getKey(), s);
} catch (IOException ex) {
java.util.logging.Logger.getLogger(Render.class.getName()).log(Level.SEVERE, "{0}", ex);
}
}
}
// adding static entities
for(Entity e : skin.getEntityList()){
entities_matrix.add(e);
}
// get a new iterator
buffer_iterator = event_list.iterator();
// load up initial buffer
update_note_buffer(0, 0);
// get the chart sound samples