这篇教程C++ CryWarning函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CryWarning函数的典型用法代码示例。如果您正苦于以下问题:C++ CryWarning函数的具体用法?C++ CryWarning怎么用?C++ CryWarning使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CryWarning函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CRY_ASSERTbool CProceduralClipFactory::Register( const char* const typeName, const SProceduralClipFactoryRegistrationInfo& registrationInfo ){ CRY_ASSERT( typeName ); CRY_ASSERT( registrationInfo.pProceduralClipCreator != NULL ); CRY_ASSERT( registrationInfo.pProceduralParamsCreator != NULL ); const THash typeNameHash( typeName ); const char* const registeredTypeNameForHash = FindTypeName( typeNameHash ); const bool alreadyRegistered = ( registeredTypeNameForHash != NULL ); if ( alreadyRegistered ) { const bool namesMatch = ( strcmp( typeName, registeredTypeNameForHash ) == 0 ); if ( namesMatch ) { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "CProceduralClipFactory::Register: Register called more than once for type with name '%s'.", typeName ); } else { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "CProceduralClipFactory::Register: Trying to register type with name '%s' and hash '%u', but hash collides with already registered type with name '%s'. Choose a different name for the type.", typeName, typeNameHash.ToUInt32(), registeredTypeNameForHash ); // TODO: FatalError? } CRY_ASSERT( false ); return false; }#if defined(_DEBUG) CryLogAlways( "CProceduralClipFactory: Registering procedural clip with name '%s'.", typeName );#endif m_typeHashToName[ typeNameHash ] = string( typeName ); m_typeHashToRegistrationInfo[ typeNameHash ] = registrationInfo; return true;}
开发者ID:aronarts,项目名称:FireNET,代码行数:35,
示例2: CryWarning//------------------------------------------------------------------------------------------------------------------------bool CCustomEventManager::UnregisterEventListener( ICustomEventListener* pListener, const TCustomEventId eventId ){ TCustomEventsMap::iterator eventsDataIter = m_customEventsData.find( eventId ); if (eventsDataIter != m_customEventsData.end()) { SCustomEventData & eventData = eventsDataIter->second; TCustomEventListeners &listeners = eventData.m_listeners; if (listeners.Contains( pListener )) { listeners.Remove( pListener ); return true; } else { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "CCustomEventManager::UnregisterEventListener: Listener isn't registered for event id: %u", eventId ); } } else { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "CCustomEventManager::UnregisterEventListener: No event data exists for event id: %u", eventId ); } return false;}
开发者ID:joewan,项目名称:pycmake,代码行数:26,
示例3: CryWarningfloat CWorldState::GetFloat(const char * entityName, char * valueName){// CryLog("CWorldState::GetFloat()"); float result = 0.f; if(worldStateXml) { XmlNodeRef entityNode = worldStateXml->findChild(entityName); if(entityNode) { const uint32 Count = entityNode->getChildCount(); for (uint32 Index = 0; Index < Count; ++Index) { const XmlNodeRef currentNode = entityNode->getChild(Index); if(strcmp(currentNode->getTag(),valueName)==0) { currentNode->getAttr("value",result); break; } } } else CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "CWorldState::Failed to get world state value!"); } else CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "CWorldState::Failed to get world state value!"); return result;}
开发者ID:aronarts,项目名称:FireNET,代码行数:31,
示例4: CryWarningvoid CEditorGame::InitDialogBuffersEnum( IGameToEditorInterface* pGTE ){ static const char* BUFFERS_FILENAME = "Libs/FlowNodes/DialogFlowNodeBuffers.xml"; XmlNodeRef xmlNodeRoot = gEnv->pSystem->LoadXmlFromFile( BUFFERS_FILENAME ); if (xmlNodeRoot==NULL) { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "CEditorGame::InitDialogBuffersEnum() - Failed to load '%s'. flownode dialog buffers drop down list will be empty.", BUFFERS_FILENAME); return; } uint32 count = xmlNodeRoot->getChildCount(); const char** bufferNames = new const char*[count]; bool bOk = true; for (uint32 i=0; i<count; ++i) { XmlNodeRef xmlNode = xmlNodeRoot->getChild( i ); bufferNames[i] = xmlNode->getAttr("name"); if (!bufferNames[i]) { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "CEditorGame::InitDialogBuffersEnum() - file: '%s' child: %d is missing the 'name' field. flownode dialog buffers drop down list will be empty", BUFFERS_FILENAME, i); bOk = false; } } if (bOk) pGTE->SetUIEnums("dialogBuffers", bufferNames, count); delete[] bufferNames;}
开发者ID:aronarts,项目名称:FireNET,代码行数:30,
示例5: ResetAllTests/// Force running of the defined test case (ignores dependencies)void CFeatureTestMgr::ForceRun(const char* testNameFilter){ if (!IsRunning()) { // Ensure no other tests run apart from the selected one ResetAllTests(eFTS_Disabled); size_t firstTestIndex = ~0; for (TFeatureTestVec::iterator iter(m_featureTests.begin()); iter != m_featureTests.end(); ++iter) { FeatureTestState& ftState = *iter; const char* testName = ftState.m_pTest->Name(); // If test name contains the filter string if (strstr(testName, testNameFilter) != NULL) { ftState.m_state = eFTS_Scheduled; CryLogAlways("Scheduling test: %s", testName); // Store the first valid test found as the one to run first if (firstTestIndex == ~0) firstTestIndex = std::distance(m_featureTests.begin(), iter); } } if (firstTestIndex != ~0) { FeatureTestState& ftState = m_featureTests[firstTestIndex]; ftState.m_state = eFTS_Running; m_runningTestIndex = firstTestIndex; m_pRunningTest = ftState.m_pTest; m_running = true; CryLogAlways("Forcefully running Map Tests: %s", m_pRunningTest->Name()); const float currTime = gEnv->pTimer->GetCurrTime(); // If test doesn't start if (!m_pRunningTest->Start()) { // Reset state m_running = false; ResetAllTests(eFTS_Disabled); } } else { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "Unable to find test(s) to run: %s", testNameFilter); } } else { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Tests are already running, can't start: %s", testNameFilter); }}
开发者ID:AiYong,项目名称:CryGame,代码行数:59,
示例6: GetISystem/// Runs all registered tests (if they meet their dependencies)void CFeatureTestMgr::RunAll(){ // Writing the list of the active registered tests. // This can be useful to later check, when a crash occurs, // which tests were executed and which are skipped // (We will have no valid results for them) { if(m_pAutoTester && !m_testManifestWritten) { XmlNodeRef testManifest = GetISystem()->CreateXmlNode("testManifest"); testManifest->setTag("testmanifest"); CryLogAlways("About to dump out the testmanifest xml..."); for (TFeatureTestVec::iterator iter(m_featureTests.begin()); iter != m_featureTests.end(); ++iter) { FeatureTestState& fTest = *iter; XmlNodeRef testDescrNode = fTest.m_pTest->XmlDescription(); if(testDescrNode) { testManifest->addChild(testDescrNode); } } m_pAutoTester->WriteTestManifest(testManifest); m_testManifestWritten = true; } } if (!IsRunning()) { // Ensure all tests are cleaned up and scheduled to run ResetAllTests(eFTS_Scheduled); if (StartNextTest() || WaitingForScheduledTests()) { CryLog("Running all map feature tests..."); } else { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "No tests available to run!"); } } else { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Tests are already running, can't start more until tests are complete."); }}
开发者ID:danielasun,项目名称:dbho-GameSDK,代码行数:52,
示例7: CryWarningbool CCheckpointSystem::SaveExternalEntity(EntityId id){ //this function allows external logic (flowgraph) to save specific entities if(!CHECKPOINT_SAVE_XML_NODE) { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Tried writing external entity %i while savegame was not open.", (int)id); return false; } //find entity and access external section IEntity *pEntity = gEnv->pEntitySystem->GetEntity(id); if(pEntity) { XmlNodeRef externalEntities = CHECKPOINT_SAVE_XML_NODE->findChild(EXTERNAL_ENTITIES_SECTION); if(!externalEntities) { externalEntities = GetISystem()->CreateXmlNode(EXTERNAL_ENTITIES_SECTION); CHECKPOINT_SAVE_XML_NODE->addChild(externalEntities); } IActor *pActor = CCryAction::GetCryAction()->GetIActorSystem()->GetActor(pEntity->GetId()); if(pActor) { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "The actor %s is additionally saved as external entity.", pEntity->GetName()); } //create entity data char entityId[16]; _snprintf(entityId, sizeof(entityId), "%s%i", "id", id); XmlNodeRef nextEntity = GetISystem()->CreateXmlNode(entityId); if(nextEntity) { nextEntity->setAttr("id", pEntity->GetId()); nextEntity->setAttr("name", pEntity->GetName()); //save active / hidden nextEntity->setAttr("active", pEntity->IsActive()); nextEntity->setAttr("hidden", pEntity->IsHidden()); //save translation and rotation (complete tm matrix for simplicity) SerializeWorldTM(pEntity, nextEntity, true); //add new entity to checkpoint externalEntities->addChild(nextEntity); return true; } return false; } return false;}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:50,
示例8: GetISystemvoid CGameQueryListener::ConnectToServer(const char* server){ //first check the version of the server ... char myVersion[32]; GetISystem()->GetProductVersion().ToShortString(myVersion); string version(myVersion); SGameServer* targetServer = FindServer(server); if(!targetServer) { CryWarning(VALIDATOR_MODULE_NETWORK, VALIDATOR_WARNING, "Selected server not found in list!"); return; } if(version.compare(targetServer->GetServerGameVersion()) != 0) { CryWarning(VALIDATOR_MODULE_NETWORK, VALIDATOR_WARNING, "Game versions differ - not connecting!"); return; } string addr(server); string port; int pos = addr.find(":"); if(pos != string::npos) //space for port { port = addr.substr(pos+1, addr.size()-pos); addr.erase(pos, addr.size()-pos); } IConsole* pConsole = gEnv->pConsole; pConsole->GetCVar("cl_serveraddr")->Set(addr.c_str()); if(port.size() > 0) pConsole->GetCVar("cl_serverport")->Set(port.c_str()); string tempHost = pConsole->GetCVar("cl_serveraddr")->GetString(); SGameStartParams params; //this would connect to a server params.flags = eGSF_Client; params.hostname = tempHost.c_str(); params.pContextParams = NULL; params.port = pConsole->GetCVar("cl_serverport")->GetIVal(); CCryAction *action = (CCryAction*) (gEnv->pGame->GetIGameFramework()); if(action) { gEnv->pConsole->ExecuteString("net_lanbrowser 0"); action->StartGameContext(¶ms); }}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:50,
示例9: ProcessEvent virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo ) { switch (event) { case eFE_Initialize: break; case eFE_Activate: { if(!IsPortActive(pActInfo, EIP_Load)) return; // get the file name string pathAndfileName; const string fileName = GetPortString(pActInfo, EIP_FileName); if (fileName.empty()) return; ILevelInfo* pCurrentLevel = gEnv->pGame->GetIGameFramework()->GetILevelSystem()->GetCurrentLevel(); string path = pCurrentLevel ? pCurrentLevel->GetPath() : ""; pathAndfileName.Format("%s/%s", path.c_str(), fileName.c_str()); // try to load it XmlNodeRef root = GetISystem()->LoadXmlFromFile( pathAndfileName ); if (root == NULL) { CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "FlowGraph: TimeOfDay Loading Node: Could not load tod file %s. Aborting.", pathAndfileName.c_str()); ActivateOutput(pActInfo, EOP_Fail, true); return; } // get the TimeofDay interface ITimeOfDay *pTimeOfDay = gEnv->p3DEngine->GetTimeOfDay(); if (pTimeOfDay == NULL) { CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "FlowGraph: TimeOfDay Loading Node: Could not obtain ITimeOfDay interface from engine. Aborting."); ActivateOutput(pActInfo, EOP_Fail, true); return; } // try to serialize from that file pTimeOfDay->Serialize( root,true ); pTimeOfDay->Update(true, true); ActivateOutput(pActInfo, EOP_Success, true); } break; } }
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:48,
示例10: ProcessEvent virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo ) { switch (event) { case eFE_Initialize: break; case eFE_Activate: IGameFramework* const pGameFramework = gEnv->pGame->GetIGameFramework(); IGameObject* const pGameObject = pGameFramework->GetGameObject(pActInfo->pEntity->GetId()); if(IsPortActive(pActInfo, EIP_Enslave) || IsPortActive(pActInfo, EIP_UnEnslave) ) { IAnimatedCharacter* const pAnimChar = pGameObject ? (IAnimatedCharacter*) pGameObject->QueryExtension("AnimatedCharacter") : NULL; if(pAnimChar && pAnimChar->GetActionController()) { const EntityId slaveChar = GetPortEntityId(pActInfo, EIP_Slave); IGameObject* pSlaveGameObject = pGameFramework->GetGameObject(slaveChar); IAnimatedCharacter* pSlaveAnimChar = pSlaveGameObject ? (IAnimatedCharacter*) pSlaveGameObject->QueryExtension("AnimatedCharacter") : NULL; if(pSlaveAnimChar && pSlaveAnimChar->GetActionController()) { IAnimationDatabaseManager &dbManager = gEnv->pGame->GetIGameFramework()->GetMannequinInterface().GetAnimationDatabaseManager(); uint32 db_crc32 = CCrc32::ComputeLowercase(GetPortString(pActInfo, EIP_DB)); const IAnimationDatabase* db = dbManager .FindDatabase(db_crc32); const string& scopeContextName = GetPortString(pActInfo, EIP_ScopeContext); const string& requestedScopeContext = scopeContextName.empty() ? "SlaveChar" : scopeContextName; const TagID scopeContext = pAnimChar->GetActionController()->GetContext().controllerDef.m_scopeContexts.Find(scopeContextName.c_str()); pAnimChar->GetActionController()->SetSlaveController(*pSlaveAnimChar->GetActionController(), scopeContext, IsPortActive(pActInfo, EIP_Enslave) ? true : false, db); ActivateOutput(pActInfo, EOP_Success, 1 ); } else { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "No GameObject or Animated character found for the slave"); ActivateOutput(pActInfo, EOP_Fail, 1 ); } } else { CryWarning( VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "No GameObject or AnimatedCharacter found"); ActivateOutput(pActInfo, EOP_Fail, 1 ); } } break; } }
开发者ID:aronarts,项目名称:FireNET,代码行数:48,
示例11: CRY_ASSERTbool CFlowGraphDebugger::RemoveAllBreakpointsForNode(IFlowGraphPtr pFlowgraph, TFlowNodeId nodeID){ CRY_ASSERT(nodeID != InvalidFlowNodeId); if (nodeID == InvalidFlowNodeId) return false; TDebugInfo::iterator iterDebugInfo = m_DebugInfo.find(pFlowgraph); if (iterDebugInfo != m_DebugInfo.end()) { TFlowNodesDebugInfo* flownodesDebugInfo = &(*iterDebugInfo).second; TFlowNodesDebugInfo::iterator iterNode = flownodesDebugInfo->find(nodeID); if (iterNode != flownodesDebugInfo->end()) { flownodesDebugInfo->erase(iterNode); for (CListenerSet<IFlowGraphDebugListener*>::Notifier notifier(m_Listeners); notifier.IsValid(); notifier.Next()) { notifier->OnAllBreakpointsRemovedForNode(pFlowgraph, nodeID); } return true; } } else { CryWarning(VALIDATOR_MODULE_FLOWGRAPH, VALIDATOR_WARNING, "Flownode %d is not in debug list [CFlowgraphDebugger::RemoveBreakPointsForNode]", nodeID); return false; } return false;}
开发者ID:aronarts,项目名称:FireNET,代码行数:33,
示例12: switchvoid CFlowNode_AISequenceAction_WeaponHolster::HandleSequenceEvent(AIActionSequence::SequenceEvent sequenceEvent){ switch(sequenceEvent) { case AIActionSequence::StartAction: { CRY_ASSERT_MESSAGE(m_actInfo.pEntity, "entity has magically gone"); if (!m_actInfo.pEntity) { // the entity has gone for some reason, at least make sure the action gets finished properly and the FG continues CancelSequenceAndActivateOutputPort(OutputPort_Done); return; } assert(gEnv && gEnv->pGame && gEnv->pGame->GetIGameFramework() && gEnv->pGame->GetIGameFramework()->GetIActorSystem()); IActor* pActor = gEnv->pGame->GetIGameFramework()->GetIActorSystem()->GetActor(m_actInfo.pEntity->GetId()); if (!pActor) { CRY_ASSERT_MESSAGE(0, "Provided entity must be an IActor"); CryWarning(VALIDATOR_MODULE_AI, VALIDATOR_WARNING, "Provided entity %s must be an IActor", m_actInfo.pEntity->GetName()); CancelSequenceAndActivateOutputPort(OutputPort_Done); return; } const bool skipHolsterAnimation = GetPortBool(&m_actInfo, InputPort_SkipHolsterAnimation); pActor->HolsterItem(true, !skipHolsterAnimation); FinishSequenceActionAndActivateOutputPort(OutputPort_Done); } break; }}
开发者ID:danielasun,项目名称:dbho-GameSDK,代码行数:31,
示例13: CryWarningbool CWriter::FinishWritingFile(){ // if this happens, most likely is an overflow of some of the hard coded limits ( which usually is caused by an error in game side ). if (m_hasInternalError) CryWarning( VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, "XMLCPB: ERROR in binary save generation. The savegame is corrupted." ); if (!m_compressor->m_errorWritingIntoFile) { if (!m_rootAddr.IsValid()) Done(); assert( m_rootAddr.IsValid() ); m_mainBuffer.WriteToFile(); // this actually writes only the last data remains, because it has been writing all along the process. m_tableTags.WriteToFile(); m_tableAttrNames.WriteToFile(); m_tableStrData.WriteToFile(); m_tableAttrSets.WriteToFile(); CreateFileHeader(m_compressor->GetFileHeader()); m_compressor->FlushZLibBuffer(); } return !m_compressor->m_errorWritingIntoFile;}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:28,
示例14: Donebool CWriter::WriteAllIntoMemory( uint8* &rpData, uint32& outSize ){ if (!m_rootAddr.IsValid()) Done(); SFileHeader fileHeader; CreateFileHeader(fileHeader); outSize = sizeof(fileHeader); outSize += m_tableTags.GetDataSize(); outSize += m_tableAttrNames.GetDataSize(); outSize += m_tableStrData.GetDataSize(); outSize += m_tableAttrSets.GetDataSize(); outSize += m_mainBuffer.GetDataSize(); if (outSize > 0) { rpData = (uint8*)realloc((void*)rpData, outSize*sizeof(uint8)); uint32 uWriteLoc = 0; WriteDataIntoMemory( rpData, &fileHeader, sizeof(fileHeader), uWriteLoc); m_mainBuffer.WriteToMemory( rpData, uWriteLoc ); m_tableTags.WriteToMemory( rpData, uWriteLoc ); m_tableAttrNames.WriteToMemory( rpData, uWriteLoc ); m_tableStrData.WriteToMemory( rpData, uWriteLoc ); m_tableAttrSets.WriteToMemory( rpData, uWriteLoc ); } if (m_hasInternalError) CryWarning( VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, "XMLCPB: ERROR in binary save-into-memory generation. (probably something wrong in a pooled entity). The data will be corrupted" ); return (outSize > 0);}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:33,
示例15: GetISystemvoid CProfileOptions::Init(){ XmlNodeRef root = GetISystem()->LoadXmlFromFile("libs/config/profiles/default/attributes.xml"); if(!root) { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Failed loading attributes.xml"); return; } CGameXmlParamReader reader(root); const int childCount = reader.GetUnfilteredChildCount(); m_allOptions.reserve(childCount); for (int i = 0; i < childCount; ++i) { XmlNodeRef node = reader.GetFilteredChildAt(i); if(node) { AddOption(node); } } IPlayerProfileManager* const profileManager = g_pGame->GetIGameFramework()->GetIPlayerProfileManager(); CRY_ASSERT_MESSAGE(profileManager != NULL, "IPlayerProfileManager doesn't exist - profile options will not be updated"); if(profileManager) profileManager->AddListener(this, false);}
开发者ID:aronarts,项目名称:FireNET,代码行数:28,
示例16: OnHUDEvent virtual void OnHUDEvent(const SHUDEvent& event) { int eventID = GetPortInt(&m_pActInfo, 0); if(event.eventType == eventID) { ActivateOutput(&m_pActInfo, eOP_EventFired, 1); for(unsigned int i = 0; i < event.GetDataSize(); i++) { switch(event.GetData(i).m_type) { case SHUDEventData::eSEDT_voidptr: break; case SHUDEventData::eSEDT_bool: break; case SHUDEventData::eSEDT_int: break; case SHUDEventData::eSEDT_float: { if(eventID == eHUDEvent_LeavingBattleArea) { float fDeathTimer = event.GetData(i).GetFloat(); ActivateOutput(&m_pActInfo, eOP_DeathTimer, fDeathTimer); } } break; case SHUDEventData::eSEDT_undef: default: CryWarning(VALIDATOR_MODULE_FLOWGRAPH, VALIDATOR_WARNING, "[CFlowNode_BattleAreaListener] HudEvent data unknown."); break; } } } }
开发者ID:aronarts,项目名称:FireNET,代码行数:33,
示例17: TSerializevoid CGameTokenSystem::SerializeSaveLevelToLevel( const char** ppGameTokensList, uint32 numTokensToSave ){ { ScopedSwitchToGlobalHeap globalHeap; m_levelToLevelSave = gEnv->pSystem->CreateXmlNode( "GameTokensLevelToLevel" ); } IXmlSerializer* pSerializer = gEnv->pSystem->GetXmlUtils()->CreateXmlSerializer(); ISerialize* pSer = pSerializer->GetWriter(m_levelToLevelSave); TSerialize ser = TSerialize(pSer); { ScopedSwitchToGlobalHeap globalHeap; uint32 numTokensSaved = 0; for (uint32 i=0; i<numTokensToSave; ++i) { const char* pName = ppGameTokensList[i]; CGameToken* pToken = GetToken( pName ); if (pToken) { numTokensSaved++; ser.BeginGroup("Token"); ser.Value( "name",pToken->m_name ); pToken->m_value.Serialize(ser); ser.EndGroup(); } else CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "GameTokenSystem. GameToken %s was not found when trying to serialize (save) level to level", pName ? pName : "<NULL>"); } ser.Value( "numTokens", numTokensSaved ); } pSerializer->Release();}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:33,
示例18: StopAnimationOnLayerbool CActionScope::InstallAnimation(const SAnimationEntry &animEntry, int layer, const SAnimBlend &animBlend){ if (animEntry.animRef.IsEmpty()) { StopAnimationOnLayer(layer, animBlend.duration); return true; } else { int animID = m_scopeContext.charInst->GetIAnimationSet()->GetAnimIDByCRC(animEntry.animRef.crc); if (animID >= 0) { //--- Cleared for install, install across scopes CryCharAnimationParams animParams; InitAnimationParams(animEntry, layer, animBlend, animParams); return InstallAnimation(animID, animParams); } else { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Invalid anim ref %s on scope %s in database %s", animEntry.animRef.GetString(), m_name.c_str(), m_scopeContext.database->GetFilename()); StopAnimationOnLayer(layer, animBlend.duration); return false; } }}
开发者ID:souxiaosou,项目名称:FireNET,代码行数:27,
示例19: xmlHeadervoid CCheckpointSystem::WriteXML(XmlNodeRef data, const char *fileName){ IPlayerProfileManager *pPlayerProfMan = CCryAction::GetCryAction()->GetIPlayerProfileManager();; string path; if(!pPlayerProfMan) { path = CONSOLE_SAVEGAME_DIRECTORY; } else { const char* sharedSaveGameFolder = pPlayerProfMan->GetSharedSaveGameFolder(); path = sharedSaveGameFolder; } path = PathUtil::AddSlash(path); path.append(fileName); if(data) { //write checkpoint data to xml file with given name const string xmlHeader("<?xml version=/"1.0/" encoding=/"utf-8/"?>/n"); bool bSuccess = data->saveToFile(path.c_str(), 32767/2, NULL); if (bSuccess) { //remember last saved checkpoint for "quickload" g_lastSavedCheckpoint = fileName; } else CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "Failed writing checkpoint file at %s", path.c_str()); }}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:32,
示例20: whilevoid CEditorGame::InitActionMapsEnums(IGameToEditorInterface* pGTE){ IActionMapManager* pAM = m_pGame->GetIGameFramework()->GetIActionMapManager(); IActionMapIteratorPtr iter = pAM->CreateActionMapIterator(); const int numActionMaps = pAM->GetActionMapsCount(); if(numActionMaps == 0) return; const char** nameValueStrings = new const char*[numActionMaps]; int curEntryIndex = 0; while (IActionMap* pMap = iter->Next()) { assert(curEntryIndex < numActionMaps); PREFAST_ASSUME(curEntryIndex < numActionMaps); nameValueStrings[curEntryIndex++] = pMap->GetName(); if (curEntryIndex > numActionMaps) { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "[InitActionMapsEnums] Wrong number of Action Maps."); break; } } pGTE->SetUIEnums("action_maps", nameValueStrings, numActionMaps); delete[] nameValueStrings;}
开发者ID:aronarts,项目名称:FireNET,代码行数:29,
示例21: CryWarningvoid CDLCManager::OnDLCMountFailed(IPlatformOS::EDLCMountFail reason){ CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Unable to load DLC, error code: %d", reason); const char* sWarning = NULL; switch (reason) { case IPlatformOS::eDMF_FileCorrupt: sWarning = "DLCFileCorrupt"; break; case IPlatformOS::eDMF_DiskCorrupt: sWarning = "DLCDiskCorrupt"; break; case IPlatformOS::eDMF_XmlError: sWarning = "DLCXmlError"; break; } if (sWarning) { RequestDLCWarning(sWarning, 4, true); } else { CRY_ASSERT_MESSAGE(false, "Unrecognised DLC error"); }}
开发者ID:aronarts,项目名称:FireNET,代码行数:25,
示例22: LoadGamebool CCheckpointSystem::LoadLastCheckpoint(){ if(!g_lastSavedCheckpoint.empty()) return LoadGame(g_lastSavedCheckpoint.c_str()); CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Can't load latest checkpoint : no recent checkpoint found!"); return false;}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:7,
示例23: CryWarning// Console commandsvoid CFeatureTestMgr::CmdMapRunAll(IConsoleCmdArgs *pArgs){#if ENABLE_FEATURE_TESTER CFeatureTester* pFTester = CFeatureTester::GetInstance(); bool reloadLevel = false; bool quickload = false; int argCount = pArgs->GetArgCount(); for (int argIndex = 0; argIndex < argCount; ++argIndex) { const char* arg = pArgs->GetArg(argIndex); if (!stricmp("reloadlevel", arg)) { reloadLevel = true; } if (!stricmp("quickload", arg)) { quickload = true; } } if (pFTester) pFTester->GetMapFeatureTestMgr().ScheduleRunAll(reloadLevel, quickload, 0.0f);#else CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_ERROR, "Feature testing not enabled in this build.");#endif}
开发者ID:AiYong,项目名称:CryGame,代码行数:29,
示例24: ProcessEvent virtual void ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo) { switch (event) { case eFE_Initialize: { break; } case eFE_Activate: { const string& variableName = GetPortString(pActInfo, eIn_VariableName); if (variableName.empty()) { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "CAction:DRS_SetVariable: Cannot be executed without a Variable Name."); break; } const string& collectionName = GetPortString(pActInfo, eIn_VariableCollectionName); EntityId entityID = GetPortEntityId(pActInfo, eIn_EntityID); DRS::IVariableCollection* variableCollection = GetVariableCollection(entityID, collectionName); if (variableCollection) { const string& newVariableValue = GetPortString(pActInfo, eIn_StringValue); variableCollection->SetVariableValue(variableName, newVariableValue.c_str(), true, GetPortFloat(pActInfo, eIn_ResetTime)); ActivateOutput(pActInfo, eOut_VariableCollectionName, variableCollection->GetName().GetText()); } break; } } }
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:34,
示例25: StopAnimationOnLayerbool CActionScope::InstallAnimation(const SAnimationEntry &animEntry, int layer, const SAnimBlend &animBlend){ if ((BIT(layer) & m_mutedAnimLayerMask) == BIT(layer)) { return false; } if (animEntry.animRef.IsEmpty()) { StopAnimationOnLayer(layer, animBlend.duration); return true; } else { int animID = m_scopeContext.pCharInst->GetIAnimationSet()->GetAnimIDByCRC(animEntry.animRef.crc); if (animID >= 0) { //--- Cleared for install, install across scopes CryCharAnimationParams animParams; InitAnimationParams(animEntry, layer, animBlend, animParams); return InstallAnimation(animID, animParams); } else { CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Invalid anim ref '%s' on scope '%s' in database '%s'. Skeleton '%s'", animEntry.animRef.c_str(), m_name.c_str(), m_scopeContext.pDatabase->GetFilename(), m_scopeContext.pCharInst->GetIDefaultSkeleton().GetModelFilePath()); StopAnimationOnLayer(layer, animBlend.duration); return false; } }}
开发者ID:joewan,项目名称:pycmake,代码行数:32,
注:本文中的CryWarning函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CryptAcquireContext函数代码示例 C++ CryLogAlways函数代码示例 |