Skip to content

Commit

Permalink
Remove manual BPM Adjustments in Gameplay
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Dec 17, 2019
1 parent f00203f commit f328290
Showing 1 changed file with 0 additions and 55 deletions.
55 changes: 0 additions & 55 deletions src/Etterna/Screen/Others/ScreenSyncOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ ScreenSyncOverlay::Input(const InputEventPlus& input)
enum Action
{
RevertSyncChanges,
ChangeSongBPM,
ChangeGlobalOffset,
ChangeSongOffset,
Action_Invalid
Expand All @@ -189,16 +188,6 @@ ScreenSyncOverlay::Input(const InputEventPlus& input)
case KEY_F4:
a = RevertSyncChanges;
break;
case KEY_F9:
bIncrease = false; /* fall through */
case KEY_F10:
if (!INPUTFILTER->IsBeingPressed(
DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL)) &&
!INPUTFILTER->IsBeingPressed(
DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL)))
return Screen::Input(input);
a = ChangeSongBPM;
break;
case KEY_F11:
bIncrease = false; /* fall through */
case KEY_F12:
Expand Down Expand Up @@ -235,50 +224,6 @@ ScreenSyncOverlay::Input(const InputEventPlus& input)
SCREENMAN->SystemMessage(SYNC_CHANGES_REVERTED);
AdjustSync::RevertSyncChanges();
break;
case ChangeSongBPM: {
float fDelta = bIncrease ? +0.02f : -0.02f;
if (INPUTFILTER->IsBeingPressed(
DeviceInput(DEVICE_KEYBOARD, KEY_RALT)) ||
INPUTFILTER->IsBeingPressed(
DeviceInput(DEVICE_KEYBOARD, KEY_LALT))) {
fDelta /= 20;
}
switch (input.type) {
case IET_RELEASE:
fDelta *= 0;
break;
case IET_REPEAT: {
if (INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f)
fDelta *= 0;
else
fDelta *= 10;
break;
}
default:
break;
}
if (GAMESTATE->m_pCurSong != NULL) {
TimingData& sTiming = GAMESTATE->m_pCurSong->m_SongTiming;
BPMSegment* seg = sTiming.GetBPMSegmentAtBeat(
GAMESTATE->m_Position.m_fSongBeat);
seg->SetBPS(seg->GetBPS() + fDelta);
const vector<Steps*>& vpSteps =
GAMESTATE->m_pCurSong->GetAllSteps();
FOREACH(Steps*, const_cast<vector<Steps*>&>(vpSteps), s)
{
TimingData& pTiming = (*s)->m_Timing;
// Empty means it inherits song timing,
// which has already been updated.
if (pTiming.empty())
continue;
float second = sTiming.GetElapsedTimeFromBeat(
GAMESTATE->m_Position.m_fSongBeat);
seg = pTiming.GetBPMSegmentAtBeat(
pTiming.GetBeatFromElapsedTime(second));
seg->SetBPS(seg->GetBPS() + fDelta);
}
}
} break;
case ChangeGlobalOffset:
case ChangeSongOffset: {
float fDelta = bIncrease ? +0.02f : -0.02f;
Expand Down

0 comments on commit f328290

Please sign in to comment.