Skip to content

Commit

Permalink
Implement ReplayManager::StopRecording
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Nov 4, 2024
1 parent 1900220 commit f6b21ba
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/implemented.csv
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ th06::ReplayManager::OnDraw
th06::ReplayManager::AddedCallback
th06::ReplayManager::AddedCallbackDemo
th06::ReplayManager::DeletedCallback
th06::ReplayManager::StopRecording
th06::Player::AddedCallback
th06::Player::DeletedCallback
th06::Player::RegisterChain
Expand Down
1 change: 0 additions & 1 deletion config/stubbed.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ th06::ResultScreen::RegisterChain
th06::ResultScreen::ReleaseScoreDat
th06::ScreenEffect::RegisterChain
th06::MainMenu::SelectRelated
th06::ReplayManager::StopRecording
th06::ReplayManager::SaveReplay
th06::ScreenEffect::DrawSquare
th06::TextHelper::ReleaseTextBuffer
Expand Down
16 changes: 16 additions & 0 deletions src/ReplayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,20 @@ ZunResult ReplayManager::DeletedCallback(ReplayManager *mgr)
g_ReplayManager = NULL;
return ZUN_SUCCESS;
}

void ReplayManager::StopRecording()
{
ReplayManager *mgr = g_ReplayManager;
if (mgr != NULL)
{
mgr->replayInputs += 1;
mgr->replayInputs->frameNum = mgr->frameId;
mgr->replayInputs->inputKey = 0;
mgr->replayInputs += 1;
mgr->replayInputs->frameNum = 9999999;
mgr->replayInputs->inputKey = 0;
mgr->replayInputStageBookmarks[g_GameManager.currentStage - 1] = mgr->replayInputs + 1;
}
}

}; // namespace th06

0 comments on commit f6b21ba

Please sign in to comment.