Skip to content

Commit c9269bb

Browse files
committed
Fix the remaining date spam sequences.
1 parent c59e8f4 commit c9269bb

14 files changed

+1281
-422
lines changed

SerialPrograms/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,13 @@ file(GLOB MAIN_SOURCES
990990
Source/NintendoSwitch/Options/TurboMacroTable.h
991991
Source/NintendoSwitch/Options/UI/NintendoSwitch_FriendCodeListWidget.cpp
992992
Source/NintendoSwitch/Options/UI/NintendoSwitch_FriendCodeListWidget.h
993+
Source/NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManip_24h.cpp
994+
Source/NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManip_24h.h
995+
Source/NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManip_US.cpp
996+
Source/NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManip_US.h
997+
Source/NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManipBase.h
998+
Source/NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManipTools.cpp
999+
Source/NintendoSwitch/Programs/DateManip/NintendoSwitch_DateManipTools.h
9931000
Source/NintendoSwitch/Programs/DateSpam/NintendoSwitch_HomeToDateTime.cpp
9941001
Source/NintendoSwitch/Programs/DateSpam/NintendoSwitch_HomeToDateTime.h
9951002
Source/NintendoSwitch/Programs/DateSpam/NintendoSwitch_NeutralDateSkip.cpp

SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramSwitch.cpp

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@
128128
#include "NintendoSwitch/Inference/NintendoSwitch_StartGameUserSelectDetector.h"
129129
#include "NintendoSwitch/Inference/NintendoSwitch_UpdatePopupDetector.h"
130130
#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"
131133

132134
#include <QPixmap>
133135
#include <QVideoFrame>
@@ -324,10 +326,64 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
324326
ProControllerContext context(scope, console.pro_controller());
325327
VideoOverlaySet overlays(overlay);
326328

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());
328333

334+
cout << "date format = " << (int)date.first << endl;
335+
// cout << "date = " << (int)date.second << endl;
336+
#endif
329337

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);
331387

332388

333389

@@ -894,22 +950,6 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
894950
reader.read(logger, env.inference_dispatcher(), feed.snapshot());
895951
#endif
896952

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
913953

914954
// SinglesAIOption battle_AI;
915955
// run_singles_battle(env, console, context, battle_AI, false);

0 commit comments

Comments
 (0)