本文整理汇总了C++中StreamType::Align32方法的典型用法代码示例。如果您正苦于以下问题:C++ StreamType::Align32方法的具体用法?C++ StreamType::Align32怎么用?C++ StreamType::Align32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamType
的用法示例。
在下文中一共展示了StreamType::Align32方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Cmd_UNPACK
//.........这里部分代码省略.........
if(cl >= wl)
{
if(m_readTick < wl || wl == 0)
{
bool success = Unpack_ReadValue(nCommand, stream, writeValue, usn);
if(!success) break;
mustWrite = true;
}
}
else
{
if(m_writeTick < cl)
{
bool success = Unpack_ReadValue(nCommand, stream, writeValue, usn);
if(!success) break;
}
mustWrite = true;
}
if(mustWrite)
{
for(unsigned int i = 0; i < 4; i++)
{
uint32 maskOp = useMask ? GetMaskOp(i, m_writeTick) : MASK_DATA;
if(maskOp == MASK_DATA)
{
if(m_MODE == MODE_OFFSET)
{
writeValue.nV[i] += m_R[i];
}
else if(m_MODE == MODE_DIFFERENCE)
{
assert(0);
}
dst->nV[i] = writeValue.nV[i];
}
else if(maskOp == MASK_ROW)
{
dst->nV[i] = m_R[i];
}
else if(maskOp == MASK_COL)
{
int index = (m_writeTick > 3) ? 3 : m_writeTick;
dst->nV[i] = m_C[index];
}
else if(maskOp == MASK_MASK)
{
//Don't write anything
}
else
{
assert(0);
}
}
currentNum--;
}
if(cl >= wl)
{
m_writeTick = std::min<uint32>(m_writeTick + 1, wl);
m_readTick = std::min<uint32>(m_readTick + 1, cl);
if(m_readTick == cl)
{
m_writeTick = 0;
m_readTick = 0;
}
}
else
{
m_writeTick = std::min<uint32>(m_writeTick + 1, wl);
m_readTick = std::min<uint32>(m_readTick + 1, cl);
if(m_writeTick == wl)
{
m_writeTick = 0;
m_readTick = 0;
}
}
dst++;
}
if(currentNum != 0)
{
m_STAT.nVPS = 1;
}
else
{
// assert((m_cmdBuffer.GetReadCount() & 0x03) == 0);
stream.Align32();
m_STAT.nVPS = 0;
}
m_NUM = static_cast<uint8>(currentNum);
}