• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ InitTop函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中InitTop函数的典型用法代码示例。如果您正苦于以下问题:C++ InitTop函数的具体用法?C++ InitTop怎么用?C++ InitTop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了InitTop函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ASSERT

void MotionMaster::UpdateMotion(uint32 diff) {
	if (i_owner->HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) // what about UNIT_STAT_DISTRACTED? Why is this not included?
		return;
	ASSERT(!empty());
	m_cleanFlag |= MMCF_UPDATE;
	if (!top()->Update(*i_owner, diff)) {
		m_cleanFlag &= ~MMCF_UPDATE;
		MovementExpired();
	} else
		m_cleanFlag &= ~MMCF_UPDATE;

	if (m_expList) {
		for (size_t i = 0; i < m_expList->size(); ++i) {
			MovementGenerator* mg = (*m_expList)[i];
			DirectDelete(mg);
		}

		delete m_expList;
		m_expList = NULL;

		if (empty())
			Initialize();
		else if (needInitTop())
			InitTop();
		else if (m_cleanFlag & MMCF_RESET)
			top()->Reset(*i_owner);

		m_cleanFlag &= ~MMCF_RESET;
	}
}
开发者ID:FrenchCORE,项目名称:Server,代码行数:30,代码来源:MotionMaster.cpp


示例2: VP8IteratorReset

void VP8IteratorReset(VP8EncIterator* const it) {
  VP8Encoder* const enc = it->enc_;
  VP8IteratorSetRow(it, 0);
  VP8IteratorSetCountDown(it, enc->mb_w_ * enc->mb_h_);  // default
  InitTop(it);
  memset(it->bit_count_, 0, sizeof(it->bit_count_));
  it->do_trellis_ = 0;
}
开发者ID:peirick,项目名称:VS2015_Tesseract,代码行数:8,代码来源:iterator.c


示例3: QDialog

FramelessWin2::FramelessWin2(QWidget *parent,QString s) :
    QDialog(parent),m_info(s)
{
    setWindowFlags(Qt::FramelessWindowHint);
    m_movePoint = QPoint(0,0);
    m_pressed = false;
    setAttribute(Qt::WA_TranslucentBackground);
    m_padding = 5;
    m_direct = UNKOWN;
    setMouseTracking(true);
    InitTop();
    resize(310,450);
}
开发者ID:ycsoft,项目名称:SafeThrough,代码行数:13,代码来源:framelesswin2.cpp


示例4: while

void MotionMaster::DirectClean(bool reset)
{
    while (size() > 1)
    {
        MovementGenerator *curr = top();
        pop();
        if (curr) DirectDelete(curr);
    }

    if (needInitTop())
        InitTop();
    else if (reset)
        top()->Reset(*_owner);
}
开发者ID:Bluedead,项目名称:SkyFireEMU,代码行数:14,代码来源:MotionMaster.cpp


示例5: DirectDelete

void MotionMaster::ClearExpireList()
{
    for (auto itr : _expireList)
        DirectDelete(itr);

    _expireList.clear();

    if (empty())
        Initialize();
    else if (NeedInitTop())
        InitTop();
    else if (_cleanFlag & MOTIONMMASTER_CLEANFLAG_RESET)
        top()->Reset(_owner);

    _cleanFlag &= ~MOTIONMMASTER_CLEANFLAG_RESET;
}
开发者ID:m-uu,项目名称:ElunaTrinityWotlk,代码行数:16,代码来源:MotionMaster.cpp


示例6: top

void MotionMaster::DirectExpire(bool reset) {
	if (size() > 1) {
		MovementGenerator *curr = top();
		pop();
		removeEmptyTops();
		DirectDelete(curr);
	}

	while (!top())
		--i_top;

	if (empty())
		Initialize();
	else if (needInitTop())
		InitTop();
	else if (reset)
		top()->Reset(*i_owner);
}
开发者ID:FrenchCORE,项目名称:Server,代码行数:18,代码来源:MotionMaster.cpp


示例7: DirectDelete

void MotionMaster::ClearExpireList()
{
    for (size_t i = 0; i < _expireList->size(); ++i)
    {
        MovementGenerator* mg = (*_expireList)[i];
        DirectDelete(mg);
    }

    delete _expireList;
    _expireList = nullptr;

    if (empty())
        Initialize();
    else if (NeedInitTop())
        InitTop();
    else if (_cleanFlag & MMCF_RESET)
        top()->Reset(_owner);

    _cleanFlag &= ~MMCF_RESET;
}
开发者ID:martial69320,项目名称:cerberus,代码行数:20,代码来源:MotionMaster.cpp


示例8: ASSERT

void MotionMaster::UpdateMotion(uint32 diff)
{
    if (!_owner)
        return;

    if (_owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) // what about UNIT_STATE_DISTRACTED? Why is this not included?
        return;

    ASSERT(!empty());

    _cleanFlag |= MMCF_UPDATE;
    if (!top()->Update(_owner, diff))
    {
        _cleanFlag &= ~MMCF_UPDATE;
        MovementExpired();
    }
    else
        _cleanFlag &= ~MMCF_UPDATE;

    if (!_expList.empty())
    {
        for (ExpireList::iterator i = _expList.begin(); i != _expList.end(); ++i)
            DirectDelete(*i);

        _expList.clear();

        if (empty())
            Initialize();
        else if (needInitTop())
            InitTop();
        else if (_cleanFlag & MMCF_RESET)
            top()->Reset(_owner);

        _cleanFlag &= ~MMCF_RESET;
    }

#if 0
    // probably not the best place to pu this but im not really sure where else to put it.
    _owner->UpdateUnderwaterState(_owner->GetMap(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ());
#endif
}
开发者ID:Exodius,项目名称:chuspi,代码行数:41,代码来源:MotionMaster.cpp


示例9: assert

void
MotionMaster::UpdateMotion(uint32 diff)
{
    if( i_owner->hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED) )
        return;
    assert( !empty() );
    m_cleanFlag |= MMCF_UPDATE;
    if (!top()->Update(*i_owner, diff))
    {
        m_cleanFlag &= ~MMCF_UPDATE;
        MovementExpired();
    }
    else
        m_cleanFlag &= ~MMCF_UPDATE;

    if (m_expList)
    {
        for (int i = 0; i < m_expList->size(); ++i)
        {
            MovementGenerator* mg = (*m_expList)[i];
            DirectDelete(mg);
        }

        delete m_expList;
        m_expList = NULL;

        if(empty())
            Initialize();
        else if(needInitTop())
            InitTop();
        else if (m_cleanFlag & MMCF_RESET)
            top()->Reset(*i_owner);

        m_cleanFlag &= ~MMCF_RESET;
    }
}
开发者ID:pfchrono,项目名称:mangos-mods,代码行数:36,代码来源:MotionMaster.cpp


示例10: while

void
MotionMaster::Initialize()
{
    // clear ALL movement generators (including default)
    while(!empty())
    {
        MovementGenerator *curr = top();
        pop();
        if(curr) DirectDelete(curr);
    }

    // set new default movement generator
    if(i_owner->GetTypeId() == TYPEID_UNIT)
    {
        MovementGenerator* movement = FactorySelector::selectMovementGenerator((Creature*)i_owner);
        push(  movement == NULL ? &si_idleMovement : movement );
        InitTop();
    }
    else
    {
        push(&si_idleMovement);
        needInit[MOTION_SLOT_IDLE] = false;
    }
}
开发者ID:Bootz,项目名称:TC-One,代码行数:24,代码来源:MotionMaster.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ InitTrigger函数代码示例发布时间:2022-05-30
下一篇:
C++ InitTooltipManager函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap