本文整理汇总了C++中CFileStream::ReadUShort方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileStream::ReadUShort方法的具体用法?C++ CFileStream::ReadUShort怎么用?C++ CFileStream::ReadUShort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileStream
的用法示例。
在下文中一共展示了CFileStream::ReadUShort方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
bool CStoryConfig::Load(CFileStream&file)
{
file.ReadUInt( m_nStoryID );
unsigned short nNPCListCount = 0;
file.ReadUShort( nNPCListCount );
for ( unsigned int i = 0 ;i < nNPCListCount; ++i )
{
unsigned int nNPCID = 0;
file.ReadUInt( nNPCID );
m_NPCList.push_back( nNPCID );
}
unsigned short nContentCount = 0;
file.ReadUShort( nContentCount );
for ( unsigned int i = 0 ;i < nContentCount; ++i )
{
CStoryContent content;
file.ReadUInt( content.m_nNPCID );
short nCount = 0;
file.ReadShort(nCount) ;
file.ReadString(content.m_strContent, nCount);
m_ContentList.push_back( content );
}
return true;
}
示例2: 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);
}
}
示例3: 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;
}
示例4: 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;
}
示例5: LoadProgressConfigFromFile
void CMedalCfgMgr::LoadProgressConfigFromFile( CFileStream &rFileStream )
{
if ( !rFileStream.IsOpen() )
return;
m_mapMedalProgressCfg.clear();
unsigned short nCount = 0;
rFileStream.ReadUShort( nCount );
for ( unsigned short i = 0; i < nCount; ++i )
{
CMedalProgressCfg processInfo;
if ( processInfo.LoadInfoFromFile( rFileStream ) )
{
m_mapMedalProgressCfg.insert( std::make_pair( processInfo.GetId(), processInfo ) );
}
}
}
示例6: Load
bool ExpConfig::Load(CFileStream&file)
{
file.ReadUShort(m_nLev) ;
file.ReadInt(m_nExp) ;
return true ;
}