Skip to content

Commit b847c35

Browse files
committed
Update additional modes to use new vector lib
1 parent 299ae09 commit b847c35

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

contrib/DarkSouls.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
DarkSouls::DarkSouls(socd::SocdType socdType, state::InputState &rInputState,
1212
CommunicationBackend *communicationBackend)
1313
: ControllerMode(socdType, rInputState, communicationBackend) {
14-
mSocdPairs = {
15-
socd::SocdPair{&rInputState.left, &rInputState.right},
16-
socd::SocdPair{&rInputState.down, &rInputState.mod_x},
17-
socd::SocdPair{&rInputState.c_left, &rInputState.c_right},
18-
socd::SocdPair{&rInputState.c_down, &rInputState.c_up},
19-
};
14+
mSocdPairs.push_back(socd::SocdPair{&rInputState.left, &rInputState.right});
15+
mSocdPairs.push_back(socd::SocdPair{&rInputState.down, &rInputState.mod_x});
16+
mSocdPairs.push_back(
17+
socd::SocdPair{&rInputState.c_left, &rInputState.c_right});
18+
mSocdPairs.push_back(socd::SocdPair{&rInputState.c_down, &rInputState.c_up});
2019
}
2120

2221
void DarkSouls::UpdateDigitalOutputs() {

contrib/RocketLeague.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ RocketLeague::RocketLeague(socd::SocdType socdType,
1212
state::InputState &rInputState,
1313
CommunicationBackend *communicationBackend)
1414
: ControllerMode(socdType, rInputState, communicationBackend) {
15-
mSocdPairs = {
16-
socd::SocdPair{&rInputState.left, &rInputState.right},
17-
socd::SocdPair{&rInputState.down, &rInputState.mod_x},
18-
socd::SocdPair{&rInputState.c_left, &rInputState.c_right},
19-
socd::SocdPair{&rInputState.c_down, &rInputState.c_up},
20-
};
15+
mSocdPairs.push_back(socd::SocdPair{&rInputState.left, &rInputState.right});
16+
mSocdPairs.push_back(socd::SocdPair{&rInputState.down, &rInputState.mod_x});
17+
mSocdPairs.push_back(
18+
socd::SocdPair{&rInputState.c_left, &rInputState.c_right});
19+
mSocdPairs.push_back(socd::SocdPair{&rInputState.c_down, &rInputState.c_up});
2120
}
2221

2322
void RocketLeague::HandleSocd() {

contrib/ToughLoveArena.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
ToughLoveArena::ToughLoveArena(socd::SocdType socdType,
55
state::InputState &rInputState)
66
: KeyboardMode(socdType, rInputState) {
7-
mSocdPairs = {
8-
socd::SocdPair{&rInputState.left, &rInputState.right},
9-
};
7+
mSocdPairs.push_back(socd::SocdPair{&rInputState.left, &rInputState.right});
108
}
119

1210
void ToughLoveArena::SendKeys() {

0 commit comments

Comments
 (0)