|
|
@ -16,6 +16,7 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
final static int REGION_PADDING = 32; |
|
|
|
final static int REGION_PADDING = 32; |
|
|
|
List<Box> extraRegions = new ArrayList<>(); |
|
|
|
List<Box> extraRegions = new ArrayList<>(); |
|
|
|
static int lastJump=0; |
|
|
|
static int lastJump=0; |
|
|
|
|
|
|
|
final int TRANSPARENT = new Color(0,0,0,0).getRGB(); |
|
|
|
public SoundVoltexReader(){ |
|
|
|
public SoundVoltexReader(){ |
|
|
|
readRegions.add(new Box(434,1006,454,26)); //title[0]
|
|
|
|
readRegions.add(new Box(434,1006,454,26)); //title[0]
|
|
|
|
readRegions.add(new Box(458,1075,244,57)); //bigscore[1]
|
|
|
|
readRegions.add(new Box(458,1075,244,57)); //bigscore[1]
|
|
|
@ -43,21 +44,23 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extraRegions.add(new Box(499,1238,78,23)); //early error text[0]
|
|
|
|
extraRegions.add(new Box(753,1197,150,14)); //effective rate text[0]
|
|
|
|
extraRegions.add(new Box(499,1268,78,23)); //early near text[1]
|
|
|
|
extraRegions.add(new Box(499,1238,78,23)); //early error text[1]
|
|
|
|
extraRegions.add(new Box(499,1300,93,23)); //early critical text[2]
|
|
|
|
extraRegions.add(new Box(499,1268,78,23)); //early near text[2]
|
|
|
|
extraRegions.add(new Box(499,1332,108,23)); //s-critical text[3]
|
|
|
|
extraRegions.add(new Box(499,1300,93,23)); //early critical text[3]
|
|
|
|
extraRegions.add(new Box(499,1362,93,23)); //late critical text[4]
|
|
|
|
extraRegions.add(new Box(499,1332,108,23)); //s-critical text[4]
|
|
|
|
extraRegions.add(new Box(499,1393,78,23)); //late near text[5]
|
|
|
|
extraRegions.add(new Box(499,1362,93,23)); //late critical text[5]
|
|
|
|
extraRegions.add(new Box(499,1424,78,23)); //late error text[6]
|
|
|
|
extraRegions.add(new Box(499,1393,78,23)); //late near text[6]
|
|
|
|
extraRegions.add(new Box(62,1230,119,24)); //s-critical extra text[7]
|
|
|
|
extraRegions.add(new Box(499,1424,78,23)); //late error text[7]
|
|
|
|
extraRegions.add(new Box(62,1262,119,24)); //critical extra text[8]
|
|
|
|
extraRegions.add(new Box(62,1230,119,24)); //s-critical extra text[8]
|
|
|
|
extraRegions.add(new Box(62,1294,119,24)); //near extra text[9]
|
|
|
|
extraRegions.add(new Box(62,1262,119,24)); //critical extra text[9]
|
|
|
|
extraRegions.add(new Box(62,1325,119,24)); //error extra text[10]
|
|
|
|
extraRegions.add(new Box(62,1294,119,24)); //near extra text[10]
|
|
|
|
extraRegions.add(new Box(62,1230,119,24)); //s-critical extra text[11]
|
|
|
|
extraRegions.add(new Box(62,1325,119,24)); //error extra text[11]
|
|
|
|
extraRegions.add(new Box(62,1325,119,24)); //error extra text[12]
|
|
|
|
extraRegions.add(new Box(62,1230,119,24)); //s-critical extra text[12]
|
|
|
|
extraRegions.add(new Box(62,1230,119,24)); //s-critical extra text[13]
|
|
|
|
extraRegions.add(new Box(62,1325,119,24)); //error extra text[13]
|
|
|
|
extraRegions.add(new Box(62,1325,119,24)); //error extra text[14]
|
|
|
|
extraRegions.add(new Box(62,1230,119,24)); //s-critical extra text[14]
|
|
|
|
|
|
|
|
extraRegions.add(new Box(62,1325,119,24)); //error extra text[15]
|
|
|
|
|
|
|
|
extraRegions.add(new Box(62,1325,119,24)); //maximum chain text[16]
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void seek(int[]arr,int i,ColorRange SEEKCOLOR,Color FINALCOLOR,int width) { |
|
|
|
void seek(int[]arr,int i,ColorRange SEEKCOLOR,Color FINALCOLOR,int width) { |
|
|
@ -78,7 +81,6 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ColorFilter(int[] arr,int region,int width) { |
|
|
|
void ColorFilter(int[] arr,int region,int width) { |
|
|
|
final int TRANSPARENT = new Color(0,0,0,0).getRGB(); |
|
|
|
|
|
|
|
switch (region) { |
|
|
|
switch (region) { |
|
|
|
case 0:{ |
|
|
|
case 0:{ |
|
|
|
final ColorRange TARGETCOLOR = new ColorRange(240,255,240,255,240,255); |
|
|
|
final ColorRange TARGETCOLOR = new ColorRange(240,255,240,255,240,255); |
|
|
@ -285,6 +287,40 @@ public class SoundVoltexReader extends Reader{ |
|
|
|
leftMost=j%readRegions.get(i).w; |
|
|
|
leftMost=j%readRegions.get(i).w; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (i==21) { |
|
|
|
|
|
|
|
//Squish the difficulty together.
|
|
|
|
|
|
|
|
int pixelGap=0; |
|
|
|
|
|
|
|
int pixelGapStart=0; |
|
|
|
|
|
|
|
int reachedPoint=0; |
|
|
|
|
|
|
|
boolean found=false; |
|
|
|
|
|
|
|
for (int x=0;x<readRegions.get(i).w;x++) { |
|
|
|
|
|
|
|
for (int y=0;y<readRegions.get(i).h;y++) { |
|
|
|
|
|
|
|
if (arr[y*readRegions.get(i).w+x]!=TRANSPARENT) { |
|
|
|
|
|
|
|
if (pixelGap>10) { |
|
|
|
|
|
|
|
found=true; |
|
|
|
|
|
|
|
reachedPoint=x; |
|
|
|
|
|
|
|
System.out.println(reachedPoint+"-"+pixelGapStart); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
pixelGap=0; |
|
|
|
|
|
|
|
pixelGapStart=x; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (found) { |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
pixelGap++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
final int PADDING = 14; |
|
|
|
|
|
|
|
//From the pixelGapStart X, cut down the pixels to reach the point next to the previous pixels.
|
|
|
|
|
|
|
|
for (int x=reachedPoint;x<readRegions.get(i).w;x++) { |
|
|
|
|
|
|
|
for (int y=0;y<readRegions.get(i).h;y++) { |
|
|
|
|
|
|
|
arr[y*readRegions.get(i).w+x-pixelGapStart+PADDING]=arr[y*readRegions.get(i).w+x]; |
|
|
|
|
|
|
|
arr[y*readRegions.get(i).w+x]=TRANSPARENT; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (i>=5&&i<=19) { |
|
|
|
if (i>=5&&i<=19) { |
|
|
|
int[] arr2 = originalImg.getRGB(extraRegions.get(i-5).x, extraRegions.get(i-5).y, extraRegions.get(i-5).w, extraRegions.get(i-5).h, null, 0, extraRegions.get(i-5).w); |
|
|
|
int[] arr2 = originalImg.getRGB(extraRegions.get(i-5).x, extraRegions.get(i-5).y, extraRegions.get(i-5).w, extraRegions.get(i-5).h, null, 0, extraRegions.get(i-5).w); |
|
|
|
int rightMost=0; |
|
|
|
int rightMost=0; |
|
|
|