本文整理汇总了C++中athena::io::IStreamReader::readUint32方法的典型用法代码示例。如果您正苦于以下问题:C++ IStreamReader::readUint32方法的具体用法?C++ IStreamReader::readUint32怎么用?C++ IStreamReader::readUint32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类athena::io::IStreamReader
的用法示例。
在下文中一共展示了IStreamReader::readUint32方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: magic
CPASDatabase::CPASDatabase(Athena::io::IStreamReader& in)
{
CFourCC magic(in);
if (magic != skPAS4FourCC)
THROW_INVALID_DATA_EXCEPTION("Invalid PASDatabase magic expected 'PAS4'' got 0x%.4s", magic);
atUint32 stateCount = in.readUint32();
m_defaultState = in.readInt32();
if (m_defaultState == ~0)
return;
while ((stateCount--) > 0)
{
SPASAnimState state;
state.unknown1 = in.readUint32();
atUint32 parmInfoCount = in.readUint32();
atUint32 animInfoCount = in.readUint32();
for (atUint32 i = 0; i < parmInfoCount; i++)
{
SPASParmInfo info;
info.type = (EParmType)in.readUint32();
info.unknown1 = in.readUint32();
info.unknown2 = in.readFloat();
for (atUint32 j = 0; j < 2; j++)
{
switch(info.type)
{
case eInt32:
{
atInt32 tmp = in.readInt32();
info.parameters[j] = CPASInt32Paramater(tmp);
}
break;
case eUint32:
{
atUint32 tmp = in.readUint32();
info.parameters[j] = CPASUint32Parameter(tmp);
}
break;
case eEnum:
{
atUint32 tmp = in.readUint32();
info.parameters[j] = CPASEnumParameter(tmp);
}
break;
case eReal32:
{
float tmp = in.readFloat();
info.parameters[j] = CPASReal32Parameter(tmp);
}
break;
case eBool:
{
bool tmp = in.readBool();
info.parameters[j] = CPASBoolParameter(tmp);
}
break;
}
}
state.parmInfo.push_back(info);
}
for (atUint32 i = 0; i < animInfoCount; i++)
{
SPASAnimInfo info;
info.unknown1 = in.readUint32();
for (atUint32 j = 0; j < parmInfoCount; j++)
{
switch(state.parmInfo[j].type)
{
case eInt32:
{
atInt32 tmp = in.readInt32();
info.parameters.push_back(CPASInt32Paramater(tmp));
}
break;
case eUint32:
{
atUint32 tmp = in.readUint32();
info.parameters.push_back(CPASUint32Parameter(tmp));
}
break;
case eEnum:
{
atUint32 tmp = in.readUint32();
info.parameters.push_back(CPASEnumParameter(tmp));
}
break;
case eReal32:
{
float tmp = in.readFloat();
info.parameters.push_back(CPASReal32Parameter(tmp));
}
break;
case eBool:
{
bool tmp = in.readBool();
info.parameters.push_back(CPASBoolParameter(tmp));
//.........这里部分代码省略.........