本文整理汇总了C++中CFileStream::ReadUChar方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileStream::ReadUChar方法的具体用法?C++ CFileStream::ReadUChar怎么用?C++ CFileStream::ReadUChar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileStream
的用法示例。
在下文中一共展示了CFileStream::ReadUChar方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
}
示例2: LoadFromFile
void CLuckDrawPrizeBase::LoadFromFile(CFileStream &file)
{
// Factory loads m_nType outside.
file.ReadUChar(m_nLevel);
file.ReadUChar(m_nSexNeed);
file.ReadBool(m_bAnnounce);
ASSERT(m_nType < ELuckDrawPrizeType_Max);
ASSERT(m_nLevel < ELuckDrawPrizeLevel_Max);
ASSERT(m_nSexNeed < ESexType_Max);
}
示例3: 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;
}