Skip to content

Commit 81f7c16

Browse files
committed
Clear out a bunch more programs for SBB.
1 parent cf113a3 commit 81f7c16

32 files changed

+640
-676
lines changed

Common/Cpp/LifetimeSanitizer.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
#include <Windows.h>
1616
#endif
1717

18-
#ifdef PA_SANITIZER_ENABLE
19-
2018

2119

2220
namespace PokemonAutomation{
2321

2422

23+
#ifdef PA_SANITIZER_ENABLE
24+
2525
//#define PA_SANITIZER_PRINT_ALL
2626
const std::set<std::string> SANITIZER_FILTER = {
2727
// "MultiSwitchProgramSession",
@@ -91,6 +91,9 @@ LifetimeSanitizer::LifetimeSanitizer(const LifetimeSanitizer& x){
9191
internal_construct(x.m_name);
9292
}
9393
void LifetimeSanitizer::operator=(const LifetimeSanitizer& x){
94+
if (LifetimeSanitizer_disabled.load(std::memory_order_relaxed)){
95+
return;
96+
}
9497
check_usage();
9598
x.check_usage();
9699
}
@@ -195,11 +198,11 @@ void LifetimeSanitizer::internal_destruct(){
195198
}
196199
m_self = nullptr;
197200
}
201+
#endif
198202

199203

200204

201205

202206

203207

204-
#endif
205208
}

Common/Cpp/LifetimeSanitizer.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ class LifetimeSanitizer{
8282
#else
8383
class LifetimeSanitizer{
8484
public:
85+
LifetimeSanitizer(const char* = ""){}
86+
8587
void check_usage() const{}
8688
static void disable(){}
8789

88-
using CheckScope = bool;
90+
struct CheckScope{};
8991
CheckScope check_scope() const{
90-
return false;
92+
return CheckScope();
9193
}
9294
};
9395
#endif

SerialPrograms/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,8 +1630,6 @@ file(GLOB MAIN_SOURCES
16301630
Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.h
16311631
Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer2.cpp
16321632
Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer2.h
1633-
Source/PokemonSV/Programs/Farming/PokemonSV_WildItemFarmer.cpp
1634-
Source/PokemonSV/Programs/Farming/PokemonSV_WildItemFarmer.h
16351633
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_ClipboardFastCodeEntry.cpp
16361634
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_ClipboardFastCodeEntry.h
16371635
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_CodeEntry.cpp
@@ -1656,6 +1654,8 @@ file(GLOB MAIN_SOURCES
16561654
Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.h
16571655
Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp
16581656
Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.h
1657+
Source/PokemonSV/Programs/Glitches/PokemonSV_WildItemFarmer.cpp
1658+
Source/PokemonSV/Programs/Glitches/PokemonSV_WildItemFarmer.h
16591659
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_AutoItemPrinter.cpp
16601660
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_AutoItemPrinter.h
16611661
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_ItemPrinterDatabase.cpp

SerialPrograms/SerialPrograms.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,6 @@ SOURCES += \
803803
Source/PokemonSV/Programs/Farming/PokemonSV_MaterialFarmerTools.cpp \
804804
Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.cpp \
805805
Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer2.cpp \
806-
Source/PokemonSV/Programs/Farming/PokemonSV_WildItemFarmer.cpp \
807806
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_ClipboardFastCodeEntry.cpp \
808807
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_CodeEntry.cpp \
809808
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_FastCodeEntry.cpp \
@@ -816,6 +815,7 @@ SOURCES += \
816815
Source/PokemonSV/Programs/General/PokemonSV_StatsResetEventBattle.cpp \
817816
Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp \
818817
Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp \
818+
Source/PokemonSV/Programs/Glitches/PokemonSV_WildItemFarmer.cpp \
819819
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_AutoItemPrinter.cpp \
820820
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_ItemPrinterDatabase.cpp \
821821
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_ItemPrinterRNG.cpp \
@@ -1970,7 +1970,6 @@ HEADERS += \
19701970
Source/PokemonSV/Programs/Farming/PokemonSV_MaterialFarmerTools.h \
19711971
Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.h \
19721972
Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer2.h \
1973-
Source/PokemonSV/Programs/Farming/PokemonSV_WildItemFarmer.h \
19741973
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_ClipboardFastCodeEntry.h \
19751974
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_CodeEntry.h \
19761975
Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_FastCodeEntry.h \
@@ -1983,6 +1982,7 @@ HEADERS += \
19831982
Source/PokemonSV/Programs/General/PokemonSV_StatsResetEventBattle.h \
19841983
Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.h \
19851984
Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.h \
1985+
Source/PokemonSV/Programs/Glitches/PokemonSV_WildItemFarmer.h \
19861986
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_AutoItemPrinter.h \
19871987
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_ItemPrinterDatabase.h \
19881988
Source/PokemonSV/Programs/ItemPrinter/PokemonSV_ItemPrinterRNG.h \

SerialPrograms/Source/CommonFramework/Panels/UI/PanelListWidget.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <QMessageBox>
88
#include "Common/Cpp/Exceptions.h"
99
#include "CommonFramework/PersistentSettings.h"
10+
//#include "CommonFramework/GlobalSettingsPanel.h"
1011
#include "CommonFramework/Panels/PanelInstance.h"
1112
#include "PanelListWidget.h"
1213

SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramSwitch.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,15 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
281281
ProControllerContext context(scope, console.controller());
282282
VideoOverlaySet overlays(overlay);
283283

284+
// std::terminate();
285+
286+
284287

285288
// ssf_issue_scroll(context, DPAD_LEFT, 0);
286289
// ssf_press_button(context, BUTTON_A | BUTTON_L, 3);
287290
// ssf_press_button(context, BUTTON_L, 0);
288291

289-
#if 1
292+
#if 0
290293
codeboard_enter_digits(
291294
logger, context, KeyboardLayout::QWERTY,
292295
"JRH5T9",

SerialPrograms/Source/NintendoSwitch/Framework/NintendoSwitch_MultiSwitchProgramSession.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,15 @@ void MultiSwitchProgramSession::internal_run_program(){
162162
return;
163163
}
164164
AbstractController* controller = session.controller_session().controller();
165-
ProController& switch_controller = *dynamic_cast<ProController*>(controller);
165+
ProController* switch_controller = dynamic_cast<ProController*>(controller);
166+
if (switch_controller == nullptr){
167+
report_error("Cannot Start: The controller is not ready or is incompatible.");
168+
return;
169+
}
166170
handles.emplace_back(
167171
c,
168172
session.logger(),
169-
switch_controller,
173+
*switch_controller,
170174
session.video(),
171175
session.overlay(),
172176
session.audio(),

SerialPrograms/Source/NintendoSwitch/Framework/NintendoSwitch_SingleSwitchProgramSession.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,18 @@ void SingleSwitchProgramSession::internal_run_program(){
124124
);
125125
CancellableHolder<CancellableScope> scope;
126126
AbstractController* controller = m_system.controller_session().controller();
127-
ProController& switch_controller = *dynamic_cast<ProController*>(controller);
127+
ProController* switch_controller = dynamic_cast<ProController*>(controller);
128+
if (switch_controller == nullptr){
129+
report_error("Cannot Start: The controller is not ready or is incompatible.");
130+
return;
131+
}
128132
SingleSwitchProgramEnvironment env(
129133
program_info,
130134
scope,
131135
*this,
132136
current_stats_tracker(), historical_stats_tracker(),
133137
m_system.logger(),
134-
switch_controller,
138+
*switch_controller,
135139
m_system.video(),
136140
m_system.overlay(),
137141
m_system.audio(),

SerialPrograms/Source/NintendoSwitch/Programs/NintendoSwitch_FastCodeEntry.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h"
1313
#include "NintendoSwitch_FastCodeEntry.h"
1414

15-
// REMOVE
16-
#include <iostream>
17-
using std::cout;
18-
using std::endl;
15+
//#include <iostream>
16+
//using std::cout;
17+
//using std::endl;
1918

2019
namespace PokemonAutomation{
2120
namespace NintendoSwitch{

SerialPrograms/Source/PokemonBDSP/Programs/Glitches/PokemonBDSP_ActivateMenuGlitch-1.1.2.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ ActivateMenuGlitch112_Descriptor::ActivateMenuGlitch112_Descriptor()
3131
"<font color=\"red\">(This requires game versions 1.1.0 - 1.1.2. The glitch it relies on was patched in v1.1.3.)</font>",
3232
FeedbackType::REQUIRED,
3333
AllowCommandsWhenRunning::DISABLE_COMMANDS,
34-
{SerialPABotBase::OLD_NINTENDO_SWITCH_DEFAULT_REQUIREMENTS}
34+
{
35+
ControllerFeature::TickPrecise,
36+
ControllerFeature::NintendoSwitch_ProController,
37+
},
38+
FasterIfTickPrecise::NOT_FASTER
3539
)
3640
{}
3741

0 commit comments

Comments
 (0)