|
|
|
@ -20,6 +20,8 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
|
final static int REGION_PADDING = 32; |
|
|
|
|
List<Box> extraRegions = new ArrayList<>(); |
|
|
|
|
static int lastJump=0; |
|
|
|
|
boolean effectiveRate=false; |
|
|
|
|
boolean failed=false; |
|
|
|
|
public SoundVoltexReader(){ |
|
|
|
|
addRegion(new Box(385,1006,454,29)); //title[0]
|
|
|
|
|
addRegion(new Box(476,1075,242,57),NUMBER); //bigscore[1]
|
|
|
|
@ -337,6 +339,12 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
|
sig_data[counter++]=val; |
|
|
|
|
currentHeight+=readRegions.get(i).h+REGION_PADDING; |
|
|
|
|
} |
|
|
|
|
//912,1204
|
|
|
|
|
Color col = new Color(originalImg.getRGB(912,1204),true); |
|
|
|
|
ColorRange range = new ColorRange(90,110,225,245,250,255); |
|
|
|
|
if (range.colorInRange(col)) { |
|
|
|
|
effectiveRate=true; |
|
|
|
|
} |
|
|
|
|
Path output = Paths.get("result.png"); |
|
|
|
|
ImageIO.write(cutImg,"png",output.toFile()); |
|
|
|
|
String dataString = readAllBoxes(output); |
|
|
|
@ -414,10 +422,13 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
|
score=convertToInt(new String[]{Integer.toString(score),Integer.toString(score2)}); |
|
|
|
|
}break; |
|
|
|
|
case 3:{ |
|
|
|
|
other+="ex:"+Integer.toString(convertToInt("EX SCORE",splitter))+","; |
|
|
|
|
other+="{ex:"+Integer.toString(convertToInt("EX SCORE",splitter))+","; |
|
|
|
|
}break; |
|
|
|
|
case 4:{ |
|
|
|
|
pct=convertToDouble(splitter);//We're lucky excessive and effective rate have the same number of characters...
|
|
|
|
|
if (effectiveRate&&pct<70) { |
|
|
|
|
failed=true; |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
case 5:{ |
|
|
|
|
notes[0]=convertToInt("ERROR",splitter); |
|
|
|
@ -470,6 +481,19 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
|
case 21:{ |
|
|
|
|
difficulty=convertToInt("EXH",splitter); |
|
|
|
|
}break; |
|
|
|
|
case 22:{ |
|
|
|
|
other+="failed:"+failed+"}"; |
|
|
|
|
if (score>=9900000) {rank=0;/*S*/} else |
|
|
|
|
if (score>=9800000) {rank=1;/*AAA+*/} else |
|
|
|
|
if (score>=9700000) {rank=2;/*AAA*/} else |
|
|
|
|
if (score>=9500000) {rank=3;/*AA+*/} else |
|
|
|
|
if (score>=9300000) {rank=4;/*AA*/} else |
|
|
|
|
if (score>=9000000) {rank=5;/*A+*/} else |
|
|
|
|
if (score>=8700000) {rank=6;/*A*/} else |
|
|
|
|
if (score>=8000000) {rank=7;/*B*/} else |
|
|
|
|
if (score>=7000000) {rank=8;/*C*/} else |
|
|
|
|
{rank=9;/*D*/} |
|
|
|
|
}break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
System.out.println(this); |
|
|
|
|