Finish full compatibility with Future Tone.

secondmonitor
sigonasr2 4 years ago
parent 2cdb6c4105
commit b3c3571ea4
  1. BIN
      DivaBot/DivaBot.jar
  2. 250
      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. 2
      DivaBot/colorData
  10. 2
      DivaBot/config.txt
  11. BIN
      DivaBot/rectangle0.png
  12. BIN
      DivaBot/rectangle1.png
  13. BIN
      DivaBot/rectangle2.png
  14. BIN
      DivaBot/rectangle3.png
  15. BIN
      DivaBot/rectangle4.png
  16. BIN
      DivaBot/results.png
  17. 53
      DivaBot/src/sig/Calibrator.java
  18. 12
      DivaBot/src/sig/DrawCanvas.java
  19. 217
      DivaBot/src/sig/MyRobot.java
  20. 33
      DivaBot/src/sig/ReloadSong.java
  21. 2
      DivaBot/src/sig/Result.java
  22. 26
      DivaBot/src/sig/SongData.java
  23. 6
      DivaBot/src/sig/TypeFace2.java
  24. BIN
      DivaBot/test.png
  25. BIN
      DivaBot/typeface4.png

Binary file not shown.

@ -0,0 +1,250 @@
いのちの歌:3787077022,4952556982,3388453016
Far Away:5996660189,5417327953,4596182792
Yellow:5964233677,4878378109,2702469462
The secret garden:3156623934,3591086583,3307262318
Innocence:4486342410,4710805493,4893033868
悠久:3794110550,3455171543,3002679098
天鵞絨アラベスク:6199982822,5725972604,4403475776
パズル:3791418120,3892915868,3750237486
Tell Your World:1958311490,1911359235,3709018919
Last Night, Good Night:2032763025,2886004827,2862210519
夢の続き:6227122549,5401774477,4598248938
荒野と森と魔法の歌:4619430056,5064263541,5187160117
Dear cocoa girls:6026281872,5831738307,5547794156
Starduster:2226063814,1696053235,1464460853
ナイトメア☆パーティーナイト:5813035457,5263833757,5051685357
積乱雲グラフィティ:4156793578,5311454260,5110068342
ほんとは分かってる:4725454697,5323406520,7051277857
Holy Star -2010 DIVA mix-:2644678999,2995987094,3283820937
Star Story:1044867433,1947458564,2539217068
FREELY TOMORROW:7257101374,2043529882,3368468982
39:5724775776,5734583449,4923968185
ゆめゆめ:4889738762,4836978520,3386313772
ファインダー (DSLR remix - re-COLON-edit):2961371663,3748682433,4037353672
ラブリスト更新中?:3414936018,3902077312,5012881426
ココロ:4420964303,4120075139,2886007751
1/6 -out of the gravity-:2591504700,2563324747,1983090365
深海シティアンダーグラウンド:2144233093,2080599055,2135292491
クローバー♣クラブ:2990985273,3796021063,3469239041
歌に形はないけれど:5288117315,5347894914,5010686300
神曲:3573890502,3121921050,2325121972
moon:4651919614,5375067242,5193459876
千年の独奏歌:4091681717,3911009142,3460840916
packaged:2480691199,3207787028,2582987442
初めての恋が終わる時:2084914479,2479957977,2668605837
迷子ライフ:2217864102,3763864973,5561269499
ダブルラリアット:5609095703,5272040623,5023372667
Change me:3430881143,2186510490,1424231858
唐傘さんが通る:2707808652,1743970035,993400397
巨大少女:2436606548,2532344764,4219553740
ハト:2308833910,4985464204,5415389034
那由他の彼方まで:2754236822,2653185901,2991411062
あなたの歌姫:4657721257,5141785367,6842986542
メルト:2754736162,3750090817,3986869671
桜ノ雨:5092282586,3320870678,3924880851
みくみくにしてあげる♪:1789270087,4352777606,4389788068
その一秒 スローモーション:2880507580,4107398778,3546198389
恋スルVOC@LOID:7272779361,6735255471,6346955174
from Y to Y:4991734135,4920190088,4955938929
サヨナラ・グッバイ:4954490794,4059238850,2668276864
カンタレラ:2410575590,1975987991,1133213669
ハジメテノオト:5983406471,6687169699,6350467588
Palette:4640730351,4763876062,5032315945
リンリンシグナル:3861355139,4483557874,4288300572
深海少女:1707469430,2008783754,4464171873
Weekender Girl:5324941973,4291207773,3423226791
雨のちSweet*Drops:4949334744,6594145728,6390149415
モノクロ∞ブルースカイ:3389877996,4499481553,6499626921
えれくとりっく・えんじぇぅ:3980119207,3510281625,4771931931
数多の舞 -Dance of many-:2401065708,2243409160,1437283022
愛言葉:6375720855,5512985755,5186415533
Nostalogic:5231911605,2290915170,3652715478
偶像無線:2239840895,3252013283,4302899745
ストロボナイツ:2221941121,3149528837,3097688282
Fire◎Flower:3196395096,1559869016,1380121972
恋ノート////:4618955230,3690514819,4166322160
ブラック★ロックシューター:3036839485,3785132374,4324267858
Glory 3usi9:7361822927,8101158135,7655821118
ジェミニ:4566581547,3930341646,2491478509
スキキライ:6375080042,5628658709,4489092751
片想いサンバ:7516060208,6416647021,5617339874
ペリコ・スペースシッパー:4530537478,5895476069,4838941237
白い雪のプリンセスは:6477076288,5670210070,6127326782
オオカミガール:2163635663,2212003781,3280896200
ピンクムーン:4306097457,4973788542,4282464180
Hand in Hand:4892177044,5840515936,6839791721
ひねくれ者:2008897440,2346612136,2384933892
花舞月詠譚:4860049628,3126633182,3732388319
トリコロール・エア・ライン:5054443968,6302758587,5532466157
Stay with me:4179243750,2938778561,2133478271
ワールドイズマイン:3514853650,2782175661,3101508140
LOL -lots of laugh-:6599146898,5104002399,4348564756
DECORATOR:1442679859,2052545714,2980204469
ねこみみスイッチ:5093601050,5012084300,4538385310
soundless voice:3268042338,4108985804,4291502093
メテオ:4042556956,3736156743,3546567143
タイムマシン:3322454559,4323361543,3838983567
インタビュア:6218378700,5419546507,5607881690
ACUTE:2287775400,1677877830,2446897811
Dear:3921695925,4586518316,6159402143
ナイト・オブ・ライト:4804452339,6668911362,6631926761
ふたりで。:4985890077,4873000937,4165636336
千本桜:2510549995,1987225572,1470632516
ハイハハイニ:2238100001,1309036999,1089302376
恋は戦争:3955203210,4555476457,4578065367
StargazeR:3848056806,3799578797,3999581294
Rosary Pale:3295939427,3593614259,5085058769
LIKE THE WIND:2929836187,3136865281,3251101453
SPiCa -39's Giving Day Edition-:2891058230,5144150334,5392908832
番凩:4249517569,2500565224,1896049310
キップル・インダストリー:6471696981,5796629984,4997785436
MEGANE:7986556705,4969011970,5437330194
Catch the Wave:4343719713,4804413063,4273000323
どりーみんチュチュ:6271739245,2914237530,2885211300
magnet:2578055564,1433856855,1330744444
Just Be Friends:5550701229,5282603582,5516544225
カラフル×メロディ:7053927488,5801161437,4474511861
ルカルカ★ナイトフィーバー:5239547726,3343754940,4971750363
*ハロー、プラネット。 (I.M.PLSE-EDIT):6033645714,4553090266,5706056041
on the rocks:3167802137,1783478494,1663414413
キャットフード:6133598714,5105937748,5282971632
メランコリック:4341471643,4468078325,3321426154
VOiCE:1739709637,760670452,751757815
ネトゲ廃人シュプレヒコール:1882940512,2232911860,2275167005
天樂:1594314894,349078351,236826828
東京テディベア:1140009092,810425663,792526463
スイートマジック:6741568324,4935361164,3858526312
テレカクシ思春期:5594446595,4992249003,3836694482
アマツキツネ:3804943257,2965868644,2546018502
shake it!:2008389468,2826444662,2521224602
からくりピエロ:2535705495,1889525489,1822697715
Hello, Worker:2226445527,2883594200,4351347913
erase or zero:3973936726,3480147991,3011414741
トリノコシティ:6576457151,6808659239,7154585512
リモコン:4243525488,3519899972,670897522
結ンデ開イテ羅刹ト骸:2230329998,1914472383,1888824354
エレクトロサチュレイタ:4475135103,3554015698,3823801483
炉心融解:2011033042,3198738276,3246830987
右肩の蝶:4090696686,2553960379,3258179232
No Logic:963996877,850265860,1564442618
サマーアイドル:6100411450,5820379986,5839565283
忘却心中:4819700046,3914483789,3185286843
WORLD'S END UMBRELLA:3014918740,2890096706,2752861686
どういうことなの!?:4545823609,5000307635,5436382319
二息歩行:6144238955,5544194069,5623497084
夢喰い白黒バク:1775996978,1492418077,1070664112
マージナル:4676306706,5002732104,5153740449
サウンド:1739263872,2193984293,2045141025
巴里映画少女:4899907178,3898771413,3846480239
星屑ユートピア:1999469156,1336111827,596705443
Promise:3144219364,3739325927,4781498885
アドレサンス:3676202002,2891677938,2831270683
Leia:4524550121,3497346406,2955449110
Ievan Polkka:2929322440,2972939370,2409221483
嘘つきベティ:4233892897,3874147199,3715514811
孤独の果て:2602945186,2563400016,2471351769
さあ、どっち?:2925868079,1135611442,1069505227
ZIGG-ZAGG:4447469239,5356900991,4484186727
Starlite★Lydian:4921423801,3483968207,4498672650
So much loving you★ -DIVA Edit-:6804342416,5578126567,6941991747
タイムリミット:4221985401,4862692793,7203215032
Dreaming Leaf -ユメミルコトノハ-:3222721817,5789125389,6222407775
ハイスクール:4482253263,5570594857,5176432837
break;down:3234650408,1757608938,1793135459
崩壊歌姫 -disruptive diva-:2422206826,1150641481,1281734090
ほしをつくるひと:4253158952,3567013636,2512474418
みくみく菌にご注意♪:5137097326,3940552496,909500427
迷的サイバネティックス:3522284723,2339793413,2357460255
melody...:2061858160,3558021676,5453071775
ルシッドドリーミング:6388177808,6497517743,5574854365
アウトオブエデン:4208380258,4627531894,4382442403
月向うまでのトラベル:3637491364,4224102167,3555440896
ブラックノートに溺れさせて:1095304241,1234194858,1263434379
Mellow Yellow:5459180335,6702974263,2078603420
ぎずも:3232495739,3727785306,3503196237
ミラクルペイント:3855349038,1775818778,1918148774
AFTER BURNER:2199158515,2730755391,4368842747
ネコミミアーカイブ:5166450877,3052911615,2448207816
はじめまして地球人さん:3843964404,2940633745,3513670489
ブラックゴールド:4747705175,4812355721,3956686811
DYE:3565973207,2157029654,2416200316
エイリアンエイリアン:6584998279,3130332235,3166743703
39みゅーじっく!:3651567500,4481908154,6207497707
こっち向いて Baby:5118571300,3949344245,3785740700
Magical Sound Shower:4790461933,5199505705,4685934236
キミに:5993296741,6101838688,5862816583
ヒバナ:2098526179,2189516160,2018337883
マスターオブパペッツ:2672494027,1801574020,1108110883
なりすましゲンガー:2091751750,1695177565,1489126446
壊セ壊セ:4715934868,2764863767,2253853944
アカツキアライヴァル:2356005983,1950174841,1865638741
ODDS&ENDS:7221115122,5699688784,3942971913
指切り:5223032283,3792354707,3083055893
Pane dhiria:1267936293,1914064172,2287130377
え?あぁ、そう。:3884015728,2801529497,2785759986
システマティック・ラヴ:4012793748,2945948428,3416692091
PIANO*GIRL:5617761462,4480618429,3406096688
金の聖夜霜雪に朽ちて:4964652723,2210400014,1203879206
カラフル×セクシィ:6073900156,5319839007,3610881827
サンドリヨン:2768739004,2145434818,2476455675
ヒビカセ:2891963277,2707866244,3068638983
1925:5844336870,5802224995,5721155118
スノーマン:2235422588,3475208350,5237115148
ジュゲムシーケンサー:4769086491,3824609333,3681666832
SYMPHONIC DIVE - DIVA edit -:2407224416,2869297489,3313925968
SING&SMILE:4624563011,5758954815,5381733999
slump:4029387690,2362120149,2381904766
そいやっさぁ!!:3769725237,1895045843,841704931
君の体温:4124400691,4331377661,4017306644
Knife:3501013643,2015238387,1948776401
多重未来のカルテット~QUARTET THEME~:1973869383,1993264455,2507240454
右肩の蝶 -39's Giving Day Edition-:915863153,950726942,498994371
透明水彩:5796936963,6123422381,6330740232
Equation+**:5616078976,5471739277,4915681049
Absolunote:7486631516,8070231386,8029471096
ロキ:1239592967,645558990,1977730698
Nyanyanyanyanyanyanya!:4669645581,4518634435,3823158692
おはヨーデル:3668222226,5956046968,4582327827
パラジクロロベンゼン:2467773926,2014301625,2135326217
アンハッピーリフレイン:4347362608,4233844227,3827996270
恋色病棟:6448592850,5046651343,5321121529
秘密警察:1878346750,2197264035,2527332023
いろは唄:5565943005,5088824378,3521964428
ステップフォワード:2853240562,2552453091,3028885381
ローリンガール:4943657817,4945312942,4941895096
Gothic and Loneliness ~I'm the very DIVA~:620040219,1035007598,2436639115
ロミオとシンデレラ:2831812370,1376864465,2266160197
初音ミクの消失 -DEAD END-:3969711366,3801445354,3826357539
どうしてこうなった:8126003894,8057428422,5004282561
Sweet Devil:4039129173,1608027783,3391057599
ゴーストルール:2125012359,2056031510,3183856131
砂の惑星:2649319911,1953536587,1661463129
こちら、幸福安心委員会です。:4031684918,2838861062,2415095878
ジターバグ:3783904442,2880986341,2670650784
妄想スケッチ:3839155440,3430727547,4517917951
テオ:1296560848,900119371,4318261946
大江戸ジュリアナイト:3750381310,3619003273,6640888220
ありふれたせかいせいふく:2575855793,2188526953,2221363359
フランシスカ:3363868596,3516329601,2001827422
リンちゃんなう!:4795392591,4186705584,2923229127
孤独の果て -extend edition-:2878299275,2542484084,1971444629
イヤイヤ星人:7899258719,5702561164,6106431376
骸骨楽団とリリア:3008803816,2979404599,2954270478
フキゲンワルツ:4465704133,4648578268,3398559800
ぽっぴっぽー:4107404055,5049120494,3117959178
エンヴィキャットウォーク:2126366258,1619754254,1560210579
サイハテ:3886571954,2792920472,2638060064
Blackjack:4431318784,2479895210,2312605933
ジグソーパズル:4052558577,3003477946,3646729136
千本桜 -F edition-:3669486943,2863394531,2303163036
ネガポジ*コンティニューズ:5974390571,5771964518,4856431041
裏表ラバーズ:4472635524,4381784961,4520201373
二次元ドリームフィーバー:1646588035,1129193555,712421246
初音ミクの激唱:2394549817,4590067387,4393753611
ワールズエンド・ダンスホール:2925365339,3730343405,3591343131
Sadistic.Music∞Factory:2863660653,2704036080,2933102044
デンパラダイム:8190246018,7614123069,7953731113
ピアノ×フォルテ×スキャンダル:3000502003,2139361786,1991384783
ピアノ×フォルテ×スキャンダル:2093967217,1405901634,1423422533
アゲアゲアゲイン:6373578013,5444279994,4492164891
アゲアゲアゲイン:6348434049,5182227759,4647280549

@ -1,4 +1,4 @@
419 451
206 314
1642 1557
889 935

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

@ -122,7 +122,7 @@ Sweet Devil:6634620218,3136086595,6192411098
骸骨楽団とリリア:5488965838,5357526994,5306980950 骸骨楽団とリリア:5488965838,5357526994,5306980950
サイハテ:5983540022,5081622365,4912579017 サイハテ:5983540022,5081622365,4912579017
ジグソーパズル:6495159304,5452309457,5951916616 ジグソーパズル:6495159304,5452309457,5951916616
千本桜:6271294756,4733142831,3968167349 千本桜 -F edition-:6271294756,4733142831,3968167349
ピアノ×フォルテ×スキャンダル:4747934315,2981952004,2892967188 ピアノ×フォルテ×スキャンダル:4747934315,2981952004,2892967188
Blackjack:6890081528,3765185410,3660773048 Blackjack:6890081528,3765185410,3660773048
ぽっぴっぽー:7315202275,8637207696,5495071853 ぽっぴっぽー:7315202275,8637207696,5495071853

@ -1,4 +1,4 @@
DISPLAYDATA -16776961*-13369549*94*Microsoft YaHei UI Bold*600*150*5000*Song Title (Japanese+Romanized)*176*80**~-16776961*-13369549*24*Gulim*400*40*1000*Overall Rating|Song Title (Romanized)|FC Count*176*240**~-16776961*-13369549*24*Dialog.italic*400*40*300*Song Title (Japanese+Romanized+ENG)*0*0*Header: * DISPLAYDATA -16776961*-13369549*94*Microsoft YaHei UI Bold*600*150*5000*Song Title (Japanese+Romanized)*176*64**~-16776961*-13369549*24*Gulim*400*40*1000*Overall Rating|Song Title (Romanized)|FC Count*176*240**~-16776961*-13369549*24*Dialog.italic*400*40*300*Song Difficulty*0*0*Header: *
LAST_HEIGHT 40 LAST_HEIGHT 40
WIDTH 1127 WIDTH 1127
HEIGHT 732 HEIGHT 732

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@ -57,7 +57,7 @@ public class Calibrator{
Overlay.OVERLAY.setVisible(true); Overlay.OVERLAY.setVisible(true);
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.04||
((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 Megamix 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;
MyRobot.ENDDRAG=null; MyRobot.ENDDRAG=null;
@ -66,6 +66,9 @@ public class Calibrator{
return; 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); MyRobot.FRAME.setAlwaysOnTop(true);
img = MyRobot.MYROBOT.getSizedCapture(new Rectangle(0,0,MyRobot.screenSize.width,MyRobot.screenSize.height)); img = MyRobot.MYROBOT.getSizedCapture(new Rectangle(0,0,MyRobot.screenSize.width,MyRobot.screenSize.height));
@ -88,9 +91,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if (!(col.getRed()>=5&&col.getRed()<=40&& if (!((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&& col.getGreen()>=170&&col.getGreen()<=210&&
col.getBlue()>=205&&col.getBlue()<=250)) { col.getBlue()>=180&&col.getBlue()<=250)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
//This is the max X. Calibration on this side good. //This is the max X. Calibration on this side good.
MyRobot.STARTDRAG.x++; MyRobot.STARTDRAG.x++;
System.out.println("End at "+MyRobot.STARTDRAG.x); System.out.println("End at "+MyRobot.STARTDRAG.x);
@ -114,9 +119,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if (!(col.getRed()>=5&&col.getRed()<=100&& if (!((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&& col.getGreen()>=170&&col.getGreen()<=210&&
col.getBlue()>=205&&col.getBlue()<=250)) { col.getBlue()>=180&&col.getBlue()<=250)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
//This is the max Y. Calibration on this side good. //This is the max Y. Calibration on this side good.
MyRobot.STARTDRAG.y++; MyRobot.STARTDRAG.y++;
System.out.println("End at "+MyRobot.STARTDRAG.y); System.out.println("End at "+MyRobot.STARTDRAG.y);
@ -139,9 +146,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if (!(col.getRed()>=40&&col.getRed()<=90&& if (!((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&& col.getGreen()>=10&&col.getGreen()<=55&&
col.getBlue()>=40&&col.getBlue()<=90)) { col.getBlue()>=40&&col.getBlue()<=90)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
//This is the max X. Calibration on this side good. //This is the max X. Calibration on this side good.
MyRobot.ENDDRAG.x--; MyRobot.ENDDRAG.x--;
System.out.println("End at "+MyRobot.STARTDRAG.x); System.out.println("End at "+MyRobot.STARTDRAG.x);
@ -165,9 +174,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if (!(col.getRed()>=40&&col.getRed()<=90&& if (!((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&& col.getGreen()>=10&&col.getGreen()<=55&&
col.getBlue()>=40&&col.getBlue()<=90)) { col.getBlue()>=40&&col.getBlue()<=90)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
//This is the max Y. Calibration on this side good. //This is the max Y. Calibration on this side good.
MyRobot.ENDDRAG.y--; MyRobot.ENDDRAG.y--;
System.out.println("End at "+MyRobot.ENDDRAG.y); System.out.println("End at "+MyRobot.ENDDRAG.y);
@ -191,9 +202,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y+i,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x,MyRobot.STARTDRAG.y+i,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if ((col.getRed()>=5&&col.getRed()<=75&& if (((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&& col.getGreen()>=170&&col.getGreen()<=210&&
col.getBlue()>=180&&col.getBlue()<=250)) { col.getBlue()>=180&&col.getBlue()<=250)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
//This is the max X. Calibration on this side good. //This is the max X. Calibration on this side good.
MyRobot.STARTDRAG.y=MyRobot.STARTDRAG.y+i; MyRobot.STARTDRAG.y=MyRobot.STARTDRAG.y+i;
System.out.println("End at "+MyRobot.STARTDRAG.x); System.out.println("End at "+MyRobot.STARTDRAG.x);
@ -218,9 +231,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x+i,MyRobot.STARTDRAG.y,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.STARTDRAG.x+i,MyRobot.STARTDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if ((col.getRed()>=5&&col.getRed()<=100&& if (((col.getRed()>=5&&col.getRed()<=100&&
col.getGreen()>=170&&col.getGreen()<=210&& col.getGreen()>=170&&col.getGreen()<=210&&
col.getBlue()>=205&&col.getBlue()<=250)) { col.getBlue()>=180&&col.getBlue()<=250)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
MyRobot.STARTDRAG.x=MyRobot.STARTDRAG.x+i; MyRobot.STARTDRAG.x=MyRobot.STARTDRAG.x+i;
//This is the max Y. Calibration on this side good. //This is the max Y. Calibration on this side good.
System.out.println("End at "+MyRobot.STARTDRAG.y); System.out.println("End at "+MyRobot.STARTDRAG.y);
@ -245,9 +260,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y-i,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x,MyRobot.ENDDRAG.y-i,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if ((col.getRed()>=40&&col.getRed()<=90&& if (((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&& col.getGreen()>=10&&col.getGreen()<=55&&
col.getBlue()>=40&&col.getBlue()<=90)) { col.getBlue()>=40&&col.getBlue()<=90)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
//This is the max X. Calibration on this side good. //This is the max X. Calibration on this side good.
MyRobot.ENDDRAG.y=MyRobot.ENDDRAG.y-i; MyRobot.ENDDRAG.y=MyRobot.ENDDRAG.y-i;
MyRobot.ENDDRAG.x++; MyRobot.ENDDRAG.x++;
@ -273,9 +290,11 @@ public class Calibrator{
BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x-i,MyRobot.ENDDRAG.y,1,1); BufferedImage miniImg = img.getSubimage(MyRobot.ENDDRAG.x-i,MyRobot.ENDDRAG.y,1,1);
Color col = new Color(miniImg.getRGB(0, 0)); Color col = new Color(miniImg.getRGB(0, 0));
System.out.println("Checking "+col); System.out.println("Checking "+col);
if ((col.getRed()>=40&&col.getRed()<=90&& if (((col.getRed()>=40&&col.getRed()<=90&&
col.getGreen()>=10&&col.getGreen()<=55&& col.getGreen()>=10&&col.getGreen()<=55&&
col.getBlue()>=40&&col.getBlue()<=90)) { col.getBlue()>=40&&col.getBlue()<=90)||
(col.getRed()<=30&&col.getGreen()<=30&&col.getBlue()<=30)
)) {
MyRobot.ENDDRAG.x=MyRobot.ENDDRAG.x-i; MyRobot.ENDDRAG.x=MyRobot.ENDDRAG.x-i;
//This is the max Y. Calibration on this side good. //This is the max Y. Calibration on this side good.
System.out.println("End at "+MyRobot.ENDDRAG.y); System.out.println("End at "+MyRobot.ENDDRAG.y);

@ -153,11 +153,17 @@ public class DrawCanvas extends JPanel implements KeyListener,ComponentListener,
bestPlay = null; bestPlay = null;
} }
obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/playcount/"+MyRobot.USERNAME+"/"+URLEncoder.encode(MyRobot.p.songname, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20")+"/"+difficulty); obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/playcount/"+MyRobot.USERNAME+"/"+URLEncoder.encode(MyRobot.p.songname, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20")+"/"+difficulty);
plays = obj.getInt("playcount"); if (obj.has("playcount")) {
plays = obj.getInt("playcount");
}
obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/songpasscount/"+MyRobot.USERNAME+"/"+URLEncoder.encode(MyRobot.p.songname, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20")+"/"+difficulty); obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/songpasscount/"+MyRobot.USERNAME+"/"+URLEncoder.encode(MyRobot.p.songname, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20")+"/"+difficulty);
passes = obj.getInt("passcount"); if (obj.has("passcount")) {
passes = obj.getInt("passcount");
}
obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/songfccount/"+MyRobot.USERNAME+"/"+URLEncoder.encode(MyRobot.p.songname, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20")+"/"+difficulty); obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/songfccount/"+MyRobot.USERNAME+"/"+URLEncoder.encode(MyRobot.p.songname, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20")+"/"+difficulty);
fcCount = obj.getInt("fccount"); if (obj.has("fccount")) {
fcCount = obj.getInt("fccount");
}
/*obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/rating/"+MyRobot.USERNAME); /*obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/rating/"+MyRobot.USERNAME);
lastRating = overallrating; lastRating = overallrating;
overallrating = (int)obj.getDouble("rating"); overallrating = (int)obj.getDouble("rating");

@ -147,6 +147,7 @@ public class MyRobot{
boolean overlayHidden=false; boolean overlayHidden=false;
static boolean onSongSelect=false; static boolean onSongSelect=false;
static int stillOnSongSelect=0;
static BufferedImage finishbutton = null; static BufferedImage finishbutton = null;
static Dimension screenSize = new Dimension(0,0); static Dimension screenSize = new Dimension(0,0);
static boolean dragging = false; static boolean dragging = false;
@ -161,6 +162,7 @@ public class MyRobot{
public static DisplayManager DM; public static DisplayManager DM;
public static ReloadSong AO; public static ReloadSong AO;
public static boolean FUTURETONE = false; public static boolean FUTURETONE = false;
public static boolean LASTMODE_FUTURETONE = false;
public static String USERNAME = ""; public static String USERNAME = "";
public static String AUTHTOKEN = ""; public static String AUTHTOKEN = "";
@ -174,6 +176,7 @@ public class MyRobot{
} }
if (args[0].equalsIgnoreCase("debug")) { if (args[0].equalsIgnoreCase("debug")) {
DEBUG_MODE=true; DEBUG_MODE=true;
AuthenticateUser();
} }
} else { } else {
AuthenticateUser(); AuthenticateUser();
@ -320,12 +323,14 @@ public class MyRobot{
prevSongTitle=selectedSong.title; prevSongTitle=selectedSong.title;
prevDifficulty=difficulty; prevDifficulty=difficulty;
MyRobot.p.repaint(); MyRobot.p.repaint();
MYROBOT.keyPress(KeyEvent.VK_CONTROL); if (NEWSONGS.length==0) {
MYROBOT.keyPress(KeyEvent.VK_SHIFT); MYROBOT.keyPress(KeyEvent.VK_CONTROL);
MYROBOT.keyPress(KeyEvent.VK_F11); MYROBOT.keyPress(KeyEvent.VK_SHIFT);
MYROBOT.keyRelease(KeyEvent.VK_F11); MYROBOT.keyPress(KeyEvent.VK_F11);
MYROBOT.keyRelease(KeyEvent.VK_SHIFT); MYROBOT.keyRelease(KeyEvent.VK_F11);
MYROBOT.keyRelease(KeyEvent.VK_CONTROL); MYROBOT.keyRelease(KeyEvent.VK_SHIFT);
MYROBOT.keyRelease(KeyEvent.VK_CONTROL);
}
} }
} }
lastSongSelectTime = System.currentTimeMillis(); lastSongSelectTime = System.currentTimeMillis();
@ -338,12 +343,14 @@ public class MyRobot{
if (OnResultsScreen() && !recordedResults && !recordingResults && results.size()==0) { if (OnResultsScreen() && !recordedResults && !recordingResults && results.size()==0) {
lastSongSelectTime=System.currentTimeMillis(); lastSongSelectTime=System.currentTimeMillis();
MYROBOT.setAutoDelay(0); MYROBOT.setAutoDelay(0);
MYROBOT.keyPress(KeyEvent.VK_CONTROL); if (NEWSONGS.length==0) {
MYROBOT.keyPress(KeyEvent.VK_SHIFT); MYROBOT.keyPress(KeyEvent.VK_CONTROL);
MYROBOT.keyPress(KeyEvent.VK_F12); MYROBOT.keyPress(KeyEvent.VK_SHIFT);
MYROBOT.keyRelease(KeyEvent.VK_F12); MYROBOT.keyPress(KeyEvent.VK_F12);
MYROBOT.keyRelease(KeyEvent.VK_SHIFT); MYROBOT.keyRelease(KeyEvent.VK_F12);
MYROBOT.keyRelease(KeyEvent.VK_CONTROL); MYROBOT.keyRelease(KeyEvent.VK_SHIFT);
MYROBOT.keyRelease(KeyEvent.VK_CONTROL);
}
Thread.sleep(200); Thread.sleep(200);
MYROBOT.refreshScoreScreen(); MYROBOT.refreshScoreScreen();
ImageIO.write(MYROBOT.createScoreScreenCapture(),"png",new File("scoreimage.png")); ImageIO.write(MYROBOT.createScoreScreenCapture(),"png",new File("scoreimage.png"));
@ -364,14 +371,14 @@ public class MyRobot{
&& 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+" "+difficulty+": "+data.cool+"/"+data.fine+"/"+data.safe+"/"+data.sad+"/"+data.worst+" "+data.percent+"%");
System.out.println("Results for "+selectedSong.title+" "+difficulty+": "+data.display()); System.out.println("Results for "+selectedSong.title+" "+data.difficulty+": "+data.display());
File songFolder = new File(selectedSong.title+"/"+difficulty); File songFolder = new File(selectedSong.title+"/"+data.difficulty);
if (!songFolder.exists()) { if (!songFolder.exists()) {
songFolder.mkdirs(); songFolder.mkdirs();
} }
File[] songFolderFiles = songFolder.listFiles(); File[] songFolderFiles = songFolder.listFiles();
int playId = songFolderFiles.length; int playId = songFolderFiles.length;
final File playFolder = new File(selectedSong.title+"/"+difficulty+"/"+playId); final File playFolder = new File(selectedSong.title+"/"+data.difficulty+"/"+playId);
playFolder.mkdir(); playFolder.mkdir();
recordedResults=true; recordedResults=true;
lastcool=data.cool; lastcool=data.cool;
@ -383,21 +390,23 @@ public class MyRobot{
lastcombo=data.combo; lastcombo=data.combo;
lastscore=data.score; lastscore=data.score;
lastfail=data.fail; lastfail=data.fail;
File resultImage=new File(playFolder,selectedSong.title+"_"+difficulty+"play_"+data.cool+"_"+data.fine+"_"+data.safe+"_"+data.sad+"_"+data.worst+"_"+data.percent+"" File resultImage=new File(playFolder,selectedSong.title+"_"+data.difficulty+"play_"+data.cool+"_"+data.fine+"_"+data.safe+"_"+data.sad+"_"+data.worst+"_"+data.percent+""
+ "_"+data.combo+"_"+data.score+".png"); + "_"+data.combo+"_"+data.score+".png");
new File("scoreimage.png").renameTo(resultImage); new File("scoreimage.png").renameTo(resultImage);
results.add(new Result(selectedSong.title,difficulty,data.cool,data.fine,data.safe,data.sad,data.worst,data.percent,data.mod,data.combo,data.score,data.fail,resultImage)); results.add(new Result(selectedSong.title,data.difficulty,data.cool,data.fine,data.safe,data.sad,data.worst,data.percent,data.mod,data.combo,data.score,data.fail,resultImage));
SoundUtils.playSound("collect_item.wav"); SoundUtils.playSound("collect_item.wav");
//gotoxy(800,64); //gotoxy(800,64);
//click(); //click();
MYROBOT.setAutoDelay(0); MYROBOT.setAutoDelay(0);
MYROBOT.keyPress(KeyEvent.VK_CONTROL); if (NEWSONGS.length==0) {
MYROBOT.keyPress(KeyEvent.VK_SHIFT); MYROBOT.keyPress(KeyEvent.VK_CONTROL);
MYROBOT.keyPress(KeyEvent.VK_F11); MYROBOT.keyPress(KeyEvent.VK_SHIFT);
MYROBOT.keyRelease(KeyEvent.VK_F11); MYROBOT.keyPress(KeyEvent.VK_F11);
MYROBOT.keyRelease(KeyEvent.VK_SHIFT); MYROBOT.keyRelease(KeyEvent.VK_F11);
MYROBOT.keyRelease(KeyEvent.VK_CONTROL); MYROBOT.keyRelease(KeyEvent.VK_SHIFT);
MYROBOT.keyRelease(KeyEvent.VK_CONTROL);
}
} }
} catch (IOException|NumberFormatException|IndexOutOfBoundsException e) { } catch (IOException|NumberFormatException|IndexOutOfBoundsException e) {
e.printStackTrace(); e.printStackTrace();
@ -508,12 +517,23 @@ public class MyRobot{
/*ImageIO.write(MYROBOT.createScreenCapture(new Rectangle(31,230,40,40)),"png",new File("color1.png")); /*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(31,196,40,40)),"png",new File("color2.png"));
ImageIO.write(MYROBOT.createScreenCapture(new Rectangle(483,256,40,40)),"png",new File("color3.png"));*/ ImageIO.write(MYROBOT.createScreenCapture(new Rectangle(483,256,40,40)),"png",new File("color3.png"));*/
Color c1 = new Color(MYROBOT.createScreenCapture(new Rectangle(31,230,40,40)).getRGB(0, 0)); if (!FUTURETONE) {
Color c2 = new Color(MYROBOT.createScreenCapture(new Rectangle(31,196,40,40)).getRGB(0, 0)); Color c1 = new Color(MYROBOT.createScreenCapture(new Rectangle(31,230,40,40)).getRGB(0, 0));
Color c3 = new Color(MYROBOT.createScreenCapture(new Rectangle(483,256,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;
} else {
Color ft_pixel1 = new Color(MYROBOT.createScreenCapture(new Rectangle(260, 38,1,1)).getRGB(0, 0));
Color ft_pixel2 = new Color(MYROBOT.createScreenCapture(new Rectangle(86, 38,1,1)).getRGB(0, 0));
return (ft_pixel1.getRed()<60&&ft_pixel1.getRed()>0&&
ft_pixel1.getGreen()<90&&ft_pixel1.getGreen()>30&&
ft_pixel1.getBlue()<90&&ft_pixel1.getBlue()>30
&&ft_pixel2.getRed()<60&&ft_pixel2.getRed()>0&&
ft_pixel2.getGreen()<90&&ft_pixel2.getGreen()>30&&
ft_pixel2.getBlue()<90&&ft_pixel2.getBlue()>30);
}
//System.out.println(c1+"/"+c2+"/"+c3); //System.out.println(c1+"/"+c2+"/"+c3);
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;
} }
public static boolean IsResultsScreenshot(BufferedImage img) throws IOException { public static boolean IsResultsScreenshot(BufferedImage img) throws IOException {
@ -530,33 +550,65 @@ public class MyRobot{
} }
private void GetCurrentDifficulty() { private void GetCurrentDifficulty() {
Color c = new Color(MYROBOT.createScreenCapture(new Rectangle(320,274,10,10)).getRGB(0, 0)); if (FUTURETONE) {
//return c.getRed()==43 && c.getGreen()==88 && c.getBlue()==213; Color c = new Color(MYROBOT.createScreenCapture(new Rectangle(334,267,10,10)).getRGB(0, 0));
if (c.getRed()>100 && c.getRed()<200 && c.getBlue()>200 && c.getBlue()<255 && c.getGreen()<50) { //return c.getRed()==43 && c.getGreen()==88 && c.getBlue()==213;
difficulty="EXEX"; if (c.getRed()>30 && c.getRed()<140 && c.getBlue()>80 && c.getBlue()<160 && c.getGreen()<40) {
} else difficulty="EXEX";
if (c.getRed()>150 && c.getRed()<255 && c.getBlue()<50 && c.getGreen()<50) { } else
difficulty="EX"; if (c.getRed()>50 && c.getRed()<160 && c.getBlue()<40 && c.getGreen()<40) {
} else difficulty="EX";
if (c.getRed()>175 && c.getRed()<225 && c.getBlue()<50 && c.getGreen()<175 && c.getGreen()>135) { } else
difficulty="H"; if (c.getRed()>90 && c.getRed()<160 && c.getBlue()<40 && c.getGreen()>30 && c.getGreen()<120) {
} else difficulty="H";
if (c.getRed()>0 && c.getRed()<50 && c.getBlue()<50 && c.getGreen()<255 && c.getGreen()>190) { } else
difficulty="N"; if (c.getRed()<40 && c.getBlue()<70 && c.getGreen()<140 && c.getGreen()>60) {
} else difficulty="N";
if (c.getRed()>0 && c.getRed()<50 && c.getBlue()>170 && c.getBlue()<230 && c.getGreen()<190 && c.getGreen()>150) { } else
difficulty="E"; if (c.getRed()<40 && c.getBlue()>70 && c.getBlue()<140 && c.getGreen()<100 && c.getGreen()>20) {
difficulty="E";
}
} else {
Color c = new Color(MYROBOT.createScreenCapture(new Rectangle(320,274,10,10)).getRGB(0, 0));
//return c.getRed()==43 && c.getGreen()==88 && c.getBlue()==213;
if (c.getRed()>100 && c.getRed()<200 && c.getBlue()>200 && c.getBlue()<255 && c.getGreen()<50) {
difficulty="EXEX";
} else
if (c.getRed()>150 && c.getRed()<255 && c.getBlue()<50 && c.getGreen()<50) {
difficulty="EX";
} else
if (c.getRed()>175 && c.getRed()<225 && c.getBlue()<50 && c.getGreen()<175 && c.getGreen()>135) {
difficulty="H";
} else
if (c.getRed()>0 && c.getRed()<50 && c.getBlue()<50 && c.getGreen()<255 && c.getGreen()>190) {
difficulty="N";
} else
if (c.getRed()>0 && c.getRed()<50 && c.getBlue()>170 && c.getBlue()<230 && c.getGreen()<190 && c.getGreen()>150) {
difficulty="E";
}
} }
} }
private void GetCurrentSong() throws IOException { private void GetCurrentSong() throws IOException {
BufferedImage img = ImageUtils.toCompatibleImage(MYROBOT.createScreenCapture(new Rectangle(630,80,580,380)));
BufferedImage img=null;
long r=0,g=0,b=0; long r=0,g=0,b=0;
int count=0; if (!FUTURETONE) {
for (int i=0;i<580;i++) { img = ImageUtils.toCompatibleImage(MYROBOT.createScreenCapture(new Rectangle(630,80,580,380)));
for (int j=0;j<380;j++) { for (int i=0;i<580;i++) {
r+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2); for (int j=0;j<380;j++) {
g+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2); r+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2);
b+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2); g+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2);
b+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2);
}
}
} else {
img = ImageUtils.toCompatibleImage(MYROBOT.createScreenCapture(new Rectangle(610,214,600,246)));
for (int i=0;i<600;i++) {
for (int j=0;j<246;j++) {
r+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2);
g+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2);
b+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2);
}
} }
} }
selectedSong = SongData.compareData(r,g,b); selectedSong = SongData.compareData(r,g,b);
@ -610,21 +662,32 @@ public class MyRobot{
e2.printStackTrace(); e2.printStackTrace();
} }
BufferedImage img = null; BufferedImage img = null;
long totalr=0;
long totalg=0;
long totalb=0;
try { try {
ImageIO.write(img=MYROBOT.createScreenCapture(new Rectangle(630,80,580,380)),"png",new File("test.png")); if (FUTURETONE) {
ImageIO.write(img=MYROBOT.createScreenCapture(new Rectangle(610,214,600,246)),"png",new File("test.png"));
for (int i=0;i<600;i++) {
for (int j=0;j<246;j++) {
totalr+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2);
totalg+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2);
totalb+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2);
}
}
} else {
ImageIO.write(img=MYROBOT.createScreenCapture(new Rectangle(630,80,580,380)),"png",new File("test.png"));
for (int i=0;i<580;i++) {
for (int j=0;j<380;j++) {
totalr+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2);
totalg+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2);
totalb+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2);
}
}
}
} catch (IOException e1) { } catch (IOException e1) {
e1.printStackTrace(); e1.printStackTrace();
} }
long totalr=0;
long totalg=0;
long totalb=0;
for (int i=0;i<580;i++) {
for (int j=0;j<380;j++) {
totalr+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2);
totalg+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2);
totalb+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2);
}
}
try { try {
SongData.saveSongToFile(NEWSONGS[currentSong],totalr,totalg,totalb); SongData.saveSongToFile(NEWSONGS[currentSong],totalr,totalg,totalb);
} catch (IOException e2) { } catch (IOException e2) {
@ -794,6 +857,8 @@ public class MyRobot{
RunTest("scoreimage325.png",201,34,8,9,17,38.86f,"EXEX","HS",69,293062,true,Mode.FUTURETONE); RunTest("scoreimage325.png",201,34,8,9,17,38.86f,"EXEX","HS",69,293062,true,Mode.FUTURETONE);
RunTest("scoreimage340.png",449,35,0,0,2,100.94f,"EX","HS",202,648571,false,Mode.FUTURETONE); RunTest("scoreimage340.png",449,35,0,0,2,100.94f,"EX","HS",202,648571,false,Mode.FUTURETONE);
RunTest("scoreimage342.png",392,41,0,0,0,102.14f,"EXEX","HS",433,713988,false,Mode.FUTURETONE); RunTest("scoreimage342.png",392,41,0,0,0,102.14f,"EXEX","HS",433,713988,false,Mode.FUTURETONE);
RunTest("test40.png",221,117,7,1,8,78.00f,"H","HS",111,253033,false,Mode.FUTURETONE);
RunTest("test41.png",329,108,3,0,17,80.10f,"EX","HS",113,419386,false,Mode.FUTURETONE);
} }
static void RunTest(String _img,int _cool,int _fine, int _safe, int _sad, int _worst, float _percent,String _difficulty,String _mod,int _combo,int _score,boolean _fail, Mode _mode) throws IOException { static void RunTest(String _img,int _cool,int _fine, int _safe, int _sad, int _worst, float _percent,String _difficulty,String _mod,int _combo,int _score,boolean _fail, Mode _mode) throws IOException {
@ -859,20 +924,32 @@ public class MyRobot{
onSongSelect = (c.getRed()>=15 && c.getRed()<=45 && c.getGreen()>=75 && c.getGreen()<=90 && c.getBlue()>=200 && c.getBlue()<=230); onSongSelect = (c.getRed()>=15 && c.getRed()<=45 && c.getGreen()>=75 && c.getGreen()<=90 && c.getBlue()>=200 && c.getBlue()<=230);
if (onSongSelect) { if (onSongSelect) {
stillOnSongSelect++;
FUTURETONE=false; FUTURETONE=false;
if (LASTMODE_FUTURETONE) {
System.out.println("Switching to Megamix");
SongData.loadSongsFromFile();
LASTMODE_FUTURETONE=false;
}
} else } else
{ {
//TODO FUTURE TONE SUPPORT DISABLED FOR NOW. c = new Color(MYROBOT.createScreenCapture(new Rectangle(743,173,1,1)).getRGB(0, 0));
// c = new Color(MYROBOT.createScreenCapture(new Rectangle(743,173,1,1)).getRGB(0, 0)); if (!onSongSelect&&(c.getRed()>=160&&c.getRed()<=200&&c.getGreen()<=15&&c.getBlue()>=170&&c.getBlue()<=200)) {
// if (!onSongSelect&&(c.getRed()>=160&&c.getRed()<=185&&c.getGreen()<=15&&c.getBlue()>=170&&c.getBlue()<=200)) { stillOnSongSelect++;
// FUTURETONE=true; FUTURETONE=true;
// onSongSelect=true; onSongSelect=true;
// } if (!LASTMODE_FUTURETONE) {
System.out.println("Switching to Future Tone");
SongData.loadSongsFromFile();
LASTMODE_FUTURETONE=true;
}
} else {
stillOnSongSelect=0;
}
} }
//777,179 FUTURE TONE //777,179 FUTURE TONE
return onSongSelect; return stillOnSongSelect>=5;
} }
public static boolean isOnSongSelect() { public static boolean isOnSongSelect() {

@ -145,20 +145,31 @@ public class ReloadSong extends JPanel implements ItemListener,MouseListener{
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
BufferedImage img = null; BufferedImage img = null;
try {
ImageIO.write(img=MyRobot.MYROBOT.createScreenCapture(new Rectangle(630,80,580,380)),"png",new File("test.png"));
} catch (IOException e1) {
e1.printStackTrace();
}
long totalr=0; long totalr=0;
long totalg=0; long totalg=0;
long totalb=0; long totalb=0;
for (int i=0;i<580;i++) { try {
for (int j=0;j<380;j++) { if (MyRobot.FUTURETONE) {
totalr+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2); ImageIO.write(img=MyRobot.MYROBOT.createScreenCapture(new Rectangle(610,214,600,246)),"png",new File("test.png"));
totalg+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2); for (int i=0;i<600;i++) {
totalb+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2); for (int j=0;j<246;j++) {
} totalr+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2);
totalg+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2);
totalb+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2);
}
}
} else {
ImageIO.write(img=MyRobot.MYROBOT.createScreenCapture(new Rectangle(630,80,580,380)),"png",new File("test.png"));
for (int i=0;i<580;i++) {
for (int j=0;j<380;j++) {
totalr+=Math.pow(new Color(img.getRGB(i,j),true).getRed(),2);
totalg+=Math.pow(new Color(img.getRGB(i,j),true).getGreen(),2);
totalb+=Math.pow(new Color(img.getRGB(i,j),true).getBlue(),2);
}
}
}
} catch (IOException e1) {
e1.printStackTrace();
} }
try { try {
SongData.saveSongToFile(((SongInfo)songs.getSelectedItem()).name,totalr,totalg,totalb); SongData.saveSongToFile(((SongInfo)songs.getSelectedItem()).name,totalr,totalg,totalb);

@ -56,7 +56,7 @@ public class Result {
return new StringBuilder(Integer.toString(cool)).append(",").append(fine) return new StringBuilder(Integer.toString(cool)).append(",").append(fine)
.append(",").append(safe).append(",").append(sad).append(",").append(worst).append(",").append(percent).append("f") .append(",").append(safe).append(",").append(sad).append(",").append(worst).append(",").append(percent).append("f")
.append(",\"").append(difficulty).append("\",\"").append(mod).append("\",").append(combo).append(",").append(score).append(",") .append(",\"").append(difficulty).append("\",\"").append(mod).append("\",").append(combo).append(",").append(score).append(",")
.append(Boolean.toString(fail).toLowerCase()) .append(Boolean.toString(fail).toLowerCase()).append(",").append(mode)
.toString(); .toString();
} }
public String toString() { public String toString() {

@ -55,7 +55,12 @@ public class SongData {
sb.append(r).append(",") sb.append(r).append(",")
.append(g).append(",") .append(g).append(",")
.append(b); .append(b);
String[] fileData = FileUtils.readFromFile("colorData"); String[] fileData=null;
if (MyRobot.FUTURETONE) {
fileData=FileUtils.readFromFile("FTcolorData");
} else {
fileData=FileUtils.readFromFile("colorData");
}
for (int i=0;i<fileData.length;i++) { for (int i=0;i<fileData.length;i++) {
String[] split = fileData[i].split(":"); String[] split = fileData[i].split(":");
if (split.length>0) { if (split.length>0) {
@ -69,15 +74,28 @@ public class SongData {
} }
} }
if (!found) { if (!found) {
FileUtils.logToFile(sb.toString(),"colorData"); if (MyRobot.FUTURETONE) {
FileUtils.logToFile(sb.toString(),"FTcolorData");
} else {
FileUtils.logToFile(sb.toString(),"colorData");
}
System.out.println("Appended color data with new data for "+title+"!"); System.out.println("Appended color data with new data for "+title+"!");
} else { } else {
FileUtils.writetoFile(fileData, "colorData",false); if (MyRobot.FUTURETONE) {
FileUtils.writetoFile(fileData, "FTcolorData",false);
} else {
FileUtils.writetoFile(fileData, "colorData",false);
}
System.out.println("Updated color data with new data for "+title+"!"); System.out.println("Updated color data with new data for "+title+"!");
} }
} }
public static void loadSongsFromFile() throws IOException { public static void loadSongsFromFile() throws IOException {
String[] data = FileUtils.readFromFile("colorData"); String[] data = null;
if (MyRobot.FUTURETONE) {
data=FileUtils.readFromFile("FTcolorData");
} else {
data=FileUtils.readFromFile("colorData");
}
MyRobot.SONGS = new SongData[data.length]; MyRobot.SONGS = new SongData[data.length];
for (int i=0;i<data.length;i++) { for (int i=0;i<data.length;i++) {
SongData sd = ParseSong(data[i]); SongData sd = ParseSong(data[i]);

@ -60,7 +60,7 @@ public class TypeFace2 {
final static Rectangle FUTURETONE_RECT_SEARCH_SAFE=new Rectangle(872+XOFFSET,292,100+XOFFSET+1,22+8); final static Rectangle FUTURETONE_RECT_SEARCH_SAFE=new Rectangle(872+XOFFSET,292,100+XOFFSET+1,22+8);
final static Rectangle FUTURETONE_RECT_SEARCH_SAD=new Rectangle(872+XOFFSET,328,100+XOFFSET+1,22+8); final static Rectangle FUTURETONE_RECT_SEARCH_SAD=new Rectangle(872+XOFFSET,328,100+XOFFSET+1,22+8);
final static Rectangle FUTURETONE_RECT_SEARCH_WORST=new Rectangle(872+XOFFSET,365,100+XOFFSET+1,22+8); final static Rectangle FUTURETONE_RECT_SEARCH_WORST=new Rectangle(872+XOFFSET,365,100+XOFFSET+1,22+8);
final static Rectangle FUTURETONE_RECT_SEARCH_PCT=new Rectangle(1174+XOFFSET,150,1115,8); final static Rectangle FUTURETONE_RECT_SEARCH_PCT=new Rectangle(1174+XOFFSET,150,1125,8);
final static Rectangle FUTURETONE_RECT_SEARCH_PCT2=new Rectangle(1114+XOFFSET,150,1045,8); final static Rectangle FUTURETONE_RECT_SEARCH_PCT2=new Rectangle(1114+XOFFSET,150,1045,8);
final static Rectangle FUTURETONE_RECT_SEARCH_SCORE=new Rectangle(866+XOFFSET,543-4,250+XOFFSET+1,32+14); final static Rectangle FUTURETONE_RECT_SEARCH_SCORE=new Rectangle(866+XOFFSET,543-4,250+XOFFSET+1,32+14);
final static Rectangle FUTURETONE_RECT_SEARCH_COMBO=new Rectangle(1023+XOFFSET,402-2,100+XOFFSET+1,22+8); final static Rectangle FUTURETONE_RECT_SEARCH_COMBO=new Rectangle(1023+XOFFSET,402-2,100+XOFFSET+1,22+8);
@ -215,8 +215,8 @@ public class TypeFace2 {
} }
private Mode getMode(BufferedImage img2) { private Mode getMode(BufferedImage img2) {
Color ft_pixel1 = new Color(img2.getRGB(260, 39)); Color ft_pixel1 = new Color(img2.getRGB(260, 38));
Color ft_pixel2 = new Color(img2.getRGB(86, 39)); Color ft_pixel2 = new Color(img2.getRGB(86, 38));
if (ft_pixel1.getRed()<60&&ft_pixel1.getRed()>0&& if (ft_pixel1.getRed()<60&&ft_pixel1.getRed()>0&&
ft_pixel1.getGreen()<90&&ft_pixel1.getGreen()>30&& ft_pixel1.getGreen()<90&&ft_pixel1.getGreen()>30&&
ft_pixel1.getBlue()<90&&ft_pixel1.getBlue()>30 ft_pixel1.getBlue()<90&&ft_pixel1.getBlue()>30

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 KiB

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Loading…
Cancel
Save