bool GameApp::Setup() { //OGRE日志; Ogre::LogManager* logMgr = new Ogre::LogManager(); m_pLog = Ogre::LogManager::getSingleton().createLog("OgreLogfile.log", true, true, false); m_pLog->setDebugOutputEnabled(true); m_pRoot = new Ogre::Root("plugins_d.cfg"); //配置; if (!Configure()) return false; //设置资源加载; SetupResources(); //场景管理器的初始化; SceneMgrInit(); //输入输出初始化; OISInit(); //GUI管理器的初始化; GUIInit(); //状态管理器的初始化; StateInit(); m_pTimer = new Ogre::Timer(); m_pTimer->reset(); m_pRenderWnd->setActive(true); return true; }
State* InitVisualizeState(State* newState, State* parentState) { newState = StateInit(newState, parentState, OnEnterVisualizeState, OnExitVisualizeState, OnVisualizeLoop); if (newState) { } return newState; }
/** * * Do the test step. * Each test step must supply an implementation for DoTestStepL. * * @return TVerdict: The result of the test step. * */ TVerdict CTestMmfOggAudioRecorderBase::DoTestStepL() { iTestStepResult = EFail; // Initialise the state variables StateInit(); TRAPD(err,FsmL(EOggIdleAudioRecorder, CMdaAudioClipUtility::ENotReady)); // Call to open the audio file if(err == KErrNone) { CActiveScheduler::Start(); // ActiveScheduler started ONLY once if (iError == KErrNone) { iTestStepResult = EPass; } } return iTestStepResult; }
/************************************************************** * Function name : ReInitSystem * Purpose : Redo StateInit() * Arguments : Received from Skadi functions * Returns : None. *************************************************************/ void ReInitSystem(sSkadi_t *skadi, sSkadiArgs_t args) { StateInit(); }
/************************************************************** * Function name : ReInitSystem * Purpose : Redo StateInit() * Arguments : Received from Skadi functions * Returns : None. *************************************************************/ void ReInitSystem(sSkadi_t *skadi, sSkadiArgs_t args) { StateInit(); pStateMast = &StateInit; }
// Hmm...we should make a second one of these state->in_local = 0; } // We've accepted a connection for proxying... // Establish a connection to server specified in conf // and set up events to relay traffic in both directions. void proxy_accept_cb(struct evconnlistener *listener, evutil_socket_t fd, __attribute__((unused)) struct sockaddr *address, __attribute__((unused)) int socklen, struct telex_conf *conf) { LogTrace("proxy", "ACCEPT"); // Init connection state struct telex_state *state = StateInit(conf); state->base = evconnlistener_get_base(listener); state->local = bufferevent_socket_new(state->base, fd, BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS); if (!state->local) { LogError(state->name, "Could not create local bufferevent socket"); StateCleanup(&state); return; } _inc(BEV); make_new_telex_conn(state); } /*