|
|
@ -27,6 +27,7 @@ OSU.LoadTokens = async function(tokens) {
|
|
|
|
"Metadata": new Stage(),
|
|
|
|
"Metadata": new Stage(),
|
|
|
|
"Difficulty": new Stage(),
|
|
|
|
"Difficulty": new Stage(),
|
|
|
|
"Events": new Stage(),
|
|
|
|
"Events": new Stage(),
|
|
|
|
|
|
|
|
"Colours": new Stage(),
|
|
|
|
"TimingPoints": new Stage(),
|
|
|
|
"TimingPoints": new Stage(),
|
|
|
|
"HitObjects": new Stage(),
|
|
|
|
"HitObjects": new Stage(),
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -43,6 +44,7 @@ OSU.LoadTokens = async function(tokens) {
|
|
|
|
this.han(stages["Editor"]);
|
|
|
|
this.han(stages["Editor"]);
|
|
|
|
this.meta(stages["Metadata"]);
|
|
|
|
this.meta(stages["Metadata"]);
|
|
|
|
this.muzukashisa(stages["Difficulty"]);
|
|
|
|
this.muzukashisa(stages["Difficulty"]);
|
|
|
|
|
|
|
|
this.iro(stages["Colours"]);
|
|
|
|
this.jiken(stages["Events"]);
|
|
|
|
this.jiken(stages["Events"]);
|
|
|
|
this.keiji(stages["TimingPoints"]);
|
|
|
|
this.keiji(stages["TimingPoints"]);
|
|
|
|
this.maru(stages["HitObjects"]);
|
|
|
|
this.maru(stages["HitObjects"]);
|
|
|
@ -173,6 +175,25 @@ OSU.muzukashisa = async function(tokens) {
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OSU.iro = async function(tokens) {
|
|
|
|
|
|
|
|
const group = await tokens.take();
|
|
|
|
|
|
|
|
if(group) {
|
|
|
|
|
|
|
|
var data = this.data[group];
|
|
|
|
|
|
|
|
var tok;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while(tok = await tokens.take()) {
|
|
|
|
|
|
|
|
var match = tok.match(/^(Combo\d+)\s:\s(\d+),(\d+),(\d+)$/);
|
|
|
|
|
|
|
|
if(match && match[0])
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
data[match[1]] = {r: parseInt(match[2]), g: parseInt(match[3]), b: parseInt(match[4]), toString: function() {
|
|
|
|
|
|
|
|
return "#"+ this.r.toString(16)+this.g.toString(16)+this.b.toString(16);
|
|
|
|
|
|
|
|
}};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else this.errors.push("iso: parsing line `"+tok+"' failed.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
OSU.jiken = async function(tokens) {
|
|
|
|
OSU.jiken = async function(tokens) {
|
|
|
|
const group = await tokens.take();
|
|
|
|
const group = await tokens.take();
|
|
|
|
if(group) {
|
|
|
|
if(group) {
|
|
|
|