/* ==================== MsgCreateSystem ==================== */ int CParticleEngine::MsgCreateSystem( const char *pszName, int iSize, void *pbuf ) { BEGIN_READ(pbuf, iSize); vec3_t pos; pos.x = READ_COORD(); pos.y = READ_COORD(); pos.z = READ_COORD(); vec3_t ang; ang.x = READ_COORD(); ang.y = READ_COORD(); ang.z = READ_COORD(); int iType = READ_BYTE(); char *szPath = READ_STRING(); int iId = READ_SHORT(); if(iType == 2) RemoveSystem(iId); else if(iType == 1) CreateCluster(szPath, pos, ang, iId); else CreateSystem(szPath, pos, ang, iId); return 1; }
Core::~Core(void) { _lDynamicLibrary::iterator it_DynamicLibrary; for (it_DynamicLibrary = m_lDynamicLibrary.begin(); it_DynamicLibrary != m_lDynamicLibrary.end(); ++it_DynamicLibrary) { UnLoadModule(it_DynamicLibrary->first); } m_lDynamicLibrary.clear(); _lSystemsByType::iterator it_Systems = m_lSystems.begin(); while (it_Systems != m_lSystems.end()) { ISystem* sys_ptr = it_Systems->second; RemoveSystem(sys_ptr); delete sys_ptr; it_Systems = m_lSystems.begin(); } DrawLine("~Core: Çàâåðøåíèå ðàáîòû!"); mLogger->close(); }
void RemoveSystem( const void * pOwner, const std::string & name ) { char buffer[20]; RemoveSystem( std::string(_ltoa(reinterpret_cast<long>(pOwner),buffer,10)) + name); }
TEST_F(SystemTests,RemoveSystem){ RemoveSystem(); }
void Scene::Update(float timeElapsed) { TIME_PROFILE("Scene::Update"); uint64 time = SystemTimer::Instance()->AbsoluteMS(); bool needShowStaticOcclusion = RenderManager::Instance()->GetOptions()->IsOptionEnabled(RenderOptions::DEBUG_DRAW_STATIC_OCCLUSION); if (needShowStaticOcclusion&&!staticOcclusionDebugDrawSystem) { staticOcclusionDebugDrawSystem = new StaticOcclusionDebugDrawSystem(this); AddSystem(staticOcclusionDebugDrawSystem, (1 << Component::STATIC_OCCLUSION_COMPONENT), false, renderUpdateSystem); }else if (!needShowStaticOcclusion&&staticOcclusionDebugDrawSystem) { RemoveSystem(staticOcclusionDebugDrawSystem); SafeDelete(staticOcclusionDebugDrawSystem); } uint32 size = (uint32)systemsToProcess.size(); for (uint32 k = 0; k < size; ++k) { SceneSystem * system = systemsToProcess[k]; if((systemsMask & SCENE_SYSTEM_UPDATEBLE_FLAG) && system == transformSystem) { updatableSystem->UpdatePreTransform(timeElapsed); transformSystem->Process(timeElapsed); updatableSystem->UpdatePostTransform(timeElapsed); } else if(system == lodSystem) { if(RenderManager::Instance()->GetOptions()->IsOptionEnabled(RenderOptions::UPDATE_LODS)) { lodSystem->Process(timeElapsed); } } else { system->Process(timeElapsed); } } // int32 size; // // size = (int32)animations.size(); // for (int32 animationIndex = 0; animationIndex < size; ++animationIndex) // { // SceneNodeAnimationList * anim = animations[animationIndex]; // anim->Update(timeElapsed); // } // // if(RenderManager::Instance()->GetOptions()->IsOptionEnabled(RenderOptions::UPDATE_ANIMATED_MESHES)) // { // size = (int32)animatedMeshes.size(); // for (int32 animatedMeshIndex = 0; animatedMeshIndex < size; ++animatedMeshIndex) // { // AnimatedMesh * mesh = animatedMeshes[animatedMeshIndex]; // mesh->Update(timeElapsed); // } // } //if(imposterManager) //{ // imposterManager->Update(timeElapsed); //} updateTime = SystemTimer::Instance()->AbsoluteMS() - time; }
void RemoveSystem( const void * pOwner, const char* name ) { char buffer[256]; LTSNPrintF(buffer, LTARRAYSIZE(buffer), "%d%s", reinterpret_cast<long>(pOwner), name); RemoveSystem(buffer); }