|
|
|
@ -20,6 +20,7 @@ public class DDRReader extends Reader{ |
|
|
|
|
final static int REGION_PADDING = 32; |
|
|
|
|
List<Box> extraRegions = new ArrayList<>(); |
|
|
|
|
static int lastJump=0; |
|
|
|
|
boolean failed=false; |
|
|
|
|
|
|
|
|
|
public DDRReader(){ |
|
|
|
|
addRegion(new Box(305,428,402,69),NUMBER); //score[0]+
|
|
|
|
@ -155,6 +156,13 @@ public class DDRReader extends Reader{ |
|
|
|
|
arr = new int[readRegions.get(i).w*readRegions.get(i).h]; |
|
|
|
|
cutImg.setRGB(0,currentHeight,readRegions.get(i).w,readRegions.get(i).h,arr,0,readRegions.get(i).w); |
|
|
|
|
} |
|
|
|
|
if (i==13) { |
|
|
|
|
Color col = new Color(subRegion.getRGB(131,84),true); |
|
|
|
|
ColorRange range = new ColorRange(130,135,130,135,130,135); |
|
|
|
|
if (range.colorInRange(col)) { |
|
|
|
|
failed=true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
currentHeight+=readRegions.get(i).h+REGION_PADDING; |
|
|
|
|
} |
|
|
|
|
Path output = Paths.get("result.png"); |
|
|
|
@ -264,6 +272,26 @@ public class DDRReader extends Reader{ |
|
|
|
|
case 12:{ |
|
|
|
|
other=other+",playstyle:\""+convertToString(splitter)+"\""; |
|
|
|
|
}break; |
|
|
|
|
case 13:{ |
|
|
|
|
if (failed) { |
|
|
|
|
rank=15;/*F*/ |
|
|
|
|
} else |
|
|
|
|
if (score>=999000) {rank=0;/*AAA*/} else |
|
|
|
|
if (score>=950000) {rank=1;/*AA+*/} else |
|
|
|
|
if (score>=900000) {rank=2;/*AA*/} else |
|
|
|
|
if (score>=890000) {rank=3;/*AA-*/} else |
|
|
|
|
if (score>=850000) {rank=4;/*A+*/} else |
|
|
|
|
if (score>=800000) {rank=5;/*A*/} else |
|
|
|
|
if (score>=790000) {rank=6;/*A-*/} else |
|
|
|
|
if (score>=750000) {rank=7;/*B+*/} else |
|
|
|
|
if (score>=700000) {rank=8;/*B*/} else |
|
|
|
|
if (score>=690000) {rank=9;/*B-*/} else |
|
|
|
|
if (score>=650000) {rank=10;/*C+*/} else |
|
|
|
|
if (score>=600000) {rank=11;/*C*/} else |
|
|
|
|
if (score>=590000) {rank=12;/*C-*/} else |
|
|
|
|
if (score>=550000) {rank=13;/*D+*/} else |
|
|
|
|
{rank=14;/*D*/} |
|
|
|
|
}break; |
|
|
|
|
case 14:{ |
|
|
|
|
title=convertToString(splitter); |
|
|
|
|
}break; |
|
|
|
|