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


C++ setArea函数代码示例

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


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

示例1: switch

bool CPetControl::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
	if (isInputLocked())
		return false;

	bool result = _sections[_currentArea]->VirtualKeyCharMsg(msg);

	if (!result) {
		switch (msg->_keyState.keycode) {
		case Common::KEYCODE_F1:
			result = true;
			setArea(PET_INVENTORY);
			break;
		case Common::KEYCODE_F2:
			result = true;
			setArea(PET_CONVERSATION);
			break;
		case Common::KEYCODE_F3:
			result = true;
			setArea(PET_REMOTE);
			break;
		case Common::KEYCODE_F4:
			result = true;
			setArea(PET_ROOMS);
			break;
		case Common::KEYCODE_F5:
			result = true;
			setArea(PET_REAL_LIFE);
			break;
		default:
			break;
		}
	}

	return result;
}
开发者ID:86400,项目名称:scummvm,代码行数:35,代码来源:pet_control.cpp

示例2: setArea

CGO_Player::CGO_Player ()
{
	ani = NULL;
	shadow = &a_shadow;
	setArea(ea_gameBoard);
	moveAbs(0, 0);

	dx = CGO_Player::dy = 3;
	setActive(false);
	setLifeState(LALIVE);
	setAniDirState(SSTAND, ASOUTH);
	setRunState(XSTAND);
	setColor(cred);
	setType(GOT_PLAYER);
	setName("Unnamed Player");
	setTeam(TEAM_RED);
	dropedBombs = 0;

	powerups[PBOMB ] = BWBOMB;
	powerups[PFLAME ] = BWFLAME;
	powerups[PSKATE ] = BWSKATE;
	powerups[PKICKER ] = BWKICKER;
	powerups[PJELLY ] = BWJELLY;
	powerups[PTRIGGER ] = BWTRIGGER;
	powerups[PPUNCH ] = BWPUNCH;
	powerups[PGRAB ] = BWGRAB;
	powerups[PSPOOGE ] = BWSPOOGE;
	powerups[PGOLDFLAME] = BWGOLDFLAME;
	powerups[PDISEASE ] = BWDISEASE;
	powerups[PDISEASE3 ] = BWDISEASE3;
}
开发者ID:sobotkami,项目名称:openatomic,代码行数:31,代码来源:go_player.cpp

示例3: setArea

//----------------------------------------------------------------------------//
void Element::onNonClientChanged(ElementEventArgs& e)
{
    // TODO: Be less wasteful with this update
    setArea(getArea());

    fireEvent(EventNonClientChanged, e, EventNamespace);
}
开发者ID:AjaxWang1989,项目名称:cegui,代码行数:8,代码来源:Element.cpp

示例4: setArea

//----------------------------------------------------------------------------//
void NullTextureTarget::declareRenderSize(const Size& sz)
{
	Rect r;
	r.setSize(sz);
	r.setPosition(Point(0, 0));
    setArea(r);
}
开发者ID:B2O,项目名称:IV-Network,代码行数:8,代码来源:CEGUINullTextureTarget.cpp

示例5: nullTheData

/**
 * Creates a 3D area based on the supplied start and end points.
 *
 * @param startX the leftmost X position
 * @param startY the topmost Y position
 * @param startZ the frontmost Z position
 * @param endX the rightmost X position
 * @param endY the bottommost Y position
 * @param endZ the backmost Z position
 */
Area3D::Area3D(const Displacement &startX, const Displacement &startY,
               const Displacement &startZ,
               const Displacement &endX, const Displacement &endY,
               const Displacement &endZ) {
    nullTheData();
    setArea(startX, startY, startZ, endX, endY, endZ);
}
开发者ID:jlaura,项目名称:isis3,代码行数:17,代码来源:Area3D.cpp

示例6: setArea

void MI0283QT9::fillCircle(uint16_t x0, uint16_t y0, uint16_t radius, uint16_t color)
{
  int16_t err, x, y;
  
  err = -radius;
  x   = radius;
  y   = 0;

  setArea(0, 0, lcd_width-1, lcd_height-1);

  while(x >= y)
  {
    drawLine(x0 - x, y0 + y, x0 + x, y0 + y, color);
    drawLine(x0 - x, y0 - y, x0 + x, y0 - y, color);
    drawLine(x0 - y, y0 + x, x0 + y, y0 + x, color);
    drawLine(x0 - y, y0 - x, x0 + y, y0 - x, color);

    err += y;
    y++;
    err += y;
    if(err >= 0)
    {
      x--;
      err -= x;
      err -= x;
    }
  }

  return;
}
开发者ID:D4p0up,项目名称:mSD-Shield,代码行数:30,代码来源:MI0283QT9.cpp

示例7: setArea

void CPetControl::addToInventory(CGameObject *item) {
	item->detach();

	if (item->getName() == "CarryParcel") {
		CCarry *child = dynamic_cast<CCarry *>(getLastChild());
		if (child)
			child->detach();

		item->petMoveToHiddenRoom();
		if (!child)
			return;

		item = child;
	}

	item->addUnder(this);
	_inventory.itemsChanged();

	setArea(PET_INVENTORY);
	if (_currentArea == PET_INVENTORY)
		_inventory.highlightItem(item);

	makeDirty();
	CPETGainedObjectMsg msg;
	msg.execute(item);
}
开发者ID:86400,项目名称:scummvm,代码行数:26,代码来源:pet_control.cpp

示例8: setArea

void Radiosity::Reset() {
  delete [] area;
  delete [] undistributed;
  delete [] absorbed;
  delete [] radiance;

  // create and fill the data structures
  num_faces = mesh->numFaces();
  area = new float[num_faces];
  undistributed = new glm::vec3[num_faces];
  absorbed = new glm::vec3[num_faces];
  radiance = new glm::vec3[num_faces];
  for (int i = 0; i < num_faces; i++) {
    Face *f = mesh->getFace(i);
    f->setRadiosityPatchIndex(i);
    setArea(i,f->getArea());
    glm::vec3 emit = f->getMaterial()->getEmittedColor();
    setUndistributed(i,emit);
    setAbsorbed(i,glm::vec3(0,0,0));
    setRadiance(i,emit);
  }

  // find the patch with the most undistributed energy
  findMaxUndistributed();
}
开发者ID:jonwrona,项目名称:ACG-Final,代码行数:25,代码来源:radiosity.cpp

示例9: setArea

void markupText::setText( QString textIn )
{
    text = textIn;

    // Update the area to accommodate the new text
    setArea();
}
开发者ID:andrewrhyder,项目名称:epicsqt,代码行数:7,代码来源:markupText.cpp

示例10: setArea

void DirtyArea::setTextDisplay(const TextDisplay *textDisplay) {
	_bounds.left = textDisplay->_bounds.left;
	_bounds.top = textDisplay->_bounds.top;

	setArea(textDisplay->_bounds.width(), textDisplay->_bounds.height(),
		MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
}
开发者ID:CobaltBlues,项目名称:scummvm,代码行数:7,代码来源:screen.cpp

示例11: transformToWndCoord

	bool FrameWindow::onMouseMove(void)
	{
		if(m_tracking)
		{
			point pt = transformToWndCoord(m_system.getCursor().getPosition());
			point newpos = pt - m_offset;

			Rect testarea(m_area);
			testarea.setPosition(newpos);

			if(m_clampToScreen && m_parent)
			{
				Size me = m_area.getSize();
				Size max = m_parent->getSize();
				if(testarea.m_left < 0.f)
					testarea.m_left = 0.f;
				if(testarea.m_top < 0.f)
					testarea.m_top = 0.f;
				if(testarea.m_right > max.width)
					testarea.m_left = max.width - me.width;
				if(testarea.m_bottom > max.height)
					testarea.m_top = max.height - me.height;

				testarea.setSize(me);
			}
			
			setArea(testarea);

			EventArgs a;
			a.name = "On_Move";
			callHandler(&a);
		}
		return true;
	}
开发者ID:strelkovsky,项目名称:gamegui,代码行数:34,代码来源:framewindow.cpp

示例12: setArea

void GraphicsLib::fillRect(int_least16_t x0, int_least16_t y0, int_least16_t w, int_least16_t h, uint_least16_t color)
{
    uint_least32_t size;

    if(x0   >= lcd_width)  {
        x0 = lcd_width-1;
    }
    if(y0   >= lcd_height) {
        y0 = lcd_height-1;
    }
    if(x0+w >= lcd_width)  {
        w  = lcd_width-x0;
    }
    if(y0+h >= lcd_height) {
        h  = lcd_height-y0;
    }

    setArea(x0, y0, x0+w-1, y0+h-1);

    drawStart();

    for(size=((uint_least32_t)w*h); size!=0; size--)
    {
        draw(color);
    }

    drawStop();

    return;
}
开发者ID:lenjivac123,项目名称:Arduino-Libs,代码行数:30,代码来源:GraphicsLib.cpp

示例13: DEBUG_M

RigidBody::~RigidBody() {
	DEBUG_M("Entering function...");
	setArea(NULL);
	delete body_;
	delete shape_;
	delete motionState_;
}
开发者ID:bagobor,项目名称:tx,代码行数:7,代码来源:RigidBody.cpp

示例14: init_area

//----------------------------------------------------------------------------//
void OgreTextureTarget::declareRenderSize(const Sizef& sz)
{
    // exit if current size is enough
    if ((d_area.getWidth() >= sz.d_width) && (d_area.getHeight() >=sz.d_height))
        return;

    Ogre::TexturePtr rttTex = Ogre::TextureManager::getSingleton().createManual(
        OgreTexture::getUniqueName(),
        Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
        Ogre::TEX_TYPE_2D, sz.d_width, sz.d_height, 1, 0, Ogre::PF_A8R8G8B8,
        Ogre::TU_RENDERTARGET);

    d_renderTarget = rttTex->getBuffer()->getRenderTarget();

    Rectf init_area(
        Vector2f(0, 0),
        Sizef(d_renderTarget->getWidth(), d_renderTarget->getHeight())
    );

    setArea(init_area);

    // delete viewport and reset ptr so a new one is generated.  This is
    // required because we have changed d_renderTarget so need a new VP also.
    delete d_viewport;
    d_viewport = 0;

    // because Texture takes ownership, the act of setting the new ogre texture
    // also ensures any previous ogre texture is released.
    d_CEGUITexture->setOgreTexture(rttTex, true);

    clear();
}
开发者ID:AjaxWang1989,项目名称:cegui,代码行数:33,代码来源:TextureTarget.cpp

示例15: setArea

//----------------------------------------------------------------------------//
void NullTextureTarget::declareRenderSize(const Sizef& sz)
{
	Rectf r;
	r.setSize(sz);
    r.setPosition(glm::vec2(0, 0));
    setArea(r);
}
开发者ID:OpenTechEngine-Libraries,项目名称:CEGUI,代码行数:8,代码来源:TextureTarget.cpp


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