Finished successful implementation of ypointer saving between future
tone and megamix
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 4.6 KiB |
@ -104,8 +104,8 @@ public class Calibrator2 {
|
|||||||
Overlay.OVERLAY.setVisible(true);
|
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));
|
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||
|
if (((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y))<=16/9f-0.015||
|
||||||
((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.015) {
|
||||||
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);
|
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){
|
if(dialogResult == JOptionPane.YES_OPTION){
|
||||||
MyRobot.STARTDRAG=null;
|
MyRobot.STARTDRAG=null;
|
||||||
|
@ -57,6 +57,7 @@ public class CustomRobot extends Robot{
|
|||||||
calibration_data[1]=Integer.parseInt(data[1]);
|
calibration_data[1]=Integer.parseInt(data[1]);
|
||||||
calibration_data[2]=Integer.parseInt(data[2]);
|
calibration_data[2]=Integer.parseInt(data[2]);
|
||||||
calibration_data[3]=Integer.parseInt(data[3]);
|
calibration_data[3]=Integer.parseInt(data[3]);
|
||||||
|
TypeFace2.deepCopyDefaultOfficialYPointers();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean CalibrationDataChanged() {
|
private boolean CalibrationDataChanged() {
|
||||||
|
@ -347,8 +347,6 @@ public class MyRobot{
|
|||||||
}
|
}
|
||||||
lastSongSelectTime = System.currentTimeMillis();
|
lastSongSelectTime = System.currentTimeMillis();
|
||||||
} else {
|
} else {
|
||||||
MYROBOT.refreshScoreScreen();
|
|
||||||
ImageIO.write(MYROBOT.createScoreScreenCapture(),"png",new File("scoreimage.png"));
|
|
||||||
if (overlayHidden) {
|
if (overlayHidden) {
|
||||||
overlayHidden=false;
|
overlayHidden=false;
|
||||||
MyRobot.p.repaint();
|
MyRobot.p.repaint();
|
||||||
@ -375,7 +373,6 @@ public class MyRobot{
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final Result data = typeface1.getAllData(MYROBOT.createScoreScreenCapture());
|
final Result data = typeface1.getAllData(MYROBOT.createScoreScreenCapture());
|
||||||
//ImageIO.write(MYROBOT.,"png",new File("test.png"));
|
|
||||||
if (data.cool==-1 || data.fine==-1 || data.safe==-1 || data.sad==-1 || data.worst==-1 || data.percent<0f || data.percent>110f || data.combo==-1 || data.score==-1) {
|
if (data.cool==-1 || data.fine==-1 || data.safe==-1 || data.sad==-1 || data.worst==-1 || data.percent<0f || data.percent>110f || data.combo==-1 || data.score==-1) {
|
||||||
if (lastData==null || (lastData.cool!=data.cool || data.fine!=lastData.fine || data.safe!=lastData.safe || data.sad!=lastData.sad || data.worst!=lastData.worst || data.percent!=lastData.percent || data.combo!=lastData.combo || data.score!=lastData.score)) {
|
if (lastData==null || (lastData.cool!=data.cool || data.fine!=lastData.fine || data.safe!=lastData.safe || data.sad!=lastData.sad || data.worst!=lastData.worst || data.percent!=lastData.percent || data.combo!=lastData.combo || data.score!=lastData.score)) {
|
||||||
System.out.println("Waiting for results to populate...");
|
System.out.println("Waiting for results to populate...");
|
||||||
@ -395,9 +392,8 @@ public class MyRobot{
|
|||||||
} else
|
} else
|
||||||
if ((data.combo!=lastcombo || data.fail!=lastfail || data.cool!=lastcool || lastfine!=data.fine || lastsafe!=data.safe || lastsad!=data.sad || lastworst!=data.worst)
|
if ((data.combo!=lastcombo || data.fail!=lastfail || data.cool!=lastcool || lastfine!=data.fine || lastsafe!=data.safe || lastsad!=data.sad || lastworst!=data.worst)
|
||||||
&& data.score!=lastscore /*|| lastpercent!=percent*/){
|
&& data.score!=lastscore /*|| lastpercent!=percent*/){
|
||||||
//System.out.println("Results for "+selectedSong.title+" "+difficulty+": "+data.cool+"/"+data.fine+"/"+data.safe+"/"+data.sad+"/"+data.worst+" "+data.percent+"%");
|
|
||||||
|
|
||||||
System.out.println("Results for "+selectedSong.title+" "+data.difficulty+": "+data.display());
|
System.out.println("Results for "+selectedSong.title+" "+data.difficulty+": "+data.display());
|
||||||
|
TypeFace2.deepCopyOfficialYPointersFromPointers();
|
||||||
File songFolder = new File(selectedSong.title+"/"+data.difficulty);
|
File songFolder = new File(selectedSong.title+"/"+data.difficulty);
|
||||||
if (!songFolder.exists()) {
|
if (!songFolder.exists()) {
|
||||||
songFolder.mkdirs();
|
songFolder.mkdirs();
|
||||||
@ -594,7 +590,6 @@ public class MyRobot{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void GetCurrentSong() throws IOException {
|
private void GetCurrentSong() throws IOException {
|
||||||
|
|
||||||
BufferedImage img=null;
|
BufferedImage img=null;
|
||||||
long r=0,g=0,b=0;
|
long r=0,g=0,b=0;
|
||||||
if (!FUTURETONE) {
|
if (!FUTURETONE) {
|
||||||
@ -779,6 +774,8 @@ public class MyRobot{
|
|||||||
selectedSong=new SongData("LIKE THE WIND",0,0,0);
|
selectedSong=new SongData("LIKE THE WIND",0,0,0);
|
||||||
difficulty="H";
|
difficulty="H";
|
||||||
|
|
||||||
|
RunTest("test61.png",467,21,0,0,0,103.48f,"EX","HS",488,514440,false,Mode.MEGAMIX);
|
||||||
|
RunTest("test60.png",430,88,2,0,3,95.05f,"EX","HS",298,538510,false,Mode.MEGAMIX);
|
||||||
RunTest("test59.png",535,114,13,12,28,79.04f,"EXEX","HS",148,540700,false,Mode.MEGAMIX);
|
RunTest("test59.png",535,114,13,12,28,79.04f,"EXEX","HS",148,540700,false,Mode.MEGAMIX);
|
||||||
RunTest("test58.png",314,49,4,1,12,94.94f,"EXEX","HS",185,561682,false,Mode.FUTURETONE);
|
RunTest("test58.png",314,49,4,1,12,94.94f,"EXEX","HS",185,561682,false,Mode.FUTURETONE);
|
||||||
RunTest("test57.png",449,50,2,0,1,101.28f,"EXEX","HS",366,595859,false,Mode.FUTURETONE);
|
RunTest("test57.png",449,50,2,0,1,101.28f,"EXEX","HS",366,595859,false,Mode.FUTURETONE);
|
||||||
@ -895,7 +892,6 @@ public class MyRobot{
|
|||||||
System.out.println("Running test "+_img);
|
System.out.println("Running test "+_img);
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
String testdir="testsuite";
|
String testdir="testsuite";
|
||||||
Point offset = new Point(418,204);
|
|
||||||
File tmp = new File("tmp");
|
File tmp = new File("tmp");
|
||||||
if (tmp.exists()) {
|
if (tmp.exists()) {
|
||||||
FileUtils.deleteFile(tmp);
|
FileUtils.deleteFile(tmp);
|
||||||
@ -942,7 +938,6 @@ public class MyRobot{
|
|||||||
}
|
}
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
TypeFace2.deepCopyDefaultYPointers();
|
|
||||||
System.out.println("\tPassed ("+(System.currentTimeMillis()-startTime)+"ms)!");
|
System.out.println("\tPassed ("+(System.currentTimeMillis()-startTime)+"ms)!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -957,7 +952,7 @@ public class MyRobot{
|
|||||||
System.out.println("Switching to Megamix");
|
System.out.println("Switching to Megamix");
|
||||||
SongData.loadSongsFromFile();
|
SongData.loadSongsFromFile();
|
||||||
LASTMODE_FUTURETONE=false;
|
LASTMODE_FUTURETONE=false;
|
||||||
TypeFace2.deepCopyDefaultYPointers();
|
TypeFace2.deepCopyDefaultOfficialYPointers();
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@ -970,7 +965,7 @@ public class MyRobot{
|
|||||||
System.out.println("Switching to Future Tone");
|
System.out.println("Switching to Future Tone");
|
||||||
SongData.loadSongsFromFile();
|
SongData.loadSongsFromFile();
|
||||||
LASTMODE_FUTURETONE=true;
|
LASTMODE_FUTURETONE=true;
|
||||||
TypeFace2.deepCopyDefaultYPointers();
|
TypeFace2.deepCopyDefaultOfficialYPointers();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stillOnSongSelect=0;
|
stillOnSongSelect=0;
|
||||||
|
@ -67,6 +67,7 @@ public class TypeFace2 {
|
|||||||
|
|
||||||
public final static int[] DEFAULT_YPOINTERS = new int[] {-1,-1,-1,-1,-1,-1,-1,-1};
|
public final static int[] DEFAULT_YPOINTERS = new int[] {-1,-1,-1,-1,-1,-1,-1,-1};
|
||||||
public static int[] ypointers = new int[] {-1,-1,-1,-1,-1,-1,-1,-1};
|
public static int[] ypointers = new int[] {-1,-1,-1,-1,-1,-1,-1,-1};
|
||||||
|
public static int[] officialypointers = new int[] {-1,-1,-1,-1,-1,-1,-1,-1};
|
||||||
|
|
||||||
public static void deepCopyDefaultYPointers() {
|
public static void deepCopyDefaultYPointers() {
|
||||||
ypointers = new int[DEFAULT_YPOINTERS.length];
|
ypointers = new int[DEFAULT_YPOINTERS.length];
|
||||||
@ -74,8 +75,21 @@ public class TypeFace2 {
|
|||||||
ypointers[i]=DEFAULT_YPOINTERS[i];
|
ypointers[i]=DEFAULT_YPOINTERS[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static void deepCopyDefaultOfficialYPointers() {
|
||||||
|
officialypointers = new int[DEFAULT_YPOINTERS.length];
|
||||||
|
for (int i=0;i<DEFAULT_YPOINTERS.length;i++) {
|
||||||
|
officialypointers[i]=DEFAULT_YPOINTERS[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void deepCopyOfficialYPointersFromPointers() {
|
||||||
|
officialypointers = new int[ypointers.length];
|
||||||
|
for (int i=0;i<ypointers.length;i++) {
|
||||||
|
officialypointers[i]=ypointers[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Result getAllData(BufferedImage img, boolean debug) throws IOException {
|
public Result getAllData(BufferedImage img, boolean debug) throws IOException {
|
||||||
|
deepCopyDefaultYPointers();
|
||||||
BufferedImage img2 = ImageUtils.toBufferedImage(img.getScaledInstance(1280 , 720, Image.SCALE_SMOOTH));
|
BufferedImage img2 = ImageUtils.toBufferedImage(img.getScaledInstance(1280 , 720, Image.SCALE_SMOOTH));
|
||||||
Result result = new Result("","",-1,-1,-1,-1,-1,-1f);
|
Result result = new Result("","",-1,-1,-1,-1,-1,-1f);
|
||||||
int[] finalNumbers = new int[5];
|
int[] finalNumbers = new int[5];
|
||||||
@ -135,10 +149,10 @@ public class TypeFace2 {
|
|||||||
float percent = -1f;
|
float percent = -1f;
|
||||||
switch (result.mode) {
|
switch (result.mode) {
|
||||||
case MEGAMIX:{
|
case MEGAMIX:{
|
||||||
percent = extractPercentFromImage(img2,debug);
|
percent = extractPercentFromImage(img2,debug,pointerAccumulator);
|
||||||
}break;
|
}break;
|
||||||
case FUTURETONE:{
|
case FUTURETONE:{
|
||||||
percent = extractFutureTonePercentFromImage(img2,debug);
|
percent = extractFutureTonePercentFromImage(img2,debug,pointerAccumulator);
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
ypointers[pointerAccumulator++] = ypointer;
|
ypointers[pointerAccumulator++] = ypointer;
|
||||||
@ -302,11 +316,7 @@ public class TypeFace2 {
|
|||||||
return diffs[lowestIndex];
|
return diffs[lowestIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
public float extractPercentFromImage(BufferedImage img) throws IOException {
|
public float extractFutureTonePercentFromImage(BufferedImage img,boolean debug,int iteration) throws IOException {
|
||||||
return extractPercentFromImage(img,false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public float extractFutureTonePercentFromImage(BufferedImage img,boolean debug) throws IOException {
|
|
||||||
//1180,167
|
//1180,167
|
||||||
//second part: 1123
|
//second part: 1123
|
||||||
String decimal = "";
|
String decimal = "";
|
||||||
@ -315,6 +325,13 @@ public class TypeFace2 {
|
|||||||
ypointer=FUTURETONE_RECT_SEARCH_PCT.y;
|
ypointer=FUTURETONE_RECT_SEARCH_PCT.y;
|
||||||
BufferedImage test = null;
|
BufferedImage test = null;
|
||||||
|
|
||||||
|
boolean startPointer=officialypointers[iteration]>=0;
|
||||||
|
|
||||||
|
if (startPointer) {
|
||||||
|
ypointer=officialypointers[iteration];
|
||||||
|
//System.out.println("Found a saved ypointer of "+ypointer);
|
||||||
|
}
|
||||||
|
|
||||||
trialloop:
|
trialloop:
|
||||||
while (ypointer<FUTURETONE_RECT_SEARCH_PCT.height+FUTURETONE_RECT_SEARCH_PCT.y) {
|
while (ypointer<FUTURETONE_RECT_SEARCH_PCT.height+FUTURETONE_RECT_SEARCH_PCT.y) {
|
||||||
xpointer=FUTURETONE_RECT_SEARCH_PCT.x;
|
xpointer=FUTURETONE_RECT_SEARCH_PCT.x;
|
||||||
@ -397,8 +414,21 @@ public class TypeFace2 {
|
|||||||
if (decimal.length()>0) {
|
if (decimal.length()>0) {
|
||||||
break trialloop;
|
break trialloop;
|
||||||
}
|
}
|
||||||
|
if (startPointer) {
|
||||||
|
startPointer=false;
|
||||||
|
ypointer=FUTURETONE_RECT_SEARCH_PCT.y;
|
||||||
|
//System.out.println("Could not find with saved ypointer. Switching back to old ypointer.");
|
||||||
|
} else {
|
||||||
ypointer++;
|
ypointer++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
startPointer=officialypointers[iteration]>=0;
|
||||||
|
|
||||||
|
if (startPointer) {
|
||||||
|
ypointer=officialypointers[iteration];
|
||||||
|
//System.out.println("Found a saved ypointer of "+ypointer);
|
||||||
|
}
|
||||||
|
|
||||||
xpointer=FUTURETONE_RECT_SEARCH_PCT2.x;
|
xpointer=FUTURETONE_RECT_SEARCH_PCT2.x;
|
||||||
ypointer=FUTURETONE_RECT_SEARCH_PCT2.y;
|
ypointer=FUTURETONE_RECT_SEARCH_PCT2.y;
|
||||||
@ -484,8 +514,14 @@ public class TypeFace2 {
|
|||||||
if (integer.length()>0) {
|
if (integer.length()>0) {
|
||||||
break trialloop;
|
break trialloop;
|
||||||
}
|
}
|
||||||
|
if (startPointer) {
|
||||||
|
startPointer=false;
|
||||||
|
ypointer=FUTURETONE_RECT_SEARCH_PCT2.y;
|
||||||
|
//System.out.println("Could not find with saved ypointer. Switching back to old ypointer.");
|
||||||
|
} else {
|
||||||
ypointer++;
|
ypointer++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (integer.length()>0&&decimal.length()>0) {
|
if (integer.length()>0&&decimal.length()>0) {
|
||||||
return Float.parseFloat(integer+"."+decimal);
|
return Float.parseFloat(integer+"."+decimal);
|
||||||
} else {
|
} else {
|
||||||
@ -493,7 +529,7 @@ public class TypeFace2 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float extractPercentFromImage(BufferedImage img,boolean debug) throws IOException {
|
public float extractPercentFromImage(BufferedImage img,boolean debug,int iteration) throws IOException {
|
||||||
//1180,167
|
//1180,167
|
||||||
//second part: 1123
|
//second part: 1123
|
||||||
String decimal = "";
|
String decimal = "";
|
||||||
@ -502,6 +538,13 @@ public class TypeFace2 {
|
|||||||
ypointer=MEGAMIX_RECT_SEARCH_PCT.y;
|
ypointer=MEGAMIX_RECT_SEARCH_PCT.y;
|
||||||
BufferedImage test = null;
|
BufferedImage test = null;
|
||||||
|
|
||||||
|
boolean startPointer=officialypointers[iteration]>=0;
|
||||||
|
|
||||||
|
if (startPointer) {
|
||||||
|
ypointer=officialypointers[iteration];
|
||||||
|
//System.out.println("Found a saved ypointer of "+ypointer);
|
||||||
|
}
|
||||||
|
|
||||||
trialloop:
|
trialloop:
|
||||||
while (ypointer<MEGAMIX_RECT_SEARCH_PCT.height+MEGAMIX_RECT_SEARCH_PCT.y) {
|
while (ypointer<MEGAMIX_RECT_SEARCH_PCT.height+MEGAMIX_RECT_SEARCH_PCT.y) {
|
||||||
xpointer=MEGAMIX_RECT_SEARCH_PCT.x;
|
xpointer=MEGAMIX_RECT_SEARCH_PCT.x;
|
||||||
@ -584,8 +627,21 @@ public class TypeFace2 {
|
|||||||
if (decimal.length()>0) {
|
if (decimal.length()>0) {
|
||||||
break trialloop;
|
break trialloop;
|
||||||
}
|
}
|
||||||
|
if (startPointer) {
|
||||||
|
startPointer=false;
|
||||||
|
ypointer=MEGAMIX_RECT_SEARCH_PCT.y;
|
||||||
|
//System.out.println("Could not find with saved ypointer. Switching back to old ypointer.");
|
||||||
|
} else {
|
||||||
ypointer++;
|
ypointer++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
startPointer=officialypointers[iteration]>=0;
|
||||||
|
|
||||||
|
if (startPointer) {
|
||||||
|
ypointer=officialypointers[iteration];
|
||||||
|
//System.out.println("Found a saved ypointer of "+ypointer);
|
||||||
|
}
|
||||||
|
|
||||||
xpointer=MEGAMIX_RECT_SEARCH_PCT2.x;
|
xpointer=MEGAMIX_RECT_SEARCH_PCT2.x;
|
||||||
ypointer=MEGAMIX_RECT_SEARCH_PCT2.y;
|
ypointer=MEGAMIX_RECT_SEARCH_PCT2.y;
|
||||||
@ -605,29 +661,6 @@ public class TypeFace2 {
|
|||||||
for (int y=0;y<29;y++) {
|
for (int y=0;y<29;y++) {
|
||||||
Color fontCol = new Color(percentfont.getRGB(x+i*24,y));
|
Color fontCol = new Color(percentfont.getRGB(x+i*24,y));
|
||||||
Color pixelCol = new Color(img.getRGB(xpointer-24+x+1, y+ypointer));
|
Color pixelCol = new Color(img.getRGB(xpointer-24+x+1, y+ypointer));
|
||||||
/*if (fontCol.equals(Color.RED) && pixelCol.getRed()<50
|
|
||||||
&& pixelCol.getGreen()<150 && pixelCol.getBlue()>150) {
|
|
||||||
//Breaks a rule.
|
|
||||||
ruleBreak=true;
|
|
||||||
if (!debug) {
|
|
||||||
break colorloop;
|
|
||||||
} else {
|
|
||||||
test.setRGB(x, y, Color.RED.getRGB());
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
if (fontCol.equals(Color.GREEN) && (pixelCol.getRed()>50
|
|
||||||
|| pixelCol.getGreen()>170 || pixelCol.getBlue()<150)) {
|
|
||||||
//Breaks a rule.
|
|
||||||
ruleBreak=true;
|
|
||||||
if (!debug) {
|
|
||||||
break colorloop;
|
|
||||||
} else {
|
|
||||||
test.setRGB(x, y, Color.GREEN.getRGB());
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
if (debug) {
|
|
||||||
test.setRGB(x, y, pixelCol.getRGB());
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (fontCol.equals(Color.RED)) {
|
if (fontCol.equals(Color.RED)) {
|
||||||
if (lightColorCheck(pixelCol)) {
|
if (lightColorCheck(pixelCol)) {
|
||||||
@ -694,8 +727,14 @@ public class TypeFace2 {
|
|||||||
if (integer.length()>0) {
|
if (integer.length()>0) {
|
||||||
break trialloop;
|
break trialloop;
|
||||||
}
|
}
|
||||||
|
if (startPointer) {
|
||||||
|
startPointer=false;
|
||||||
|
ypointer=MEGAMIX_RECT_SEARCH_PCT2.y;
|
||||||
|
//System.out.println("Could not find with saved ypointer. Switching back to old ypointer.");
|
||||||
|
} else {
|
||||||
ypointer++;
|
ypointer++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (integer.length()>0&&decimal.length()>0) {
|
if (integer.length()>0&&decimal.length()>0) {
|
||||||
return Float.parseFloat(integer+"."+decimal);
|
return Float.parseFloat(integer+"."+decimal);
|
||||||
} else {
|
} else {
|
||||||
@ -726,11 +765,11 @@ public class TypeFace2 {
|
|||||||
ypointer=0;
|
ypointer=0;
|
||||||
String total = "";
|
String total = "";
|
||||||
|
|
||||||
boolean startPointer=ypointers[iteration]>=0;
|
boolean startPointer=officialypointers[iteration]>=0;
|
||||||
|
|
||||||
if (startPointer) {
|
if (startPointer) {
|
||||||
ypointer=ypointers[iteration];
|
ypointer=officialypointers[iteration];
|
||||||
System.out.println("Found a saved ypointer of "+ypointer);
|
//System.out.println("Found a saved ypointer of "+ypointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
trialloop:
|
trialloop:
|
||||||
@ -808,7 +847,7 @@ public class TypeFace2 {
|
|||||||
if (startPointer) {
|
if (startPointer) {
|
||||||
startPointer=false;
|
startPointer=false;
|
||||||
ypointer=0;
|
ypointer=0;
|
||||||
System.out.println("Could not find with saved ypointer. Switching back to old ypointer.");
|
//System.out.println("Could not find with saved ypointer. Switching back to old ypointer.");
|
||||||
} else {
|
} else {
|
||||||
ypointer++;
|
ypointer++;
|
||||||
}
|
}
|
||||||
@ -828,10 +867,10 @@ public class TypeFace2 {
|
|||||||
ypointer=0;
|
ypointer=0;
|
||||||
String total = "";
|
String total = "";
|
||||||
|
|
||||||
boolean startPointer=ypointers[iteration]>=0;
|
boolean startPointer=officialypointers[iteration]>=0;
|
||||||
|
|
||||||
if (startPointer) {
|
if (startPointer) {
|
||||||
ypointer=ypointers[iteration];
|
ypointer=officialypointers[iteration];
|
||||||
}
|
}
|
||||||
|
|
||||||
trialloop:
|
trialloop:
|
||||||
@ -930,10 +969,10 @@ public class TypeFace2 {
|
|||||||
ypointer=0;
|
ypointer=0;
|
||||||
String total = "";
|
String total = "";
|
||||||
|
|
||||||
boolean startPointer=ypointers[iteration]>=0;
|
boolean startPointer=officialypointers[iteration]>=0;
|
||||||
|
|
||||||
if (startPointer) {
|
if (startPointer) {
|
||||||
ypointer=ypointers[iteration];
|
ypointer=officialypointers[iteration];
|
||||||
}
|
}
|
||||||
|
|
||||||
trialloop:
|
trialloop:
|
||||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |