diff --git a/DivaBot/DivaBot.jar b/DivaBot/DivaBot.jar index c78d147..b70ae6a 100644 Binary files a/DivaBot/DivaBot.jar and b/DivaBot/DivaBot.jar differ diff --git a/DivaBot/config.txt b/DivaBot/config.txt index 85517d0..4080069 100644 --- a/DivaBot/config.txt +++ b/DivaBot/config.txt @@ -1,4 +1,4 @@ -DISPLAYDATA -16765135*-10027060*48*Yu Gothic UI Bold*665*64*10000*Song Title (Japanese+Romanized)|Song Title (English)*80*16**~-16765135*-10027060*48*Yu Gothic UI Light*380*64*10000*Best Play*80*952**~-16765135*-10027060*48*Yu Gothic UI Light*380*64*10000*Overall Rating*560*952**~-16765135*-10027060*48*Yu Gothic UI Light*380*64*10000*Song Difficulty|Pass/Play Count (+%)|FC Count (+%)*1048*952**~-16765135*-10027060*16*Yu Gothic UI Semilight*245*14*10000*Song Artist*504*16*Artist: * +DISPLAYDATA -16765135*-10027060*48*Yu Gothic UI Bold*665*64*10000*Song Title (Japanese+Romanized)|Song Title (English)*80*16**~-16765135*-10027060*48*Yu Gothic UI Light*380*64*10000*Best Play*80*952**~-16765135*-10027060*48*Yu Gothic UI Light*380*64*10000*Overall Rating*560*952**~-16765135*-10027060*48*Yu Gothic UI Light*380*64*10000*Song Difficulty|Pass/Play Count (+%)|FC Count (+%)*1048*952**~-16765135*-10027060*16*Yu Gothic UI Semilight*245*14*10000*Song Artist*504*16*Artist: *~-16765135*-10027060*48*Yu Gothic UI Light*380*128*10000*Song Difficulty*840*320** LAST_HEIGHT 128 WIDTH 1936 HEIGHT 1096 diff --git a/DivaBot/rectangle0.png b/DivaBot/rectangle0.png index 2ab68f6..3ce7f1d 100644 Binary files a/DivaBot/rectangle0.png and b/DivaBot/rectangle0.png differ diff --git a/DivaBot/rectangle1.png b/DivaBot/rectangle1.png index 9ac1c09..9e8bcc0 100644 Binary files a/DivaBot/rectangle1.png and b/DivaBot/rectangle1.png differ diff --git a/DivaBot/rectangle2.png b/DivaBot/rectangle2.png index 500e842..c7d16b3 100644 Binary files a/DivaBot/rectangle2.png and b/DivaBot/rectangle2.png differ diff --git a/DivaBot/rectangle3.png b/DivaBot/rectangle3.png index 88c626f..690c376 100644 Binary files a/DivaBot/rectangle3.png and b/DivaBot/rectangle3.png differ diff --git a/DivaBot/rectangle4.png b/DivaBot/rectangle4.png index 2313514..8887d93 100644 Binary files a/DivaBot/rectangle4.png and b/DivaBot/rectangle4.png differ diff --git a/DivaBot/src/sig/ColorRegion.java b/DivaBot/src/sig/ColorRegion.java index 33767a7..db6a82c 100644 --- a/DivaBot/src/sig/ColorRegion.java +++ b/DivaBot/src/sig/ColorRegion.java @@ -41,7 +41,11 @@ public class ColorRegion { if (region.x+x<0||region.x+x>=region.x+region.width||region.y+y<0||region.y+y>=region.y+region.height) { continue; } - total+=new Color(img.getRGB(region.x+x, region.y+y)).getRed(); + try { + total+=new Color(img.getRGB(region.x+x, region.y+y)).getRed(); + } catch (NullPointerException|ArrayIndexOutOfBoundsException e) { + + } } } return total/(region.width*region.height); @@ -53,7 +57,11 @@ public class ColorRegion { if (region.x+x<0||region.x+x>=region.x+region.width||region.y+y<0||region.y+y>=region.y+region.height) { continue; } - total+=new Color(img.getRGB(region.x+x, region.y+y)).getGreen(); + try { + total+=new Color(img.getRGB(region.x+x, region.y+y)).getGreen(); + } catch (NullPointerException|ArrayIndexOutOfBoundsException e) { + + } } } return total/(region.width*region.height); @@ -65,7 +73,11 @@ public class ColorRegion { if (region.x+x<0||region.x+x>=region.x+region.width||region.y+y<0||region.y+y>=region.y+region.height) { continue; } - total+=new Color(img.getRGB(region.x+x, region.y+y)).getBlue(); + try { + total+=new Color(img.getRGB(region.x+x, region.y+y)).getBlue(); + } catch (NullPointerException|ArrayIndexOutOfBoundsException e) { + + } } } return total/(region.width*region.height); diff --git a/DivaBot/src/sig/MyRobot.java b/DivaBot/src/sig/MyRobot.java index 62dc547..0f80ff8 100644 --- a/DivaBot/src/sig/MyRobot.java +++ b/DivaBot/src/sig/MyRobot.java @@ -291,8 +291,7 @@ public class MyRobot{ if (obj.has("rating")) { p.overallrating = (int)obj.getDouble("rating"); if (p.lastRating