本文整理汇总了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;
}
示例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);
}
}
示例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;
}
}
示例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;
}
示例5: CryLogAlways
void CTacticalPointLanguageExtender::Initialize()
{
CryLogAlways("Registering TPS Extensions...");
INDENT_LOG_DURING_SCOPE();
if (gEnv->pAISystem->GetTacticalPointSystem())
{
RegisterWithTacticalPointSystem();
RegisterQueries();
Script::Call(gEnv->pScriptSystem, "ReloadTPSExtensions");
}
}
示例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 );
}
}
示例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));
}
}
}
示例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();
}
}
示例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.");
}
}
示例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;
}
}
示例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);
}
示例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);
}
}
}
示例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);
}
示例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;
}