本文整理汇总了C++中CFileStream::ReadUInt方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileStream::ReadUInt方法的具体用法?C++ CFileStream::ReadUInt怎么用?C++ CFileStream::ReadUInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileStream
的用法示例。
在下文中一共展示了CFileStream::ReadUInt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
bool CTargetConfig::Load(CFileStream&file)
{
file.ReadUInt( m_nTargetID );
short nCount = 0;
file.ReadShort(nCount) ;
file.ReadString(m_strDesc, nCount);
file.ReadUInt( m_nFlag );
nCount = 0;
file.ReadShort(nCount) ;
file.ReadString(m_strValue, nCount);
unsigned short nStarValueCount = 0;
file.ReadUShort(nStarValueCount);
for (unsigned short i = 0 ; i < nStarValueCount; ++i)
{
unsigned short nStarCount = 0;
unsigned int nStarValue = 0;
file.ReadUShort(nStarCount);
file.ReadUInt(nStarValue);
m_mapStarValue[nStarCount] = nStarValue;
}
return true;
}
示例2: Load
bool BigMamaStageInfo::Load(CFileStream & fs)
{
fs.ReadUShort(m_nStageID);
fs.ReadUShort(m_nMusicID);
fs.ReadUChar(m_nModeID);
fs.ReadUChar(m_nLevel);
fs.ReadUChar(m_nNpcID);
fs.ReadUInt(m_nTargetScore);
fs.ReadUChar(m_nSceneID);
fs.ReadUInt(m_nRatio);
return true;
}
示例3: LoadInfoFromFile
void PetExchangeInfo::LoadInfoFromFile(CFileStream &rFileStream)
{
if (!rFileStream.IsOpen() )
return;
unsigned char nAttributeType = 0;
unsigned char nQualityType = 0;
unsigned int nItemType = 0;
unsigned short nItemCount = 0;
unsigned short nCount = 0;
rFileStream.ReadUShort(nCount);
for (unsigned short i = 0; i < nCount; ++i)
{
rFileStream.ReadUChar(nAttributeType);
rFileStream.ReadUChar(nQualityType);
rFileStream.ReadUInt(nItemType);
rFileStream.ReadUShort(nItemCount);
ASSERT(ePetAttributeType_None < nAttributeType && nAttributeType < ePetAttributeType_Max);
ASSERT(ePetQualityType_None < nQualityType && nQualityType < ePetQualityType_Max);
ASSERT(nItemType > 0);
ASSERT(nItemCount > 0);
CItem item(nItemType, nItemCount, -1, false);
AddExchangeInfo(nAttributeType, nQualityType, item);
}
}
示例4: LoadFromFile
bool AuctionGoodsInfo::LoadFromFile(CFileStream &file)
{
if (!m_cGoodsInfo.LoadFromFile(file))
return false;
file.ReadUShort(m_uSerializeID);
file.ReadUShort(m_uAddPercent);
file.ReadUInt(m_uMinAdd);
file.ReadFloat(m_fCountDown);
file.ReadUInt(m_uCurPrice);
file.ReadUInt(m_uRoleID);
file.ReadString2(m_strRoleName);
ASSERT(0 < m_uSerializeID);
ASSERT(m_uAddPercent <= 100);
if (0 == m_uCurPrice)
m_uCurPrice = m_cGoodsInfo.m_uSellPrice;
return true;
}