Fixed DDR reader for new size. (#6)

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 2 years ago
parent 1dc6eb40c6
commit c503acdab7
  1. 2
      ArcadeReader.java
  2. 56
      readers/DDRReader.java
  3. BIN
      result.png
  4. 6
      sigPlace.java

@ -58,6 +58,6 @@ public class ArcadeReader {
* *
*/ */
public static void retrieveData(Path img) { public static void retrieveData(Path img) {
new SoundVoltexReader().interpretBoxes(img); new DDRReader().interpretBoxes(img);
} }
} }

@ -17,41 +17,41 @@ public class DDRReader extends Reader{
List<Box> extraRegions = new ArrayList<>(); List<Box> extraRegions = new ArrayList<>();
static int lastJump=0; static int lastJump=0;
public DDRReader(){ public DDRReader(){
readRegions.add(new Box(132,184,181,32)); //score[0] readRegions.add(new Box(305,428,402,69)); //score[0]
readRegions.add(new Box(270,246,58,17)); //max combo[1] readRegions.add(new Box(603,565,133,37)); //max combo[1]
readRegions.add(new Box(269,268,58,17)); //marvelous[2] readRegions.add(new Box(603,612,133,37)); //marvelous[2]
readRegions.add(new Box(269,286,61,20)); //perfect[3] readRegions.add(new Box(603,651,133,37)); //perfect[3]
readRegions.add(new Box(268,307,59,19)); //great[4] readRegions.add(new Box(603,698,133,37)); //great[4]
readRegions.add(new Box(268,326,59,19)); //good[5] readRegions.add(new Box(603,742,133,37)); //good[5]
readRegions.add(new Box(268,347,59,19)); //OK[6] readRegions.add(new Box(603,787,133,37)); //OK[6]
readRegions.add(new Box(268,367,59,19)); //miss[7] readRegions.add(new Box(603,830,133,37)); //miss[7]
readRegions.add(new Box(265,386,65,18)); //ex score[8] readRegions.add(new Box(603,876,133,37)); //ex score[8]
readRegions.add(new Box(348,324,60,18)); //fast[9] readRegions.add(new Box(783,738,133,37)); //fast[9]
readRegions.add(new Box(348,363,60,18)); //slow[10] readRegions.add(new Box(783,821,133,37)); //slow[10]
readRegions.add(new Box(277,65,39,23)); //diffnumb[11] readRegions.add(new Box(600,165,133,53)); //diffnumb[11]
readRegions.add(new Box(260,32,73,15)); //playstyle[12] readRegions.add(new Box(577,91,174,36)); //playstyle[12]
readRegions.add(new Box(104,80,171,88)); //grade[13] readRegions.add(new Box(253,207,357,183)); //grade[13]
readRegions.add(new Box(335,185,185,18)); //songname[14] readRegions.add(new Box(756,432,411,38)); //songname[14]
extraRegions.add(new Box(115,150,43,31)); //score text[0] extraRegions.add(new Box(251,393,112,33)); //score text[0]
extraRegions.add(new Box(147,246,118,18)); //max combo text[1] extraRegions.add(new Box(315,565,295,40)); //max combo text[1]
extraRegions.add(new Box(179,270,88,15)); //marvelous text[2] extraRegions.add(new Box(315,611,290,42)); //marvelous text[2]
extraRegions.add(new Box(198,290,68,14)); //perfect text[3] extraRegions.add(new Box(315,651,290,42)); //perfect text[3]
extraRegions.add(new Box(212,310,53,15)); //great text[4] extraRegions.add(new Box(315,698,290,42)); //great text[4]
extraRegions.add(new Box(219,329,46,15)); //good text[5] extraRegions.add(new Box(315,742,290,42)); //good text[5]
extraRegions.add(new Box(232,350,32,16)); //OK text[6] extraRegions.add(new Box(315,787,290,42)); //OK text[6]
extraRegions.add(new Box(233,368,33,16)); //miss text[7] extraRegions.add(new Box(315,830,290,42)); //miss text[7]
extraRegions.add(new Box(167,387,98,17)); //ex score text[8] extraRegions.add(new Box(345,874,258,39)); //ex score text[8]
extraRegions.add(new Box(360,311,36,14)); //fast text[9] extraRegions.add(new Box(805,706,88,30)); //fast text[9]
extraRegions.add(new Box(358,350,41,14)); //slow text[10] extraRegions.add(new Box(801,793,96,30)); //slow text[10]
extraRegions.add(new Box(258,48,77,16)); //difficulty text[11] extraRegions.add(new Box(576,126,185,40)); //difficulty text[11]
} }
void ColorFilter(int[] arr,int region,int width) { void ColorFilter(int[] arr,int region,int width) {
switch (region) { switch (region) {
case 0:{ case 0:{
process(arr,width, process(arr,width,
240,255,240,255,240,255, 247,255,247,255,247,255,
200,255,200,255,200,255); 200,255,200,255,200,255);
}break; }break;
case 400:{ case 400:{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 170 KiB

@ -81,7 +81,7 @@ public class sigPlace {
final static int TRANSPARENT = new Color(0,0,0,0).getRGB(); final static int TRANSPARENT = new Color(0,0,0,0).getRGB();
public static void main(String[] args) { public static void main(String[] args) {
String fontName = "lovelive_noteCount"; /*String fontName = "lovelive_noteCount";
String value = "0"; String value = "0";
Path f = Paths.get("lovelive1.png"); Path f = Paths.get("lovelive1.png");
BufferedImage img; BufferedImage img;
@ -114,8 +114,8 @@ public class sigPlace {
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }*/
//ArcadeReader.retrieveData(Paths.get("sdvx1.png")); ArcadeReader.retrieveData(Paths.get("ddr1.png"));
/* Path secretFile = Paths.get(".clientsecret"); /* Path secretFile = Paths.get(".clientsecret");
List<String> data; List<String> data;
try { try {

Loading…
Cancel
Save