當前位置: 首頁>>代碼示例>>C++>>正文


C++ CryLogAlways函數代碼示例

本文整理匯總了C++中CryLogAlways函數的典型用法代碼示例。如果您正苦於以下問題:C++ CryLogAlways函數的具體用法?C++ CryLogAlways怎麽用?C++ CryLogAlways使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CryLogAlways函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: CryLogAlways

rappleAction::rappleAction(IEntity * ee)
{
    if(gEnv->pInput)
        gEnv->pInput->AddEventListener(this);
    auto myCVar = gEnv->pConsole->GetCVar("cl_tpvMaxWeapDistDebug");
    myCVar->Set("1");
    player = ee;
	//cMovement = new CPlayerMovementController((CPlayer*)player);
    flowManager = gEnv->pFlowSystem->GetIModuleManager();
					CryLogAlways("rAction startup");
	ready = false;
}
開發者ID:eBunny,項目名稱:EmberProject,代碼行數:12,代碼來源:rappleAction.cpp

示例2: CryLogAlways

void CEquipmentManager::DumpPack(const SEquipmentPack* pPack) const
{
	CryLogAlways("Pack: '%s' Primary='%s' ItemCount=%" PRISIZE_T " AmmoCount=%" PRISIZE_T "",
		pPack->m_name.c_str(), pPack->m_primaryItem.c_str(), pPack->m_items.size(), pPack->m_ammoCount.size());

	CryLogAlways("   Items:");
	for (std::vector<SEquipmentPack::SEquipmentItem>::const_iterator iter = pPack->m_items.begin();
		iter != pPack->m_items.end(); ++iter)
	{
		CryLogAlways("   '%s' : '%s'", iter->m_name.c_str(), iter->m_type.c_str());

		int numAccessories = iter->m_setup.size();

		for(int i = 0; i < numAccessories; i++)
		{
			CryLogAlways("			Accessory: '%s'", iter->m_setup[i]->GetName());
		}
	}

	CryLogAlways("   Ammo:");
	for (std::map<string, int>::const_iterator iter = pPack->m_ammoCount.begin();
		iter != pPack->m_ammoCount.end(); ++iter)
	{
		CryLogAlways("   '%s'=%d", iter->first.c_str(), iter->second);
	}
}
開發者ID:aronarts,項目名稱:FireNET,代碼行數:26,代碼來源:EquipmentManager.cpp

示例3: ValueDumper

		ValueDumper(TSynchedKey key, const TSynchedValue &value)
		{
			switch(value.GetType())
			{
				case eSVT_Bool:
					CryLogAlways("  %.08d -     bool: %s", key, *value.GetPtr<bool>() ? "true" : "false");
					break;

				case eSVT_Float:
					CryLogAlways("  %.08d -    float: %f", key, *value.GetPtr<float>());
					break;

				case eSVT_Int:
					CryLogAlways("  %.08d -      int: %d", key, *value.GetPtr<int>());
					break;

				case eSVT_EntityId:
					CryLogAlways("  %.08d - entityId: %.08x", key, *value.GetPtr<EntityId>());
					break;

				case eSVT_String:
					CryLogAlways("  %.08d -  string: %s", key, value.GetPtr<string>()->c_str());
					break;

				default:
					CryLogAlways("  %.08d - unknown: %.08x", key, *value.GetPtr<uint32>());
					break;
			}
		}
開發者ID:Oliverreason,項目名稱:bare-minimum-cryengine3,代碼行數:29,代碼來源:SynchedStorage.cpp

示例4: CryLogAlways

//------------------------------------------------------------------------
bool CGameRules::OnDemoteToClient(SHostMigrationInfo &hostMigrationInfo, uint32 &state)
{
	if (!g_pGame->GetIGameFramework()->ShouldMigrateNub(hostMigrationInfo.m_session))
	{
		return true;
	}

	CryLogAlways("[Host Migration]: CGameRules::OnDemoteToClient() started");

	if (m_hostMigrationCachedEntities.empty())
	{
		HostMigrationFindDynamicEntities(m_hostMigrationCachedEntities);
	}
	else
	{
		HostMigrationRemoveDuplicateDynamicEntities();
	}

	CryLogAlways("[Host Migration]: CGameRules::OnDemoteToClient() finished");
	CCCPOINT(HostMigration_OnDemoteToClient);
	return true;
}
開發者ID:richmondx,項目名稱:bare-minimum-cryengine3,代碼行數:23,代碼來源:GameRulesHostMigration.cpp

示例5: CryLogAlways

void CTacticalPointLanguageExtender::Initialize()
{
	CryLogAlways("Registering TPS Extensions...");
	INDENT_LOG_DURING_SCOPE();

	if (gEnv->pAISystem->GetTacticalPointSystem())
	{
		RegisterWithTacticalPointSystem();
		RegisterQueries();

		Script::Call(gEnv->pScriptSystem, "ReloadTPSExtensions");
	}
}
開發者ID:Kufusonic,項目名稱:Work-in-Progress-Sonic-Fangame,代碼行數:13,代碼來源:TacticalPointLanguageExtender.cpp

示例6: CryLogAlways

void CryVR_WiimoteManagerPlugin::ProcessEvent( EFlowEvent event, SActivationInfo* pActInfo )
{


    if ( event == eFE_Activate  && GetPortBool( pActInfo, 0 ) )
    {
        CryLogAlways( "Evenement init wiimote" );
        Init( GetPortBool( pActInfo, 1 ), GetPortBool( pActInfo, 1 ), GetPortInt( pActInfo, 2 ), GetPortFloat( pActInfo, 3 ), GetPortInt( pActInfo, 4 ), GetPortInt( pActInfo, 5 ), GetPortBool( pActInfo, 6 ), GetPortInt( pActInfo, 7 ) );

        //Sleep(1000);
        while ( wiiuse_poll( wiimotes, CryVR_WiimoteManagerPlugin::found ) )
        {
            CryLogAlways( "Initial Event" );
            Status( wiimotes[0] );
        }

        ActivateOutput( pActInfo, 0, true );
    }



}
開發者ID:lefevren,項目名稱:Plugin_WiiDevices,代碼行數:22,代碼來源:CryVR_WiimoteManager.cpp

示例7: Dumper

void CInventory::Dump() const
{
	struct Dumper
	{
		Dumper(EntityId entityId, const char* desc)
		{
			IEntitySystem* pEntitySystem = gEnv->pEntitySystem;
			IEntity*       pEntity       = pEntitySystem->GetEntity(entityId);
			CryLogAlways(">> Id: %u [%s] $3%s $5%s", entityId, pEntity ? pEntity->GetName() : "<unknown>", pEntity ? pEntity->GetClass()->GetName() : "<unknown>", desc ? desc : "");
		}
	};

	int count = GetCount();
	CryLogAlways("-- $3%s$1's Inventory: %d Items --", GetEntity()->GetName(), count);

	if (count)
	{
		for (TInventoryCIt it = m_stats.slots.begin(); it != m_stats.slots.end(); ++it)
		{
			Dumper dump(*it, 0);
		}
	}

	CryLogAlways(">> --");

	Dumper current(m_stats.currentItemId, "Current");
	Dumper last(m_stats.lastItemId, "Last");
	Dumper holstered(m_stats.holsteredItemId, "Holstered");

	CryLogAlways("-- $3%s$1's Inventory: %" PRISIZE_T " Ammo Types --", GetEntity()->GetName(), m_stats.ammoInfo.size());

	if (!m_stats.ammoInfo.empty())
	{
		for (TAmmoInfoMap::const_iterator ait = m_stats.ammoInfo.begin(); ait != m_stats.ammoInfo.end(); ++ait)
		{
			CryLogAlways(">> [%s] $3%d$1/$3%d", ait->first->GetName(), ait->second.GetCount(), GetAmmoCapacity(ait->first));
		}
	}
}
開發者ID:joewan,項目名稱:pycmake,代碼行數:39,代碼來源:Inventory.cpp

示例8: CRY_ASSERT

void CGameTokenSystem::RenameToken( IGameToken *pToken,const char *sNewName )
{
	CRY_ASSERT(pToken);
	CGameToken *pCToken = (CGameToken*)pToken;
	GameTokensMap::iterator it = m_pGameTokensMap->find( pCToken->m_name.c_str() );
	if (it != m_pGameTokensMap->end())
		m_pGameTokensMap->erase(it);
#ifdef DEBUG_GAME_TOKENS
	CryLogAlways("GameTokenSystemNew::RenameToken: 0x%p '%s' -> '%s'", pCToken, pCToken->m_name, sNewName);
#endif
	pCToken->m_name = sNewName;
	(*m_pGameTokensMap)[pCToken->m_name.c_str()] = pCToken;
}
開發者ID:NightOwlsEntertainment,項目名稱:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代碼行數:13,代碼來源:GameTokenSystem.cpp

示例9: FUNCTION_PROFILER_FAST

void CScriptSystem::OnFileChange(const char *fileName)
{
	FUNCTION_PROFILER_FAST(GetISystem(), PROFILE_SCRIPT, gEnv->bProfilerEnabled);

	if(g_pMonoCVars->mono_realtimeScriptingDetectChanges == 0)
		return;

	const char *fileExt = PathUtil::GetExt(fileName);
	if(!strcmp(fileExt, "cs") || !strcmp(fileExt, "dll"))
	{
		CryLogAlways("[CryMono] Detected change in file %s, preparing for reload..", fileName);

		if(!GetFocus())
		{
			CryLogAlways("CryENGINE did not have focus, waiting..");
			m_bDetectedChanges = true;
			return;
		}

		Reload();
	}
}
開發者ID:halukmy,項目名稱:CryMono,代碼行數:22,代碼來源:MonoScriptSystem.cpp

示例10: 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,代碼來源:FeatureTestMgr.cpp

示例11: CryLogAlways

//---------------------------------------------------
/*static*/ void ScreenLayoutManager::SetSafeArea( IConsoleCmdArgs* pArgs )
{
	if( !s_inst )
	{
		CryLogAlways( "No ScreenLayoutInstance available!" );
		return;
	}

	if( pArgs->GetArgCount() != 2 && pArgs->GetArgCount() != 3 )
	{
		CryLogAlways( "Incorrect Number of params" );
		return;
	}

	if( pArgs->GetArgCount() == 2 )
	{
		int id = (int)atoi( pArgs->GetArg(1) );

		// amount > 1.0f / probably an ID
		if( id <= 0 || id > eHSAID_END )
		{
			CryLog( "unknown safe area id." );
			return;
		}

		s_inst->SetSafeArea( (EHUDSafeAreaID)id );

		return;
	}

	float xammount = (float)atof( pArgs->GetArg(1) );
	float yammount = (float)atof( pArgs->GetArg(2) );
	if( xammount > 0.0f && yammount > 0.0f )
	{
		s_inst->SetSafeArea( Vec2(xammount, yammount) );
		return;
	}
}
開發者ID:PiratesAhoy,項目名稱:HeartsOfOak-Core,代碼行數:39,代碼來源:ScreenLayoutManager.cpp

示例12: CryLogAlways

void CUIMultiPlayer::PlayerJoined(EntityId playerid, const string& name)
{
    CryLogAlways("[CUIMultiPlayer] PlayerJoined %i %s", playerid, name.c_str() );

    m_Players[playerid].name = name;

    if (gEnv->pGame->GetIGameFramework()->GetClientActorId() == playerid)
    {
        SubmitNewName();
        return;
    }

    m_eventSender.SendEvent<eUIE_PlayerJoined>(playerid, name);
}
開發者ID:hybridsix,項目名稱:Code,代碼行數:14,代碼來源:UIMultiPlayer.cpp

示例13: CryLogAlways

void CDialogSystem::DumpSessions()
{
	// all sessions
	CryLogAlways("[DIALOG] AllSessions: Count=%" PRISIZE_T "", m_allSessions.size());
	for (TDialogSessionMap::const_iterator iter = m_allSessions.begin();
		iter != m_allSessions.end(); ++iter)
	{
		const CDialogSession* pSession = iter->second;
		CryLogAlways("  Session %d 0x%p Script=%s", pSession->GetSessionID(), pSession, pSession->GetScript()->GetID().c_str());
	}

	if (m_activeSessions.empty() == false)
	{
		CryLogAlways("[DIALOG] ActiveSessions: Count=%" PRISIZE_T "", m_activeSessions.size());
		// active sessions
		for (TDialogSessionVec::const_iterator iter = m_activeSessions.begin();
			iter != m_activeSessions.end(); ++iter)
		{
			const CDialogSession* pSession = *iter;
			CryLogAlways("  Session %d 0x%p Script=%s", pSession->GetSessionID(), pSession, pSession->GetScript()->GetID().c_str());
		}
	}

	// pending delete sessions
	if (m_pendingDeleteSessions.empty() == false)
	{
		CryLogAlways("[DIALOG] PendingDelete: Count=%" PRISIZE_T "", m_pendingDeleteSessions.size());
		// active sessions
		for (TDialogSessionVec::const_iterator iter = m_pendingDeleteSessions.begin();
			iter != m_pendingDeleteSessions.end(); ++iter)
		{
			const CDialogSession* pSession = *iter;
			CryLogAlways("  Session %d 0x%p Script=%s", pSession->GetSessionID(), pSession, pSession->GetScript()->GetID().c_str());
		}
	}
	// restore sessions
	if (m_restoreSessions.empty() == false)
	{
		CryLogAlways("[DIALOG] RestoreSessions: Count=%" PRISIZE_T "", m_restoreSessions.size());
		for (std::vector<SessionID>::const_iterator iter = m_restoreSessions.begin();
			iter != m_restoreSessions.end(); ++iter)
		{
			SessionID id = *iter;
			CryLogAlways("  Session %d", id);
		}
	}
}
開發者ID:aronarts,項目名稱:FireNET,代碼行數:47,代碼來源:DialogSystem.cpp

示例14: GetISystem

void CAutoTester::AddSimpleTestCase(const char * groupName, const char * testName, float duration, const char * failureReason, const char * owners)
{
	bool passed = true;
	XmlNodeRef testCase = GetISystem()->CreateXmlNode();
	testCase->setTag("testcase");
	testCase->setAttr("name", testName);
	
	if (owners)
	{
		testCase->setAttr("owners", owners);
	}

	if (duration >= 0.f)
	{
		testCase->setAttr("time", duration);
	}

	// Set whatever other attributes are useful here!

	if (failureReason == NULL || failureReason[0] == '\0')
	{
		CryLogAlways ("CAutoTester::AddSimpleTestCase() Group '%s' test '%s' passed!", groupName, testName);
		testCase->setAttr("status", "run");
	}
	else
	{
		CryLogAlways ("CAutoTester::AddSimpleTestCase() Group '%s' test '%s' failed: %s", groupName, testName, failureReason);
		XmlNodeRef failedCase = GetISystem()->CreateXmlNode();
		failedCase->setTag("failure");
		failedCase->setAttr("type", "TestCaseFailed");
		failedCase->setAttr("message", failureReason);
		testCase->addChild(failedCase);
		passed = false;
	}

	AddTestCaseResult(string().Format("%s: %s", m_includeThisInFileName, groupName ? groupName : "No group name specified"), testCase, passed);
}
開發者ID:Adi0927,項目名稱:alecmercer-origins,代碼行數:37,代碼來源:AutoTester.cpp

示例15: LOADING_TIME_PROFILE_SECTION

void CToolboxApplication::CreateLevel(const char *levelName)
{
	LOADING_TIME_PROFILE_SECTION(gEnv->pSystem);

	CryLogAlways("Creating empty level %s", levelName);

	string levelPath = PathUtil::GetGameFolder().append("/Levels/").append(levelName).append("/");
	string editorFile = levelPath.append(levelName).append(".tbx");

	gEnv->pCryPak->MakeDir(levelPath, true);

	XmlNodeRef todRoot = GetISystem()->LoadXmlFromFile("Toolbox/default_time_of_day.tod");
	if(todRoot)
	{
		ITimeOfDay *pTimeOfDay = gEnv->p3DEngine->GetTimeOfDay();
		pTimeOfDay->Serialize(todRoot, true);
		pTimeOfDay->SetTime(12.0f, true);
	}

	// Reset systems
	{
		gEnv->pEntitySystem->Reset();
		gEnv->p3DEngine->UnloadLevel();
		gEnv->pPhysicalWorld->SetupEntityGrid(2, Vec3(ZERO), 128, 128, 4, 4, 1);
	}

	if(!gEnv->p3DEngine->InitLevelForEditor(levelPath, ""))
	{
		ToolboxWarning("Failed to initialize level");
		return;
	}

	STerrainInfo terrainInfo;

	terrainInfo.nHeightMapSize_InUnits = terrainInfo.nSectorSize_InMeters = 256;
	terrainInfo.nUnitSize_InMeters = 1;
	terrainInfo.nSectorsTableSize_InSectors = 1;
	terrainInfo.fHeightmapZRatio = 0.003f;
	terrainInfo.fOceanWaterLevel = 20;

	gEnv->p3DEngine->CreateTerrain(terrainInfo);

	XmlNodeRef environmentRoot = GetISystem()->LoadXmlFromFile("Toolbox/default_environment_settings.xml");
	gEnv->p3DEngine->LoadEnvironmentSettingsFromXML(environmentRoot);

	GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_END, 0, 0);

	m_bLoadedLevel = true;
}
開發者ID:PoppermostProductions,項目名稱:Toolbox,代碼行數:49,代碼來源:Toolbox.cpp


注:本文中的CryLogAlways函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。