Popn Reader finished. Implemented sig data (#1)

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago
parent 2f425bc1c0
commit 9de057852a
  1. 2
      ArcadeReader.java
  2. 12
      readers/PopnReader.java
  3. BIN
      result.png
  4. 2
      sigPlace.java
  5. BIN
      sub.png

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

@ -50,8 +50,8 @@ public class PopnReader extends Reader{
}break; }break;
case 1:{ case 1:{
process(arr,width, process(arr,width,
240,255,0,10,240,255, 200,255,0,10,200,255,
240,255,0,150,240,255); 200,255,0,150,200,255);
}break; }break;
case 2:{ case 2:{
process(arr,width, process(arr,width,
@ -154,9 +154,7 @@ public class PopnReader extends Reader{
ImageIO.write(subRegion,"png",new File("sub.png")); 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); cutImg.setRGB(0,currentHeight,readRegions.get(i).w,readRegions.get(i).h,arr,0,readRegions.get(i).w);
String val = interpretImage(subRegion,i); String val = interpretImage(subRegion,i);
if (!val.isEmpty()) {
sig_data[counter++]=val; sig_data[counter++]=val;
}
currentHeight+=readRegions.get(i).h+REGION_PADDING; currentHeight+=readRegions.get(i).h+REGION_PADDING;
} }
Path output = Paths.get("result.png"); Path output = Paths.get("result.png");
@ -170,7 +168,7 @@ public class PopnReader extends Reader{
System.out.println(Arrays.toString(ja_data)); System.out.println(Arrays.toString(ja_data));
System.out.println(Arrays.toString(en_data)); System.out.println(Arrays.toString(en_data));
System.out.println(Arrays.toString(sig_data)); System.out.println(Arrays.toString(sig_data));
//interpretOutput(ja_data,en_data); interpretOutput(ja_data,en_data,sig_data);
g.dispose(); g.dispose();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -226,7 +224,9 @@ public class PopnReader extends Reader{
case 5:{ case 5:{
maxcombo=convertToInt("COMBO",splitter); maxcombo=convertToInt("COMBO",splitter);
}break; }break;
case 6:{}break;//We'll handle the level in a special way. case 6:{
difficulty=convertToInt(splitter);
}break;//We'll handle the level in a special way.
case 7:{ case 7:{
title=convertToString(splitter); title=convertToString(splitter);
}break; }break;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 193 KiB

@ -116,7 +116,7 @@ public class sigPlace {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
}*/ }*/
ArcadeReader.retrieveData(Paths.get("sdvx4.png")); ArcadeReader.retrieveData(Paths.get("popn12.png"));
/* Path secretFile = Paths.get(".clientsecret"); /* Path secretFile = Paths.get(".clientsecret");
List<String> data; List<String> data;
try { try {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Loading…
Cancel
Save