|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|
//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<decimalPlaces;i++) { |
|
|
|
|
numb/=10; |
|
|
|
|
} |
|
|
|
|
return numb; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int getDifficulty(String str) { |
|
|
|
|
final String[] diffs={"easy","normal","hard","master","challenge"}; |
|
|
|
|
for (int i=0;i<diffs.length;i++) { |
|
|
|
|