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


C++ CBankedList类代码示例

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


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

示例1: MakeTransitionable

void GameBase::MakeTransitionable( )
{
	// Only want one per object

	ASSERT( m_pTransAgg == NULL );

	// Create it and add it...

	m_pTransAgg = s_bankCTransAggs.New();
	if( !m_pTransAgg )
	{
		g_pLTServer->CPrint( "new TransAgg FAILED!!!" );
		return;
	}
	AddAggregate( (LPAGGREGATE)m_pTransAgg );
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:16,代码来源:GameBase.cpp

示例2: DestroyTransitionAggregate

void GameBase::DestroyTransitionAggregate( )
{
	if( !m_pTransAgg ) return;

#ifndef _FINAL
	CTransitionAggregate *pIAgg = dynamic_cast<CTransitionAggregate*>(m_pTransAgg);
	if( !pIAgg )
	{
		g_pLTServer->CPrint( "NOT a CTransitionAggregate!!!" );
		return;
	}
#endif

	RemoveAggregate( (LPAGGREGATE)m_pTransAgg );
	s_bankCTransAggs.Delete( m_pTransAgg );
	m_pTransAgg = NULL;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:17,代码来源:GameBase.cpp

示例3: fxCreatePlayRandomSound

CBaseFX* fxCreatePlayRandomSound()
{
	return g_PlayRandomSoundFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例4: fxCreatePolyTube

CBaseFX* fxCreatePolyTube()
{
	return g_PolyTubeFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例5: fxCreateNull

CBaseFX* fxCreateNull()
{
	return g_NullFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例6: fxCreateLTBBouncyChunk

CBaseFX* fxCreateLTBBouncyChunk()
{
	return g_LTBBouncyChunkFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例7: CreateAnimationContext

CAnimationContext* CAnimationMgr::CreateAnimationContext(HOBJECT hObject)
{
	CAnimationContext* pAnimationContext = s_bankCAnimationContext.New();
	pAnimationContext->Init(m_cAnimations, m_cTransitions);
	pAnimationContext->m_pAnimationMgr = this;
	pAnimationContext->m_hObject = hObject;

	for ( uint32 iAnimation = 0 ; iAnimation < m_cAnimations ; iAnimation++ )
	{
		pAnimationContext->m_aAnimationInstances[iAnimation].m_iIndex = iAnimation;
		HMODELANIM hAni = GetAnimationInstance(hObject, m_aAnimations[iAnimation].m_szName);
		pAnimationContext->m_aAnimationInstances[iAnimation].m_hAni = hAni;
		if ( INVALID_MODEL_ANIM == hAni )
		{
            //g_pLTServer->CPrint("Could not find animation: %s", m_aAnimations[iAnimation].m_szName);
		}

		// Check for pitched pair of ani

		char szNamePitched[128];

		HMODELANIM hAniPitchDown;
		sprintf(szNamePitched, "%s*d", m_aAnimations[iAnimation].m_szName);
		hAniPitchDown = GetAnimationInstance(hObject, szNamePitched);
		pAnimationContext->m_aAnimationInstances[iAnimation].m_hAniPitchDown = hAniPitchDown;

		HMODELANIM hAniPitchUp;
		sprintf(szNamePitched, "%s*u", m_aAnimations[iAnimation].m_szName);
		hAniPitchUp = GetAnimationInstance(hObject, szNamePitched);
		pAnimationContext->m_aAnimationInstances[iAnimation].m_hAniPitchUp = hAniPitchUp;

		pAnimationContext->m_aAnimationInstances[iAnimation].m_bPitched = (INVALID_MODEL_ANIM != hAniPitchDown && INVALID_MODEL_ANIM != hAniPitchUp);

		if ( pAnimationContext->m_aAnimationInstances[iAnimation].m_bPitched )
		{
//			g_pLTServer->CPrint("animation ''%s'' is pitched", m_aAnimations[iAnimation].GetName());
		}
	}

	for ( uint32 iTransition = 0 ; iTransition < m_cTransitions ; iTransition++ )
	{
		pAnimationContext->m_aTransitionInstances[iTransition].m_iIndex = iTransition;
		HMODELANIM hAni = GetAnimationInstance(hObject, m_aTransitions[iTransition].m_szName);
		pAnimationContext->m_aTransitionInstances[iTransition].m_hAni = hAni;
		if ( INVALID_MODEL_ANIM == hAni )
		{
            //g_pLTServer->CPrint("Could not find transition: %s", m_aTransitions[iTransition].m_szName);
		}
	}

	pAnimationContext->m_fPitchTarget = 0.5f;
	pAnimationContext->m_fPitch = 0.5f;

	if ( LT_OK != g_pModelLT->AddTracker(hObject, &pAnimationContext->m_trkPitchDown) )
		_ASSERT(LTFALSE);

	if ( LT_OK != g_pModelLT->AddTracker(hObject, &pAnimationContext->m_trkPitchUp) )
		_ASSERT(LTFALSE);

	for ( uint32 iPitchWeightset = 0 ; iPitchWeightset < CAnimationContext::kNumPitchWeightsets ; iPitchWeightset++ )
	{
		char szPitchWeightset[512];
		LTFLOAT fWeightsetAmount = 100.0f/(LTFLOAT)(CAnimationContext::kNumPitchWeightsets-1);
		sprintf(szPitchWeightset, "Morph%d", (int32)(iPitchWeightset*fWeightsetAmount));

		if ( LT_OK != g_pModelLT->FindWeightSet(hObject, szPitchWeightset, pAnimationContext->m_ahPitchWeightsets[iPitchWeightset]) )
		{
//			g_pLTServer->CPrint("could not find pitch weightset %s", szPitchWeightset);
		}
	}

	pAnimationContext->DisablePitch();

	return pAnimationContext;
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:75,代码来源:AnimationMgr.cpp

示例8: fxCreateFlareSpriteFX

CBaseFX* fxCreateFlareSpriteFX()
{
	return g_FlareSpriteFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例9: fxCreateLTBModel

CBaseFX* fxCreateLTBModel()
{
	return g_LTBModelFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例10: fxCreateSprite

CBaseFX* fxCreateSprite()
{
	return g_SpriteFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例11: fxCreateParticleSystem

CBaseFX* fxCreateParticleSystem()
{
	return g_ParticleSystemFX_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp

示例12: fxDelete

__declspec(dllexport) void fxDelete(CBaseFX *pDeleteFX)
{
	// Figure out what kind of FX we are deleting and make sure the propper bank handles it...

	switch( pDeleteFX->GetFXType() )
	{
		case CBaseFX::eParticleSystemFX :
		{
			g_ParticleSystemFX_Bank.Delete( (CParticleSystemFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eSpriteFX :
		{
			g_SpriteFX_Bank.Delete( (CSpriteFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eLTBModelFX :
		{
			g_LTBModelFX_Bank.Delete( (CLTBModelFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eDynaLightFX :
		{
			g_DynaLightFX_Bank.Delete( (CDynaLightFX*)pDeleteFX );
		}
		break;

		case CBaseFX::ePlaySoundFX :
		{
			g_PlaySoundFX_Bank.Delete( (CPlaySoundFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eCamJitterFX :
		{
			g_CamJitterFX_Bank.Delete( (CCamJitterFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eCamWobbleFX :
		{
			g_CamWobbleFX_Bank.Delete( (CCamWobbleFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eLTBBouncyChunkFX :
		{
			g_LTBBouncyChunkFX_Bank.Delete( (CLTBBouncyChunkFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eNullFX :
		{
			g_NullFX_Bank.Delete( (CNullFX*)pDeleteFX );
		}
		break;

		case CBaseFX::ePolyTubeFX :
		{
			g_PolyTubeFX_Bank.Delete( (CPolyTubeFX*)pDeleteFX );
		}
		break;

		case CBaseFX::ePlayRandomSoundFX :
		{
			g_PlayRandomSoundFX_Bank.Delete( (CPlayRandomSoundFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eSpriteSystem :
		{
			g_SpriteSystem_Bank.Delete( (CSpriteSystem*)pDeleteFX );
		}
		break;

		case CBaseFX::eCreateFX :
		{
			g_CreateFX_Bank.Delete( (CCreateFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eFlareSpriteFX :
		{
			g_FlareSpriteFX_Bank.Delete( (CFlareSpriteFX*)pDeleteFX );
		}
		break;

		case CBaseFX::eLightningFX :
		{
			g_LightningFX_Bank.Delete( (CLightningFX*)pDeleteFX );
		}
		break;

		default:
		{	
			// We should never be getting here!
			ASSERT( LTFALSE );
//.........这里部分代码省略.........
开发者ID:Arc0re,项目名称:lithtech,代码行数:101,代码来源:clientfx.cpp

示例13: CreateSFX

CSpecialFX* CSFXMgr::CreateSFX(uint8 nId, SFXCREATESTRUCT *psfxCreateStruct,
							   ILTMessage_Read *pMsg, HOBJECT hServerObj)
{
    CSpecialFX* pSFX = NULL;

	switch (nId)
	{
		case SFX_WEAPON_ID :
		{
			pSFX = &s_WeaponFX;
		}
		break;

		case SFX_PLAYERLURE_ID :
		{
			pSFX = debug_new( PlayerLureFX );
		}
		break;

		case SFX_PLAYERSOUND_ID :
		{
			pSFX = g_SFXBank_PlayerSound.New();
		}
		break;

		case SFX_PROJECTILE_ID :
		{
			pSFX = g_SFXBank_Projectile.New();
		}
		break;

		case SFX_SEARCHLIGHT_ID :
		{
			pSFX = g_SFXBank_SearchLight.New();
		}
		break;

		case SFX_MARK_ID :
		{
			pSFX = g_SFXBank_Mark.New();
		}
		break;

		case SFX_SHELLCASING_ID :
		{
			pSFX = g_SFXBank_ShellCasing.New();
		}
		break;

		case SFX_CAMERA_ID :
		{
			pSFX = g_SFXBank_Camera.New();
			if (pSFX)
			{
				if (pSFX->Init(psfxCreateStruct))
				{
					if (g_pLTClient->IsConnected())
					{
						if (pSFX->CreateObject(g_pLTClient))
						{
							m_cameraSFXList.Add(pSFX);
						}
						else
						{
							DeleteSFX(pSFX);
                            pSFX = NULL;
						}
					}
					else
					{
						DeleteSFX(pSFX);
                        pSFX = NULL;
					}
				}
			}

			return pSFX;
		}
		break;

		case SFX_POLYGRID_ID :
		{
			pSFX = g_SFXBank_PolyGrid.New();
		}
		break;

		case SFX_RENDERTARGET_ID :
		{
			pSFX = g_SFXBank_RenderTarget.New();
		}
		break;

		case SFX_RENDERTARGETGROUP_ID :
		{
			pSFX = g_SFXBank_RenderTargetGroup.New();
		}
		break;

		case SFX_EXPLOSION_ID :
		{
//.........这里部分代码省略.........
开发者ID:Arc0re,项目名称:lithtech,代码行数:101,代码来源:SFXMgr.cpp

示例14: DeleteSFX

void CSFXMgr::DeleteSFX(CSpecialFX* pFX)
{
	// Make sure we've got a valid pointer
	if (!pFX)
		return;

	// Make sure we don't try to delete the static fx(s)...
	if (pFX == &s_WeaponFX)
		return;

	// Alrighty, get the ID from the effect...
	switch(pFX->GetSFXID())
	{
		// Delete it from the right place...

		case SFX_PLAYERSOUND_ID :
		{
			g_SFXBank_PlayerSound.Delete((CPlayerSoundFX*)pFX);
		}
		break;

		case SFX_MARK_ID :
		{
			g_SFXBank_Mark.Delete((CMarkSFX*)pFX);
		}
		break;

		case SFX_SHELLCASING_ID :
		{
			g_SFXBank_ShellCasing.Delete((CShellCasingFX*)pFX);
		}
		break;

		case SFX_PROJECTILE_ID :
		{
			g_SFXBank_Projectile.Delete((CProjectileFX*)pFX);
		}
		break;

		case SFX_CAMERA_ID :
		{
			g_SFXBank_Camera.Delete((CCameraFX*)pFX);
		}
		break;

		case SFX_POLYGRID_ID :
		{
			g_SFXBank_PolyGrid.Delete((CPolyGridFX*)pFX);
		}
		break;

		case SFX_RENDERTARGET_ID :
		{
			g_SFXBank_RenderTarget.Delete((CRenderTargetFX*)pFX);
		}
		break;

		case SFX_RENDERTARGETGROUP_ID :
		{
			g_SFXBank_RenderTargetGroup.Delete((CRenderTargetGroupFX*)pFX);
		}
		break;

		case SFX_EXPLOSION_ID :
		{
			g_SFXBank_Explosion.Delete((CExplosionFX*)pFX);
		}
		break;

		case SFX_VOLUMEBRUSH_ID :
		{
			g_SFXBank_VolumeBrush.Delete((CVolumeBrushFX*)pFX);
		}
		break;

		case SFX_CHARACTER_ID :
		{
			g_SFXBank_Character.Delete((CCharacterFX*)pFX);
		}
		break;

		case SFX_SEARCHLIGHT_ID :
		{
			g_SFXBank_SearchLight.Delete((CSearchLightFX*)pFX);
		}
		break;

		case SFX_PICKUPITEM_ID :
		{
			g_SFXBank_PickupItem.Delete((CPickupItemFX*)pFX);
		}
		break;

		case SFX_AIMMAGNET_ID :
		{
			g_SFXBank_AimMagnet.Delete((CAimMagnetFX*)pFX);
		}
		break;

		case SFX_NAVMARKER_ID :
//.........这里部分代码省略.........
开发者ID:Arc0re,项目名称:lithtech,代码行数:101,代码来源:SFXMgr.cpp

示例15: fxCreateSpriteSystem

CBaseFX* fxCreateSpriteSystem()
{
	return g_SpriteSystem_Bank.New();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:4,代码来源:clientfx.cpp


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