|
128 | 128 | #include "NintendoSwitch/Inference/NintendoSwitch_StartGameUserSelectDetector.h" |
129 | 129 | #include "NintendoSwitch/Inference/NintendoSwitch_UpdatePopupDetector.h" |
130 | 130 | #include "NintendoSwitch/Programs/DateSpam/NintendoSwitch_RollDateForward1.h" |
| 131 | +#include "NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManip_US.h" |
| 132 | +#include "NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManip_24h.h" |
131 | 133 |
|
132 | 134 | #include <QPixmap> |
133 | 135 | #include <QVideoFrame> |
@@ -324,10 +326,64 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope& |
324 | 326 | ProControllerContext context(scope, console.pro_controller()); |
325 | 327 | VideoOverlaySet overlays(overlay); |
326 | 328 |
|
327 | | -// console.state().set_console_type(CONSOLE_MODEL); |
| 329 | +#if 0 |
| 330 | + DateReader reader; |
| 331 | + reader.make_overlays(overlays); |
| 332 | + auto date = reader.read_date(logger, feed.snapshot()); |
328 | 333 |
|
| 334 | + cout << "date format = " << (int)date.first << endl; |
| 335 | +// cout << "date = " << (int)date.second << endl; |
| 336 | +#endif |
329 | 337 |
|
330 | | - rollback_hours_from_home(console, context, 3, 500ms); |
| 338 | + |
| 339 | + |
| 340 | +#if 0 |
| 341 | +// DateReader_Switch2_US reader(COLOR_RED); |
| 342 | + DateReader_Switch2_JP reader(COLOR_RED); |
| 343 | + reader.make_overlays(overlays); |
| 344 | + DateTime date = reader.read_date(logger, feed.snapshot()); |
| 345 | + |
| 346 | + cout << "Month = " << (int)date.month << endl; |
| 347 | + cout << "Day = " << (int)date.day << endl; |
| 348 | + cout << "Year = " << (int)date.year << endl; |
| 349 | + cout << "Hour = " << (int)date.hour << endl; |
| 350 | + cout << "Minute = " << (int)date.minute << endl; |
| 351 | +#endif |
| 352 | + |
| 353 | + |
| 354 | +#if 0 |
| 355 | + DateChangeDetector_Switch2 detector(COLOR_RED); |
| 356 | + detector.make_overlays(overlays); |
| 357 | + cout << detector.detect(feed.snapshot()) << endl; |
| 358 | +#endif |
| 359 | + |
| 360 | + |
| 361 | +#if 1 |
| 362 | + DateReader reader(console); |
| 363 | + reader.make_overlays(overlays); |
| 364 | + DateTime date = reader.read_date(logger, feed.snapshot()).second; |
| 365 | + |
| 366 | + cout << "Month = " << (int)date.month << endl; |
| 367 | + cout << "Day = " << (int)date.day << endl; |
| 368 | + cout << "Year = " << (int)date.year << endl; |
| 369 | + cout << "Hour = " << (int)date.hour << endl; |
| 370 | + cout << "Minute = " << (int)date.minute << endl; |
| 371 | + |
| 372 | + while (true){ |
| 373 | + reader.set_date(env.program_info(), console, context, DATE0); |
| 374 | + for (int c = 0; c < 7; c++){ |
| 375 | + ssf_issue_scroll_ptv(context, DPAD_LEFT); |
| 376 | + } |
| 377 | + reader.set_date(env.program_info(), console, context, DATE1); |
| 378 | + for (int c = 0; c < 7; c++){ |
| 379 | + ssf_issue_scroll_ptv(context, DPAD_LEFT); |
| 380 | + } |
| 381 | + } |
| 382 | +#endif |
| 383 | + |
| 384 | + |
| 385 | + |
| 386 | +// rollback_hours_from_home(console, context, 3, 500ms); |
331 | 387 |
|
332 | 388 |
|
333 | 389 |
|
@@ -894,22 +950,6 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope& |
894 | 950 | reader.read(logger, env.inference_dispatcher(), feed.snapshot()); |
895 | 951 | #endif |
896 | 952 |
|
897 | | -#if 0 |
898 | | - DateReader reader; |
899 | | - reader.make_overlays(overlays); |
900 | | - DateTime date = reader.read_date(logger, feed.snapshot()).second; |
901 | | - |
902 | | - cout << "Month = " << (int)date.month << endl; |
903 | | - cout << "Day = " << (int)date.day << endl; |
904 | | - cout << "Year = " << (int)date.year << endl; |
905 | | - cout << "Hour = " << (int)date.hour << endl; |
906 | | - cout << "Minute = " << (int)date.minute << endl; |
907 | | - |
908 | | - while (true){ |
909 | | - reader.set_date(env.program_info(), console, context, DATE0); |
910 | | - reader.set_date(env.program_info(), console, context, DATE1); |
911 | | - } |
912 | | -#endif |
913 | 953 |
|
914 | 954 | // SinglesAIOption battle_AI; |
915 | 955 | // run_singles_battle(env, console, context, battle_AI, false); |
|
0 commit comments