Add more fixes to Future Tone screenshot parsing. Changed how calibrator

works, using a different method now.
secondmonitor
sigonasr2 4 years ago
parent c484a1f984
commit 6cb33c4380
  1. BIN
      DivaBot/DivaBot.jar
  2. 4
      DivaBot/FTcolorData
  3. 8
      DivaBot/calibration_data.txt
  4. BIN
      DivaBot/capture.png
  5. BIN
      DivaBot/capture_2.png
  6. BIN
      DivaBot/capture_3.png
  7. BIN
      DivaBot/capture_4.png
  8. BIN
      DivaBot/capture_5.png
  9. BIN
      DivaBot/rectangle0.png
  10. BIN
      DivaBot/rectangle1.png
  11. BIN
      DivaBot/rectangle2.png
  12. BIN
      DivaBot/rectangle3.png
  13. BIN
      DivaBot/rectangle4.png
  14. 66
      DivaBot/src/sig/Calibrator.java
  15. 130
      DivaBot/src/sig/Calibrator2.java
  16. 8
      DivaBot/src/sig/CustomRobot.java
  17. 2
      DivaBot/src/sig/DrawCanvas.java
  18. 34
      DivaBot/src/sig/MyRobot.java
  19. 16
      DivaBot/src/sig/Overlay.java
  20. 4
      DivaBot/src/sig/SongData.java
  21. 2
      DivaBot/src/sig/TypeFace2.java
  22. BIN
      DivaBot/test.png
  23. BIN
      DivaBot/typeface4.png
  24. BIN
      Release/DivaBot/DivaBot/DivaBot.jar
  25. 10
      Release/DivaBot/DivaBot/FTcolorData
  26. BIN
      Release/DivaBot/DivaBot/typeface.png
  27. BIN
      Release/DivaBot/DivaBot/typeface4.png
  28. BIN
      Release/DivaBot04.zip

Binary file not shown.

@ -23,7 +23,7 @@ FREELY TOMORROW:7257101374,2043529882,3368468982
ファインダー (DSLR remix - re-COLON-edit):2961371663,3748682433,4037353672
ラブリスト更新中?:3414936018,3902077312,5012881426
ココロ:4420964303,4120075139,2886007751
1/6 -out of the gravity-:2591504700,2563324747,1983090365
16 -out of the gravity-:2591504700,2563324747,1983090365
深海シティアンダーグラウンド:2144233093,2080599055,2135292491
クローバー♣クラブ:2990985273,3796021063,3469239041
歌に形はないけれど:5288117315,5347894914,5010686300
@ -62,7 +62,7 @@ Nostalogic:5231911605,2290915170,3652715478
偶像無線:2239840895,3252013283,4302899745
ストロボナイツ:2221941121,3149528837,3097688282
Fire◎Flower:3196395096,1559869016,1380121972
恋ノート////:4618955230,3690514819,4166322160
恋ノート:4618955230,3690514819,4166322160
ブラック★ロックシューター:3036839485,3785132374,4324267858
Glory 3usi9:7361822927,8101158135,7655821118
ジェミニ:4566581547,3930341646,2491478509

@ -1,4 +1,4 @@
461
253
1325
735
533
170
1459
693

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 KiB

After

Width:  |  Height:  |  Size: 935 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 KiB

After

Width:  |  Height:  |  Size: 908 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 KiB

After

Width:  |  Height:  |  Size: 938 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 831 KiB

After

Width:  |  Height:  |  Size: 932 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 KiB

After

Width:  |  Height:  |  Size: 944 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

@ -201,10 +201,22 @@ public class Calibrator{
ImageIO.write(img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y),"png",new File("capture.png"));
while (!calibrated&&MAXTRIES>0) {
//Try moving left until the difference is too high or the colors are not right anymore.
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
if (((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&&
col.getBlue()>=180&&col.getBlue()<=250)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30&&
col.getRed()>=2&&col.getGreen()>=2&&col.getBlue()>=2)
)) {
//This is the max X. Calibration on this side good.
System.out.println("End at "+MyRobot.STARTDRAG.x);
return false;
}
MyRobot.STARTDRAG.x+=1;
for (int i=0;i<100;i++) {
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y+i,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y+i,1,1);
col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col);
if (((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&&
@ -231,10 +243,22 @@ public class Calibrator{
ImageIO.write(img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y),"png",new File("capture_2.png"));
while (!calibrated&&MAXTRIES>0) {
//Try moving left until the difference is too high or the colors are not right anymore.
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
if (((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&&
col.getBlue()>=180&&col.getBlue()<=250)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30&&
col.getRed()>=2&&col.getGreen()>=2&&col.getBlue()>=2)
)) {
//This is the max Y. Calibration on this side good.
System.out.println("End at "+MyRobot.STARTDRAG.y);
return false;
}
MyRobot.STARTDRAG.y+=1;
for (int i=0;i<100;i++) {
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x+i,MyRobot.STARTDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
miniImg = img.getSubimage(MyRobot.STARTDRAG.x+i,MyRobot.STARTDRAG.y,1,1);
col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col);
if (((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&&
@ -261,10 +285,24 @@ public class Calibrator{
ImageIO.write(img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y),"png",new File("capture_3.png"));
while (!calibrated&&MAXTRIES>0) {
//Try moving left until the difference is too high or the colors are not right anymore.
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
if (((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&&
col.getBlue()>=40&&col.getBlue()<=90)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30&&
col.getRed()>=2&&col.getGreen()>=2&&col.getBlue()>=2)
)) {
//This is the max X. Calibration on this side good.
MyRobot.ENDDRAG.y=MyRobot.ENDDRAG.y;
MyRobot.ENDDRAG.x++;
System.out.println("End at "+MyRobot.STARTDRAG.x);
return false;
}
MyRobot.ENDDRAG.x-=1;
for (int i=0;i<100;i++) {
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y-i,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y-i,1,1);
col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col);
if (((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&&
@ -292,10 +330,22 @@ public class Calibrator{
ImageIO.write(img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y),"png",new File("capture_4.png"));
while (!calibrated&&MAXTRIES>0) {
//Try moving left until the difference is too high or the colors are not right anymore.
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
if (((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&&
col.getBlue()>=40&&col.getBlue()<=90)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30&&
col.getRed()>=2&&col.getGreen()>=2&&col.getBlue()>=2)
)) {
//This is the max Y. Calibration on this side good.
System.out.println("End at "+MyRobot.ENDDRAG.y);
return false;
}
MyRobot.ENDDRAG.y-=1;
for (int i=0;i<100;i++) {
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x-i,MyRobot.ENDDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0));
miniImg = img.getSubimage(MyRobot.ENDDRAG.x-i,MyRobot.ENDDRAG.y,1,1);
col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col);
if (((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&&

@ -0,0 +1,130 @@
package sig;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JOptionPane;
import sig.utils.FileUtils;
public class Calibrator2 {
public static BufferedImage img;
Calibrator2() throws IOException {
boolean failed=false;
if (MyRobot.STARTDRAG.x>MyRobot.ENDDRAG.x) {
int xTemp=MyRobot.STARTDRAG.x;
MyRobot.STARTDRAG.x=MyRobot.ENDDRAG.x;
MyRobot.ENDDRAG.x=xTemp;
}
if (MyRobot.STARTDRAG.y>MyRobot.ENDDRAG.y) {
int yTemp=MyRobot.STARTDRAG.y;
MyRobot.STARTDRAG.y=MyRobot.ENDDRAG.y;
MyRobot.ENDDRAG.y=yTemp;
}
int xoffset1=0;
int yoffset1=0;
int xoffset2=0;
int yoffset2=0;
img = MyRobot.MYROBOT.getSizedCapture(new Rectangle(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y));
ImageIO.write(img,"png",new File("capture_1.png"));
boolean found=false;
for (int x=0;x<img.getWidth();x++) {
for (int y=0;y<img.getHeight();y++) {
//Find the first corner.
Color col = new Color(img.getRGB(x, y));
if (col.getRed()+col.getGreen()+col.getBlue()>150) {
MyRobot.STARTDRAG.x+=x;
MyRobot.STARTDRAG.y+=y;
xoffset1=x;
yoffset1=y;
found=true;
System.out.println("x:"+x+",y:"+y+",col:"+col);
break;
}
}
if (found) {break;}
}
img = MyRobot.MYROBOT.getSizedCapture(new Rectangle(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y));
ImageIO.write(img,"png",new File("capture_2.png"));
found=false;
for (int x=img.getWidth()-1;x>=0;x--) {
for (int y=img.getHeight()-1;y>=0;y--) {
//Find the first corner.
Color col = new Color(img.getRGB(x, y));
if (col.getRed()+col.getGreen()+col.getBlue()>150) {
MyRobot.ENDDRAG.x-=img.getWidth()-1-x;
MyRobot.ENDDRAG.y-=img.getHeight()-1-y;
xoffset2=img.getWidth()-1-x;
yoffset2=img.getHeight()-1-y;
found=true;
System.out.println("x:"+x+",y:"+y+",col:"+col);
break;
}
}
if (found) {break;}
}
for (int y=yoffset1;y>=0;y--) {
BufferedImage newimg = MyRobot.MYROBOT.getSizedCapture(new Rectangle(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y));
Color col = new Color(newimg.getRGB(0, 0));
if (col.getRed()+col.getGreen()+col.getBlue()<5) {
break;
}
MyRobot.STARTDRAG.y-=1;
}
for (int y=yoffset2;y<img.getHeight();y++) {
BufferedImage newimg = MyRobot.MYROBOT.getSizedCapture(new Rectangle(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y));
Color col = new Color(newimg.getRGB(newimg.getWidth()-1, newimg.getHeight()-1));
if (col.getRed()+col.getGreen()+col.getBlue()<5) {
break;
}
MyRobot.ENDDRAG.y+=1;
}
img = MyRobot.MYROBOT.getSizedCapture(new Rectangle(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y));
ImageIO.write(img,"png",new File("capture_3.png"));
System.out.println(MyRobot.STARTDRAG+","+MyRobot.ENDDRAG);
MyRobot.FRAME.setCursor(Cursor.getDefaultCursor());
Overlay.started=false;
MyRobot.FRAME.setAlwaysOnTop(false);
Overlay.OVERLAY.setVisible(true);
MyRobot.CALIBRATIONSTATUS="Calibration is complete! - X"+(MyRobot.STARTDRAG.x)+" Y"+(MyRobot.STARTDRAG.y)+" W"+(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)+" H"+(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y)+" R"+((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y));
if (((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y))<=16/9f-0.04||
((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y))>=16/9f+0.04) {
int dialogResult = JOptionPane.showConfirmDialog (null, "Could not detect the game properly!\n\nYour calibration cut a bit "+((((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y))<=16/9f-0.04)?"more":"less")+" than expected. Do you want to try selecting a more accurate region?","Warning",JOptionPane.YES_NO_OPTION);
if(dialogResult == JOptionPane.YES_OPTION){
MyRobot.STARTDRAG=null;
MyRobot.ENDDRAG=null;
Overlay.OVERLAY.setVisible(true);
MyRobot.CALIBRATIONSTATUS="";
return;
}
}
if (Math.abs(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y)<460) {
JOptionPane.showMessageDialog(null, "It is NOT recommended to capture a region below 460 pixels in height! This can cause inaccurate plays to be reported! Consider expanding the size of your capture region.");
}
MyRobot.FRAME.setAlwaysOnTop(true);
img = MyRobot.MYROBOT.getSizedCapture(new Rectangle(0,0,MyRobot.screenSize.width,MyRobot.screenSize.height));
FileUtils.deleteFile("calibration_data.txt");
FileUtils.logToFile(Integer.toString(MyRobot.STARTDRAG.x), "calibration_data.txt");
FileUtils.logToFile(Integer.toString(MyRobot.STARTDRAG.y), "calibration_data.txt");
FileUtils.logToFile(Integer.toString(MyRobot.ENDDRAG.x), "calibration_data.txt");
FileUtils.logToFile(Integer.toString(MyRobot.ENDDRAG.y), "calibration_data.txt");
}
}

@ -39,7 +39,13 @@ public class CustomRobot extends Robot{
ReloadCalibrationData();
}
if (calibration_data.length>0) {
currentScreen = super.createScreenCapture(new Rectangle(calibration_data[0],calibration_data[1],calibration_data[2]-calibration_data[0],calibration_data[3]-calibration_data[1]));
try {
currentScreen = super.createScreenCapture(new Rectangle(calibration_data[0],calibration_data[1],calibration_data[2]-calibration_data[0],calibration_data[3]-calibration_data[1]));
} catch (IllegalArgumentException e) {
calibration_data=new int[4];
File f = new File("calibration_data.txt");
f.delete();
}
} else {
currentScreen = super.createScreenCapture(new Rectangle(418+18,204+83,912-18,586-83));
}

@ -113,7 +113,7 @@ public class DrawCanvas extends JPanel implements KeyListener,ComponentListener,
}
public void pullData(final String songname,final String difficulty) {
this.songname=songname.equalsIgnoreCase("雨のちSweetDrops")?"雨のちSweet*Drops":songname.equalsIgnoreCase("Equation+")?"Equation+**":songname.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":songname.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":(songname.equalsIgnoreCase("16 -out of the gravity-"))?"1/6 -out of the gravity-":songname;
this.songname=songname.equalsIgnoreCase("恋ノート")?"恋ノート////":songname.equalsIgnoreCase("雨のちSweetDrops")?"雨のちSweet*Drops":songname.equalsIgnoreCase("Equation+")?"Equation+**":songname.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":(songname.equalsIgnoreCase("16 -out of the gravity-"))?"1/6 -out of the gravity-":songname;
this.difficulty=difficulty;
romanizedname="";
englishname="";

@ -304,7 +304,7 @@ public class MyRobot{
MyRobot.calibrating=false;
Overlay.OVERLAY.setVisible(false);
Thread.sleep(1000);
Calibrator c = new Calibrator();
Calibrator2 c = new Calibrator2();
}
} else {
//ImageIO.write(MYROBOT.createScreenCapture(),"png",new File("testscreen.png"));
@ -429,7 +429,7 @@ public class MyRobot{
if (results.size()>0) {
recordingResults=true;
for (final Result r : results) {
r.songName=r.songName.equalsIgnoreCase("雨のちSweetDrops")?"雨のちSweet*Drops":r.songName.equalsIgnoreCase("Equation+")?"Equation+**":r.songName.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":r.songName.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":(r.songName.equalsIgnoreCase("16 -out of the gravity-"))?"1/6 -out of the gravity-":r.songName;
r.songName=r.songName.equalsIgnoreCase("恋ノート")?"恋ノート////":r.songName.equalsIgnoreCase("雨のちSweetDrops")?"雨のちSweet*Drops":r.songName.equalsIgnoreCase("Equation+")?"Equation+**":r.songName.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":(r.songName.equalsIgnoreCase("16 -out of the gravity-"))?"1/6 -out of the gravity-":r.songName;
HttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost("http://45.33.13.215:4501/submit");
@ -534,8 +534,9 @@ public class MyRobot{
Color c1 = new Color(MYROBOT.createScreenCapture(new Rectangle(31,230,40,40)).getRGB(0, 0));
Color c2 = new Color(MYROBOT.createScreenCapture(new Rectangle(31,196,40,40)).getRGB(0, 0));
Color c3 = new Color(MYROBOT.createScreenCapture(new Rectangle(483,256,40,40)).getRGB(0, 0));
return c1.getRed()>=250 && c1.getGreen()>=250 && c1.getBlue()>=250 && c2.getRed()>=10 && c2.getRed()<=25 && c2.getGreen()>=200 && c2.getGreen()<=240 && c2.getBlue()>=180 && c2.getBlue()<=220 &&
c3.getRed()>=200 && c3.getRed()<=255 && c3.getGreen()>=200 && c3.getGreen()<=255 && c3.getBlue()>=140 && c3.getBlue()<=220;
//System.out.println(c1+"/"+c2+"/"+c3);
return c1.getRed()>=250 && c1.getGreen()>=250 && c1.getBlue()>=250 && c2.getRed()>=7 && c2.getRed()<=30 && c2.getGreen()>=200 && c2.getGreen()<=240 && c2.getBlue()>=180 && c2.getBlue()<=220 &&
c3.getRed()>=160 && c3.getRed()<=255 && c3.getGreen()>=160 && c3.getGreen()<=255 && c3.getBlue()>=130 && c3.getBlue()<=220;
} else {
BufferedImage img2 = ImageUtils.toBufferedImage(MYROBOT.currentScreen.getScaledInstance(1280 , 720, Image.SCALE_SMOOTH));
Color ft_pixel1 = new Color(img2.getRGB(260, 38));
@ -547,20 +548,6 @@ public class MyRobot{
ft_pixel2.getGreen()<90&&ft_pixel2.getGreen()>20&&
ft_pixel2.getBlue()<90&&ft_pixel2.getBlue()>20);
}
//System.out.println(c1+"/"+c2+"/"+c3);
}
public static boolean IsResultsScreenshot(BufferedImage img) throws IOException {
//r.x-418, r.y-204
/*ImageIO.write(MYROBOT.createScreenCapture(new Rectangle(31,230,40,40)),"png",new File("color1.png"));
ImageIO.write(MYROBOT.createScreenCapture(new Rectangle(31,196,40,40)),"png",new File("color2.png"));
ImageIO.write(MYROBOT.createScreenCapture(new Rectangle(483,256,40,40)),"png",new File("color3.png"));*/
Color c1 = new Color(img.getSubimage(31,230,40,40).getRGB(0, 0));
Color c2 = new Color(img.getSubimage(31,196,40,40).getRGB(0, 0));
Color c3 = new Color(img.getSubimage(483,256,40,40).getRGB(0, 0));
//System.out.println(c1+"/"+c2+"/"+c3);
return c1.getRed()>=250 && c1.getGreen()>=250 && c1.getBlue()>=250 && c2.getRed()>=10 && c2.getRed()<=100 && c2.getGreen()>=200 && c2.getGreen()<=255 && c2.getBlue()>=180 && c2.getBlue()<=230 &&
c3.getRed()>=150 && c3.getRed()<=255 && c3.getGreen()>=150 && c3.getGreen()<=255 && c3.getBlue()>=100 && c3.getBlue()<=240;
}
private void GetCurrentDifficulty() {
@ -785,6 +772,13 @@ public class MyRobot{
selectedSong=new SongData("LIKE THE WIND",0,0,0);
difficulty="H";
RunTest("test55.png",421,50,1,0,3,98.37f,"EXEX","",406,689821,false,Mode.FUTURETONE);
RunTest("test54.png",448,129,20,6,35,74.89f,"EXEX","",247,678260,true,Mode.FUTURETONE);
RunTest("test53.png",456,163,31,7,47,75.89f,"EXEX","",105,736989,false,Mode.FUTURETONE);
RunTest("test52.png",430,75,7,2,16,85.70f,"EX","",181,499246,false,Mode.FUTURETONE);
RunTest("test51.png",406,45,1,0,2,102.30f,"EXEX","",444,592515,false,Mode.FUTURETONE);
RunTest("test50.png",241,74,12,3,23,46.73f,"EXEX","",87,289190,true,Mode.FUTURETONE);
RunTest("test49.png",516,37,0,0,8,97.08f,"EXEX","HS",258,839135,false,Mode.FUTURETONE);
RunTest("test48.png",481,132,18,6,35,71.92f,"EX","HS",89,467720,false,Mode.FUTURETONE);
RunTest("test47.png",298,34,0,0,0,103.39f,"EXEX","HS",332,463628,false,Mode.FUTURETONE);
RunTest("test1.jpg",393,127,28,10,48,72.28f,"EXEX","",85,577160,false,Mode.MEGAMIX);
@ -973,10 +967,6 @@ public class MyRobot{
return stillOnSongSelect>=5;
}
public static boolean isOnSongSelect() {
return onSongSelect;
}
void initialize() {
System.setProperty("sun.java2d.opengl", "True");
grEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();

@ -56,14 +56,6 @@ public class Overlay extends JPanel implements MouseMotionListener,MouseListener
g.setColor(new Color(0,0,0,1));
g.fillRect(0, 0, MyRobot.screenSize.width, MyRobot.screenSize.height);
g.setFont(drawFont);
g.setColor(Color.WHITE);
g.drawString("Make sure you are on the main menu screen with 'Rhythm Game' selected",4,26);
g.setColor(Color.BLACK);
g.drawString("Make sure you are on the main menu screen with 'Rhythm Game' selected.",5,28);
g.setColor(Color.WHITE);
g.drawString("Drag your cursor over the region your game will be displayed on your monitor.",4,58);
g.setColor(Color.BLACK);
g.drawString("Drag your cursor over the region your game will be displayed on your monitor.",5,60);
g.setColor(new Color(0,255,255,96));
if (MyRobot.STARTDRAG!=null&&MyRobot.ENDDRAG!=null) {
g.fillRect(0,0,Math.min(MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.x),MyRobot.screenSize.height);
@ -71,6 +63,14 @@ public class Overlay extends JPanel implements MouseMotionListener,MouseListener
g.fillRect(Math.min(MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.x), Math.max(MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.y), Math.max(MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.x)-Math.min(MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.x), MyRobot.screenSize.height-Math.max(MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.y));
g.fillRect(Math.max(MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.x), Math.min(MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.y), MyRobot.screenSize.width-Math.max(MyRobot.STARTDRAG.x,MyRobot.ENDDRAG.x), MyRobot.screenSize.height-Math.min(MyRobot.STARTDRAG.y,MyRobot.ENDDRAG.y));
}
g.setColor(Color.WHITE);
g.drawString("Make sure your game is surrounded by a completely black background (Turn off overlays temporarily).",4,26);
g.setColor(Color.BLACK);
g.drawString("Make sure your game is surrounded by a completely black background (Turn off overlays temporarily).",5,28);
g.setColor(Color.WHITE);
g.drawString("Drag your cursor over the ENTIRE game region, include a bit of black space around it.",4,58);
g.setColor(Color.BLACK);
g.drawString("Drag your cursor over the ENTIRE game region, include a bit of black space around it.",5,60);
} else
if (MyRobot.CALIBRATIONSTATUS.length()>0) {
g.setColor(new Color(0,0,0,1));

@ -49,7 +49,7 @@ public class SongData {
public static void saveSongToFile(String title, long r, long g, long b) throws IOException {
boolean found=false;
StringBuilder sb = new StringBuilder(title.replaceAll(":", "-COLON-"));
StringBuilder sb = new StringBuilder(title.replaceAll(":", "-COLON-").replaceAll("\\*","").replaceAll("/",""));
sb.append(":");
sb.append(r).append(",")
@ -65,7 +65,7 @@ public class SongData {
String[] split = fileData[i].split(":");
if (split.length>0) {
//System.out.println(split[0]+"/"+title);
if (split[0].replaceAll("-COLON-", ":").equalsIgnoreCase(title)) {
if (split[0].replaceAll("-COLON-", ":").equalsIgnoreCase(title.replaceAll("\\*","").replaceAll("/",""))) {
//System.out.println("Updated color data with new data for "+title+"!");
fileData[i]=sb.toString();
found=true;

@ -770,7 +770,7 @@ public class TypeFace2 {
}
private boolean futureToneDarkColorCheck(Color pixel) {
return pixel.getRed()<176
&& pixel.getGreen()<176 && pixel.getBlue()>100;
&& pixel.getGreen()<178 && pixel.getBlue()>100;
}
public int extractNumbersFromImage(BufferedImage img) throws IOException {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

@ -23,7 +23,7 @@ FREELY TOMORROW:7257101374,2043529882,3368468982
ファインダー (DSLR remix - re-COLON-edit):2961371663,3748682433,4037353672
ラブリスト更新中?:3414936018,3902077312,5012881426
ココロ:4420964303,4120075139,2886007751
1/6 -out of the gravity-:2591504700,2563324747,1983090365
16 -out of the gravity-:2591504700,2563324747,1983090365
深海シティアンダーグラウンド:2144233093,2080599055,2135292491
クローバー♣クラブ:2990985273,3796021063,3469239041
歌に形はないけれど:5288117315,5347894914,5010686300
@ -53,7 +53,7 @@ Palette:4640730351,4763876062,5032315945
リンリンシグナル:3861355139,4483557874,4288300572
深海少女:1707469430,2008783754,4464171873
Weekender Girl:5324941973,4291207773,3423226791
雨のちSweet*Drops:4949334744,6594145728,6390149415
雨のちSweetDrops:4949334744,6594145728,6390149415
モノクロ∞ブルースカイ:3389877996,4499481553,6499626921
えれくとりっく・えんじぇぅ:3980119207,3510281625,4771931931
数多の舞 -Dance of many-:2401065708,2243409160,1437283022
@ -62,7 +62,7 @@ Nostalogic:5231911605,2290915170,3652715478
偶像無線:2239840895,3252013283,4302899745
ストロボナイツ:2221941121,3149528837,3097688282
Fire◎Flower:3196395096,1559869016,1380121972
恋ノート////:4618955230,3690514819,4166322160
恋ノート:4618955230,3690514819,4166322160
ブラック★ロックシューター:3036839485,3785132374,4324267858
Glory 3usi9:7361822927,8101158135,7655821118
ジェミニ:4566581547,3930341646,2491478509
@ -183,7 +183,7 @@ ODDS&ENDS:7221115122,5699688784,3942971913
Pane dhiria:1267936293,1914064172,2287130377
え?あぁ、そう。:3884015728,2801529497,2785759986
システマティック・ラヴ:4012793748,2945948428,3416692091
PIANO*GIRL:5617761462,4480618429,3406096688
PIANOGIRL:5617761462,4480618429,3406096688
金の聖夜霜雪に朽ちて:4964652723,2210400014,1203879206
カラフル×セクシィ:6073900156,5319839007,3610881827
サンドリヨン:2768739004,2145434818,2476455675
@ -200,7 +200,7 @@ Knife:3501013643,2015238387,1948776401
多重未来のカルテット~QUARTET THEME~:1973869383,1993264455,2507240454
右肩の蝶 -39's Giving Day Edition-:915863153,950726942,498994371
透明水彩:5796936963,6123422381,6330740232
Equation+**:5616078976,5471739277,4915681049
Equation+:5616078976,5471739277,4915681049
Absolunote:7486631516,8070231386,8029471096
ロキ:1239592967,645558990,1977730698
Nyanyanyanyanyanyanya!:4669645581,4518634435,3823158692

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.
Loading…
Cancel
Save