diff --git a/ArcadeReader.java b/ArcadeReader.java index b7e0753..d288478 100644 --- a/ArcadeReader.java +++ b/ArcadeReader.java @@ -59,6 +59,6 @@ public class ArcadeReader { * */ public static void retrieveData(Path img) { - new PopnReader().interpretBoxes(img); + new LoveLiveReader().interpretBoxes(img); } } diff --git a/readers/LoveLiveReader.java b/readers/LoveLiveReader.java index af9d80b..d6d4c79 100644 --- a/readers/LoveLiveReader.java +++ b/readers/LoveLiveReader.java @@ -218,9 +218,7 @@ public class LoveLiveReader extends Reader{ ImageIO.write(subRegion,"png",new File("sub.png")); cutImg.setRGB(0,currentHeight,readRegions.get(i).w,readRegions.get(i).h,arr,0,readRegions.get(i).w); String val = interpretImage(subRegion,i); - if (!val.isEmpty()) { - sig_data[counter++]=val; - } + sig_data[counter++]=val; //System.out.println(i+": "+currentHeight+"-"+(currentHeight+readRegions.get(i).h+REGION_PADDING)); currentHeight+=readRegions.get(i).h+REGION_PADDING; } @@ -235,7 +233,7 @@ public class LoveLiveReader extends Reader{ System.out.println(Arrays.toString(ja_data)); System.out.println(Arrays.toString(en_data)); System.out.println(Arrays.toString(sig_data)); - //interpretOutput(ja_data,en_data); + interpretOutput(ja_data,en_data,sig_data); g.dispose(); } catch (IOException e) { e.printStackTrace(); @@ -297,43 +295,26 @@ public class LoveLiveReader extends Reader{ notes[4]=convertToInt("MISS",splitter); }break; case 7:{ - difficulty=getDifficulty(convertToString(splitter).toLowerCase()); + //difficulty=getDifficulty(convertToString(splitter).toLowerCase()); //I think we'll use the number instead. Assume CHALLENGE. }break; case 8:{ title=convertToString(splitter); }break; case 9:{ - pct=convertToPct(splitter); + //pct=convertToPct(splitter); //No longer used. + pct=convertToDouble(splitter); }break; case 10:{ maxcombo=convertToInt(splitter); }break; + case 11:{ + difficulty=convertToInt(splitter); + }break; } } System.out.println(this); } - double convertToPct(String[] str) { - int front=convertToInt(new String[]{str[1]}); - int decimal=convertToInt(new String[]{str[2]}); - double numb=0; - int placeValue=0; - int decimalPlaces=0; - while (decimal!=0) { - numb+=(decimal%10)*(Math.pow(10,placeValue++)); - decimal/=10; - decimalPlaces++; - } - while (front!=0) { - numb+=(front%10)*(Math.pow(10,placeValue++)); - front/=10; - } - for (int i=0;i data; try { diff --git a/sub.png b/sub.png index 5ec5e12..26431c9 100644 Binary files a/sub.png and b/sub.png differ