当前位置: 首页>>代码示例>>C++>>正文


C++ LTARRAYSIZE函数代码示例

本文整理汇总了C++中LTARRAYSIZE函数的典型用法代码示例。如果您正苦于以下问题:C++ LTARRAYSIZE函数的具体用法?C++ LTARRAYSIZE怎么用?C++ LTARRAYSIZE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LTARRAYSIZE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LTARRAYSIZE

void LightBase::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!pMsg) 
		return;

	ILTMessage_Read& cMsg = *pMsg;

	m_vColor				= cMsg.ReadLTVector();
	m_vDirectionalDims		= cMsg.ReadLTVector();
	m_vTranslucentColor		= cMsg.ReadLTVector();
	m_vSpecularColor		= cMsg.ReadLTVector();
	m_fLightRadius			= cMsg.Readfloat();
	m_fIntensityScale		= cMsg.Readfloat();
	m_eLightType			= (EEngineLightType)cMsg.Readuint8();
	m_fSpotFovX				= cMsg.Readfloat();
	m_fSpotFovY				= cMsg.Readfloat();
	m_fSpotNearClip			= cMsg.Readfloat();
	m_eLightLOD				= (EEngineLOD)cMsg.Readuint8();
	m_eWorldShadowsLOD		= (EEngineLOD)cMsg.Readuint8();
	m_eObjectShadowsLOD		= (EEngineLOD)cMsg.Readuint8();

	char pszTextureBuffer[MAX_PATH + 1];

	cMsg.ReadString(pszTextureBuffer, LTARRAYSIZE(pszTextureBuffer));
	m_sLightTexture = pszTextureBuffer;

	cMsg.ReadString(pszTextureBuffer, LTARRAYSIZE(pszTextureBuffer));
	m_sLightAttenuationTexture = pszTextureBuffer;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:29,代码来源:LightBase.cpp

示例2: defined

// Launches the end splash screen.
bool LaunchApplication::LaunchEndSplashScreen( )
{
#if defined(PLATFORM_WIN32)

	if( !g_pLTIStringEdit->DoesIDExist(g_pLTDBStringEdit, "EndSplashURL" ))
		return false;

	char szEndSplashURL[MAX_PATH*2] = "";
	LTStrCpy( szEndSplashURL, MPW2A( LoadString( "EndSplashURL" )).c_str(), LTARRAYSIZE( szEndSplashURL ));
	if( LTStrEmpty( szEndSplashURL ))
		return false;

	char szExe[MAX_PATH] = "";
	uint32 nExeSize = LTARRAYSIZE( szExe );
	AssocQueryString(ASSOCF_NOTRUNCATE,
		ASSOCSTR_EXECUTABLE,
		".htm",
		"open",
		szExe,
		( DWORD* )&nExeSize);

	return LaunchFromString( szExe, szEndSplashURL, true, true );
#else
	return false;
#endif
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:27,代码来源:ClientUtilities.cpp

示例3: LTARRAYSIZE

void CAIGoalStunned::DeactivateGoal()
{
	super::DeactivateGoal();

	// Disable the flashlight of whoever stunned me.

	CAIWMFact factQuery;
	factQuery.SetFactType( kFact_Desire );
	factQuery.SetDesireType( kDesire_Stunned );
	CAIWMFact* pFact = m_pAI->GetAIWorkingMemory()->FindWMFact( factQuery );
	if( pFact )
	{
		// Enable the flashlight after some delay.

		char szName[64];
		HOBJECT hStunner = pFact->GetTargetObject();
		ILTBaseClass* pStunner = g_pLTServer->HandleToObject( hStunner );
		g_pLTServer->GetObjectName( hStunner, szName, LTARRAYSIZE(szName) );

		float fDelay = g_pAIDB->GetMiscFloat( FLASHLIGHT_DISABLE_TIME );

		char szCommand[128];
		LTSNPrintF( szCommand, LTARRAYSIZE( szCommand ), "delay %.2f (msg %s (FLASHLIGHT ENABLE))", fDelay, szName );
		g_pCmdMgr->QueueCommand( szCommand, m_pAI, pStunner );
	}

	// Clear the knowledge of reacting to getting stunned.

	m_pAI->GetAIWorldState()->SetWSProp( kWSK_ReactedToWorldStateEvent, m_pAI->m_hObject, kWST_ENUM_AIWorldStateEvent, kWSE_Invalid );
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:30,代码来源:AIGoalStunned.cpp

示例4: switch

void ClientVoteMgr::HandleVotePass()
{
	wchar_t wszMsg[256] = L"";

	switch(m_CurrentVote.m_eVoteType)
	{
	case eVote_Kick:
		FormatString("Vote_Pass_Kick",wszMsg,LTARRAYSIZE(wszMsg),m_sTargetName.c_str());
		g_pGameMsgs->AddMessage(wszMsg);
		break;
	case eVote_TeamKick:
		FormatString("Vote_Pass_TeamKick",wszMsg,LTARRAYSIZE(wszMsg),m_sTargetName.c_str());
		g_pGameMsgs->AddMessage(wszMsg);
		break;
	case eVote_Ban:
		FormatString("Vote_Pass_Ban",wszMsg,LTARRAYSIZE(wszMsg),m_sTargetName.c_str());
		g_pGameMsgs->AddMessage(wszMsg);
		break;
	case eVote_NextRound:
		g_pGameMsgs->AddMessage( LoadString("Vote_Pass_NextRound") );
		break;
	case eVote_NextMap:
		g_pGameMsgs->AddMessage( LoadString("Vote_Pass_NextMap") );
		break;
	case eVote_SelectMap:
		FormatString("Vote_Pass_SelectMap",wszMsg,LTARRAYSIZE(wszMsg),m_sTargetName.c_str());
		g_pGameMsgs->AddMessage(wszMsg);
		break;
	}


	ClearVote();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:33,代码来源:ClientVoteMgr.cpp

示例5: EnterCriticalSection

void CLoadingScreen::ClientContentTransferCompletedNotification()
{
	// No need to update content info if a different screen is being rendered...
	if( m_pRenderScreen )
		return;

	EnterCriticalSection(&m_MissionUpdate);

	// rebuild and reinitialize the mission database
	g_pMissionDB->Reset();
	g_pMissionDB->Init(DB_Default_File);
	g_pMissionDB->CreateMPDB();

	char szPath[MAX_PATH*2];
	LTFileOperations::GetUserDirectory(szPath, LTARRAYSIZE(szPath));
	LTStrCat( szPath, MDB_MP_File, LTARRAYSIZE( szPath ));
	g_pMissionDB->Init(szPath);

	m_CurrentFileName.SetString(L"");
	m_CurrentFileTime.SetString(L"");
	m_FilesLeft.SetString(L"");
	m_TotalTime.SetString(L"");

	UpdateCurrentBar(1.0f);
	UpdateTotalBar(1.0f);

	m_bContentTransfer = false;

	LeaveCriticalSection(&m_MissionUpdate);
	Update();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:31,代码来源:LoadingScreen.cpp

示例6: LTSNPrintF

uint32 LTProfileUtils::ReadUint32(const char* pszSectionName, 
								const char* pszKeyName,
								uint32 nDefault,
								const char* pszFileName)
{
	char szValue[64];
	LTSNPrintF( szValue, LTARRAYSIZE( szValue ), "%d", nDefault );
	ReadString( pszSectionName, pszKeyName, szValue, szValue, LTARRAYSIZE( szValue ), pszFileName);
	
	return ( uint32 )atoi( szValue );
}
开发者ID:xfw5,项目名称:Fear-SDK-1.08,代码行数:11,代码来源:linux_ltprofileutils.cpp

示例7: FormatString

void CScreenHostOptionFile::UpdateName()
{
	CUserProfile* pProfile = g_pProfileMgr->GetCurrentProfile();

	wchar_t wszBuffer[MAX_PATH*2];

	const wchar_t* wszFriendlyName = CHostOptionsMapMgr::Instance().GetFriendlyNameFromFileName( pProfile->m_sServerOptionsFile.c_str() );
	if( wszFriendlyName )
		FormatString( "IDS_CURRENT_OPTIONFILE", wszBuffer, LTARRAYSIZE(wszBuffer), wszFriendlyName);
	else
		FormatString( "IDS_CURRENT_OPTIONFILE", wszBuffer, LTARRAYSIZE(wszBuffer), MPA2W(pProfile->m_sServerOptionsFile.c_str( )).c_str( ));
	m_pCurrent->SetString( wszBuffer );
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:13,代码来源:ScreenHostOptionFile.cpp

示例8: LTARRAYSIZE

bool BanIPMgr_Impl::ReadBans( )
{
	// build the file name by prepending the user directory
	char szFilename[MAX_PATH];
	LTFileOperations::GetUserDirectory(szFilename, LTARRAYSIZE(szFilename));
	LTStrCat(szFilename, szBanFile, LTARRAYSIZE(szFilename));

	// Check if there is a file to read.
	if( !LTFileOperations::FileExists( szFilename ))
		return true;

	// read in the current set of bans
	return LTFileOperations::ParseTextFile(szFilename, ReadBansProcessLineFn, this);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:14,代码来源:BanIPMgr.cpp

示例9: DrawPrimSetRGBA

// Render the control
void CLTGUIFillFrame::Render()
{
	if( !IsVisible() )
		return;

	// fill with a background color
	LT_POLYG4 polyBackground;
	DrawPrimSetRGBA( polyBackground, m_nBackgroundColor );
	DrawPrimSetXYWH( polyBackground, GetPos().x, GetPos().y, GetWidth(), GetHeight() );
	g_pDrawPrim->SetRenderMode(eLTDrawPrimRenderMode_Modulate_Translucent);
	g_pDrawPrim->DrawPrim( &polyBackground );

	// render the border
	if( m_nFrameWidth )
	{
		// set up the render state	
		g_pDrawPrim->SetRenderMode(eLTDrawPrimRenderMode_Modulate_NoBlend);

		for (int f = 0;f < LTARRAYSIZE(m_Frame); ++f)
			DrawPrimSetRGBA(m_Frame[f],GetCurrentColor());

		// draw our frames
		if( (m_nBorderFlags & eBorder_Left) )
			g_pDrawPrim->DrawPrim( &m_Frame[0], 1 );
		if( (m_nBorderFlags & eBorder_Top) )
			g_pDrawPrim->DrawPrim( &m_Frame[1], 1 );
		if( (m_nBorderFlags & eBorder_Right) )
			g_pDrawPrim->DrawPrim( &m_Frame[2], 1 );
		if( (m_nBorderFlags & eBorder_Bottom) )
			g_pDrawPrim->DrawPrim( &m_Frame[3], 1 );
	}
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:33,代码来源:ltguifillframe.cpp

示例10: AIError

void AIError(const char* szFormat, ...)
{
#ifndef _FINAL

	// jeffo 03/03/04:
	// Do NOT require DebugLevel to be 1, or LD will never see their errors!!
	//if (GetConsoleInt("DebugLevel",0) < 1 ) return;

	static char szBuffer[4096];
	va_list val;
	va_start(val, szFormat);
	LTVSNPrintF(szBuffer, LTARRAYSIZE(szBuffer), szFormat, val);
	va_end(val);

	// Check that the pointer is valid before use is attempted,
	// as if this is called in a WorldEdit crash, the LTServer pointer
	// is no where near existing.  This is NOT an error condition, just
	// an unfortunate side effect of WorldEdit and the engine using the same
	// GameServer.dll file for different situations.
	if ( g_pLTServer )
	{
		g_pLTServer->CPrint("AI ERROR: %s", szBuffer);
	}
#endif
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:25,代码来源:AIUtils.cpp

示例11: DisableCollisions

void CClientMeleeCollisionController::DisableCollisions()
{
	for ( int iEachCollider = 0; iEachCollider < LTARRAYSIZE(m_MeleeColliders); ++iEachCollider )
	{
		m_MeleeColliders[iEachCollider].m_bDisableRequest = true;
	}
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:7,代码来源:ClientMeleeCollisionController.cpp

示例12: ResetCollisionData

void CClientMeleeCollisionController::ResetCollisionData()
{
	for ( int iEachCollider = 0; iEachCollider < LTARRAYSIZE(m_MeleeColliders); ++iEachCollider )
	{
		ResetCollider( m_MeleeColliders[iEachCollider] );
	}
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:7,代码来源:ClientMeleeCollisionController.cpp

示例13: Update

void CClientMeleeCollisionController::Update()
{
	for ( int iEachCollider = 0; iEachCollider < LTARRAYSIZE(m_MeleeColliders); ++iEachCollider )
	{
		UpdateCollider( m_MeleeColliders[iEachCollider] );
	}
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:7,代码来源:ClientMeleeCollisionController.cpp

示例14: FindDamageWho

// Converts the damagewho string in the damage to an enum.
static DamageWho FindDamageWho( HATTRIBUTE hStruct )
{
	// Initialize our search table.
	struct StringToEnum
	{
		CParsedMsg::CToken	m_tokString;
		DamageWho			m_eEnum;
	};
	static StringToEnum table[] = 
	{
		{ "ME", eDamageWho_Me },
		{ "THEM", eDamageWho_Them },
		{ "BOTH", eDamageWho_Both },
	};
	static uint32 nTableCount = LTARRAYSIZE( table );

	// Find the string location and return the enum.
	CParsedMsg::CToken tokValue = DATABASE_CATEGORY( CollisionProperty ).GETSTRUCTATTRIB( Damage, hStruct, 0, DamageWho );
	for( uint32 i = 0; i < nTableCount; i++ )	
	{
		if( table[i].m_tokString == tokValue )
			return table[i].m_eEnum;
	}

	return eDamageWho_Me;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:27,代码来源:ServerPhysicsCollisionMgr.cpp

示例15: PreHook_EditStringList

LTRESULT SpecialMovePlugin::PreHook_EditStringList(	const char* szRezPath,
													const char* szPropName,
													char** aszStrings,
													uint32* pcStrings,
													const uint32 cMaxStrings,
													const uint32 cMaxStringLength)
{
	if (LTStrIEquals("Animation", szPropName))
	{
		for (int i = 0; i < AnimPropUtils::Count(); i++)
		{
			const char* pszAnim = AnimPropUtils::String(EnumAnimProp(i));
			if (LTSubStrIEquals(pszAnim, SPECIALMOVE_PREFIX, LTARRAYSIZE(SPECIALMOVE_PREFIX)-1))
			{
				LTStrCpy(aszStrings[(*pcStrings)++], pszAnim, cMaxStringLength);
			}
		}
		return LT_OK;
	}
	else if (LTStrIEquals("ActivationType", szPropName))
	{
		if( CategoryPlugin::Instance().PopulateStringList( DATABASE_CATEGORY( Activate ).GetCategory(), 
			aszStrings, pcStrings, cMaxStrings, cMaxStringLength ))
		{
			return LT_OK;
		}
	}

	return LT_UNSUPPORTED;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:30,代码来源:SpecialMove.cpp


注:本文中的LTARRAYSIZE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。