当前位置: 首页>>代码示例>>C++>>正文


C++ CFileStream::ReadUShort方法代码示例

本文整理汇总了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;
}
开发者ID:yzfrs,项目名称:ddianle_d1,代码行数:29,代码来源:MagicLampConfig.cpp

示例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);
    }
}
开发者ID:yzfrs,项目名称:ddianle_d1,代码行数:30,代码来源:PetExchangeInfo.cpp

示例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;
}
开发者ID:yzfrs,项目名称:ddianle_d1,代码行数:21,代码来源:AuctionGoodsInfo.cpp

示例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;
}
开发者ID:yzfrs,项目名称:ddianle_d1,代码行数:13,代码来源:BigMamaConfig.cpp

示例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 ) );
        }
    }
}
开发者ID:yzfrs,项目名称:ddianle_d1,代码行数:20,代码来源:MedalCfgMgr.cpp

示例6: Load

bool ExpConfig::Load(CFileStream&file)
{
    file.ReadUShort(m_nLev) ;
    file.ReadInt(m_nExp) ;
    return true ;
}
开发者ID:yzfrs,项目名称:ddianle_d1,代码行数:6,代码来源:ExpConfig.cpp


注:本文中的CFileStream::ReadUShort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。