Exemple #1
0
void MacWindowManager::removeMarked() {
	if (!_needsRemoval) return;

	Common::List<BaseMacWindow *>::const_iterator it;
	for (it = _windowsToRemove.begin(); it != _windowsToRemove.end(); it++) {
		removeFromStack(*it);
		removeFromWindowList(*it);
		delete *it;
		_activeWindow = 0;
		_fullRefresh = true;
	}
	_windowsToRemove.clear();
	_needsRemoval = false;
	_lastId = _windows.size();
}
void drawB(float x, float y, float z){
  if(Aisclippingwindow && (posB == 0 || posB == 1))
  	return;
  addToStack();
    translate(x, y, z);
    if(Aisclippingwindow)
    {
      if(posB == 2)
      {
        translate(-0.5, -3.0, 0.0);
        Bpart(RED);
      }
      else if(posB == 3)
      {
        translate(-0.5, 0.0, 0.0);
        Bpart(BLUE);
      }
          else if(posB == 4)
      {
        translate(-0.5, 3.0, 0.0);
        Bpart(GREEN);
      }
    }
    else
    {
      translate(-0.5, -3.0, 0.0);
      Bpart(RED);
      translate(0.0, 3.0, 0.0);
      Bpart(BLUE);
      translate(0.0, 3.0, 0.0);
      Bpart(GREEN);
      translate(0.5, 1.5, 0.0);
      Bgreencap;
      translate(0.0, -9.0, 0.0);
      Bredcap;
    }
  removeFromStack();
}
void drawA(float x, float y, float z){
  addToStack();
    translate(x, y, z);
    addToStack();
      translate(2.5, 0.0, 0.0);
      addRectangle(vertex(0.0, 1.5, 2.5), vertex(0.0, -1.5, 2.5), YELLOW);
      translate(-5.0, 0.0, 0.0);
      addRectangle(vertex(0.0, -1.5, 2.5), vertex(0.0, 1.5, 2.5), YELLOW);
    removeFromStack();
    addToStack();
      translate(0.5, 0.0, 0.0);
      addRectangle(vertex(0.0, -1.5, 0.5), vertex(0.0, 1.5, 0.5), GREY);
      translate(-1.0, 0.0, 0.0);
      addRectangle(vertex(0.0, 1.5, 0.5), vertex(0.0, -1.5, 0.5), GREY);
    removeFromStack();
    addToStack();
      translate(0.0, 0.0, 2.5);
      addRectangle(vertex(-2.5, 1.5, 0.0), vertex(-2.5, -1.5, 0.0), YELLOW);
      translate(0.0, 0.0, -5.0);
      addRectangle(vertex(-2.5, -1.5, 0.0), vertex(-2.5, 1.5, 0.0), YELLOW);
    removeFromStack();
    addToStack();
      translate(0.0, 0.0, 0.5);
      addRectangle(vertex(-0.5, -1.5, 0.0), vertex(-0.5, 1.5, 0.0), GREY);
      translate(0.0, 0.0, -1.0);
      addRectangle(vertex(-0.5, 1.5, 0.0), vertex(-0.5, -1.5, 0.0), GREY);
    removeFromStack();
    addToStack();
      translate(1.5, 1.5, 0.0);
      addRectangle(vertex(-1.0, 0.0, -0.5), vertex(-1.0, 0.0, 0.5), YELLOW);
      addToStack();
        translate(0.0, -3.0, 0.0);
        addRectangle(vertex(-1.0, 0.0, 0.5), vertex(-1.0, 0.0, -0.5), YELLOW);
      removeFromStack();
      translate(-3.0, 0.0, 0.0);
      addRectangle(vertex(-1.0, 0.0, -0.5), vertex(-1.0, 0.0, 0.5), YELLOW);
      addToStack();
        translate(0.0, -3.0, 0.0);
        addRectangle(vertex(-1.0, 0.0, 0.5), vertex(-1.0, 0.0, -0.5), YELLOW);
      removeFromStack();
    removeFromStack();
    addToStack();
      translate(0.0, 1.5, 1.5);
      addRectangle(vertex(-2.5, 0.0, -1.0), vertex(-2.5, 0.0, 1.0), YELLOW);
      addToStack();
        translate(0.0, -3.0, 0.0);
        addRectangle(vertex(-2.5, 0.0, 1.0), vertex(-2.5, 0.0, -1.0), YELLOW);
      removeFromStack();
      translate(0.0, 0.0, -3.0);
      addRectangle(vertex(-2.5, 0.0, -1.0), vertex(-2.5, 0.0, 1.0), YELLOW);
      addToStack();
        translate(0.0, -3.0, 0.0);
        addRectangle(vertex(-2.5, 0.0, 1.0), vertex(-2.5, 0.0, -1.0), YELLOW);
      removeFromStack();
    removeFromStack();
  removeFromStack();
}