diff --git a/ArcadeReader.java b/ArcadeReader.java index 5c33daa..f0cb7f4 100644 --- a/ArcadeReader.java +++ b/ArcadeReader.java @@ -3,6 +3,7 @@ import java.nio.file.Path; import readers.DDRReader; import readers.LoveLiveReader; import readers.PopnReader; +import readers.SoundVoltexReader; public class ArcadeReader { /* @@ -57,6 +58,6 @@ public class ArcadeReader { * */ public static void retrieveData(Path img) { - new PopnReader().interpretBoxes(img); + new SoundVoltexReader().interpretBoxes(img); } } diff --git a/readers/DDRReader.java b/readers/DDRReader.java index b56c2c2..33ec8dc 100644 --- a/readers/DDRReader.java +++ b/readers/DDRReader.java @@ -244,6 +244,7 @@ public class DDRReader extends Reader{ trimAllData(en_data); System.out.println(Arrays.toString(ja_data)); System.out.println(Arrays.toString(en_data)); + interpretOutput(ja_data,en_data); g.dispose(); } catch (IOException e) { e.printStackTrace(); diff --git a/readers/Reader.java b/readers/Reader.java index d3e0de3..d18a15e 100644 --- a/readers/Reader.java +++ b/readers/Reader.java @@ -14,10 +14,10 @@ public abstract class Reader{ int rank; int[] notes = new int[7]; int difficulty; - String title; + String title=""; double pct; int maxcombo; - String other; + String other=""; List readRegions = new ArrayList<>(); final int TRANSPARENT = new Color(0,0,0,0).getRGB(); String readAllBoxes(Path img) { @@ -199,11 +199,11 @@ public abstract class Reader{ char[][] number_alternatives={ /*0*/{'0','o','O','e'}, /*1*/{'1','\\','/','I','i'}, - /*2*/{'2'}, + /*2*/{'2','己'}, /*3*/{'3'}, /*4*/{'4'}, /*5*/{'5'}, - /*6*/{'6','b'}, + /*6*/{'6','b','G'}, /*7*/{'7','z','Z'}, /*8*/{'8','B'}, /*9*/{'9','g','y',}, @@ -213,7 +213,47 @@ public abstract class Reader{ return String.join("\n",data).replaceFirst(Pattern.quote("\n"),""); } - int convertToInt(String[]data){return convertToInt(" ",data);} + double convertToDouble(String[]data){return convertToDouble("",data);} + + double convertToDouble(String prefix,String[] data) { + int numb=0; + int decimal=0; + boolean decimalFound=false; + for (int i=0;i data; try {