本文整理汇总了C++中CArray::Length方法的典型用法代码示例。如果您正苦于以下问题:C++ CArray::Length方法的具体用法?C++ CArray::Length怎么用?C++ CArray::Length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CArray
的用法示例。
在下文中一共展示了CArray::Length方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GatherVertices
int CFace::GatherVertices (CArray<CVertex>& source, CArray<CVertex>& dest, int nIndex)
{
#if DBG
if (uint (m_nIndex + m_nVerts) > source.Length ())
return 0;
if (uint (nIndex + m_nVerts) > dest.Length ())
return 0;
#endif
memcpy (dest + nIndex, source + m_nIndex, m_nVerts * sizeof (CVertex));
m_nIndex = nIndex; //set this face's index of its first vertex in the model's vertex buffer
return m_nVerts;
}
示例2: StopTriggeredSounds
static void StopTriggeredSounds (CArray<CTrigger>& triggers)
{
CTrigger *trigP = triggers.Buffer ();
for (int i = triggers.Length (); i > 0; i--, trigP++)
trigP->m_info.nChannel = -1;
}
示例3: OOF_ReadIntList
static int OOF_ReadIntList (CFile& cf, CArray<int>& list)
{
uint i;
char szId [20] = "";
list.Destroy ();
if (!(i = OOF_ReadInt (cf, "nList")))
return 0;
if (!list.Create (i))
return -1;
for (i = 0; i < list.Length (); i++) {
if (bLogOOF)
sprintf (szId, "list [%d]", i);
list [i] = OOF_ReadInt (cf, szId);
}
return list.Length ();
}
示例4: StartTriggeredSounds
static void StartTriggeredSounds (CArray<CTrigger>& triggers)
{
CTrigger *trigP = triggers.Buffer ();
for (int i = triggers.Length (); i > 0; i--, trigP++)
if ((trigP->m_info.nType == TT_SOUND) && (trigP->m_info.flags & TF_PLAYING_SOUND) && (trigP->m_info.nChannel < 0))
trigP->DoPlaySound (-1);
}