本文整理汇总了C++中PLAYBACK::init方法的典型用法代码示例。如果您正苦于以下问题:C++ PLAYBACK::init方法的具体用法?C++ PLAYBACK::init怎么用?C++ PLAYBACK::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PLAYBACK
的用法示例。
在下文中一共展示了PLAYBACK::init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: enterTASEditor
// returns true if Taseditor is engaged at the end of the function
bool enterTASEditor()
{
if (taseditorWindow.hwndTASEditor)
{
// TAS Editor is already engaged, just set focus to its window
if (!taseditorConfig.windowIsMaximized)
ShowWindow(taseditorWindow.hwndTASEditor, SW_SHOWNORMAL);
SetForegroundWindow(taseditorWindow.hwndTASEditor);
return true;
} else if (FCEU_IsValidUI(FCEUI_TASEDITOR))
{
// start TAS Editor
// create window
taseditorWindow.init();
if (taseditorWindow.hwndTASEditor)
{
enableGeneralKeyboardInput();
// save "eoptions"
saved_eoptions = eoptions;
// set "Run in background"
eoptions |= EO_BGRUN;
// "Set high-priority thread"
eoptions |= EO_HIGHPRIO;
DoPriority();
// switch off autosaves
saved_EnableAutosave = EnableAutosave;
EnableAutosave = 0;
// switch on frame_display
saved_frame_display = frame_display;
frame_display = 1;
UpdateCheckedMenuItems();
// init modules
editor.init();
pianoRoll.init();
selection.init();
splicer.init();
playback.init();
greenzone.init();
recorder.init();
markersManager.init();
project.init();
bookmarks.init();
branches.init();
popupDisplay.init();
history.init();
taseditor_lua.init();
// either start new movie or use current movie
if (!FCEUMOV_Mode(MOVIEMODE_RECORD|MOVIEMODE_PLAY) || currMovieData.savestate.size() != 0)
{
if (currMovieData.savestate.size() != 0)
FCEUD_PrintError("This version of TAS Editor doesn't work with movies starting from savestate.");
// create new movie
FCEUI_StopMovie();
movieMode = MOVIEMODE_TASEDITOR;
FCEUMOV_CreateCleanMovie();
playback.restartPlaybackFromZeroGround();
} else
{
// use current movie to create a new project
FCEUI_StopMovie();
movieMode = MOVIEMODE_TASEDITOR;
}
// if movie length is less or equal to currFrame, pad it with empty frames
if (((int)currMovieData.records.size() - 1) < currFrameCounter)
currMovieData.insertEmpty(-1, currFrameCounter - ((int)currMovieData.records.size() - 1));
// ensure that movie has correct set of ports/fourscore
setInputType(currMovieData, getInputType(currMovieData));
// force the input configuration stored in the movie to apply to FCEUX config
applyMovieInputConfig();
// reset some modules that need MovieData info
pianoRoll.reset();
recorder.reset();
// create initial snapshot in history
history.reset();
// reset Taseditor variables
mustCallManualLuaFunction = false;
SetFocus(history.hwndHistoryList); // set focus only once, to show blue selection cursor
SetFocus(pianoRoll.hwndList);
FCEU_DispMessage("TAS Editor engaged", 0);
taseditorWindow.redraw();
return true;
} else
{
// couldn't init window
return false;
}
} else
{
// right now TAS Editor launch is not allowed by emulator
return true;
}
}