Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10092 in orxonox.OLD for branches/playability/src


Ignore:
Timestamp:
Dec 18, 2006, 8:39:38 PM (18 years ago)
Author:
muellmic
Message:

work of last week: radar set-up, Gui- Widget class draws itself according to Dir of 2d- element.

Location:
branches/playability/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/lib/gui/gl/glgui_widget.cc

    r9869 r10092  
    915915  }
    916916
     917  void GLGuiWidget::beginDraw() const
     918  {
     919    glPushMatrix();
     920    glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
     921    glRotatef(this->getAbsDir2D(), 0, 0, 1);
     922  }
     923
    917924
    918925}
  • branches/playability/src/lib/gui/gl/glgui_widget.h

    r9869 r10092  
    244244
    245245    /// RENDERING
    246     inline void beginDraw() const { glPushMatrix(); glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0); };
     246    void beginDraw() const;
    247247    inline void endDraw() const { glPopMatrix(); };
    248248
  • branches/playability/src/util/hud.cc

    r10042 r10092  
    105105  {
    106106    this->energyWidget->show();
    107     this->energyWidget->setBackgroundTexture( "hud_energy_background.png");
     107    //this->energyWidget->setBackgroundTexture( "hud_energy_background.png");
     108    this->energyWidget->shiftDir2D(270);
    108109    /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
    109110        this->energyWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
     
    219220    PRINTF(4)("UPDATING RADAR\n");
    220221    this->_radar->setCenterNode(State::getPlayer()->getPlayable());
    221     this->_radar->addEntityList(&State::getObjectManager()->getEntityList((OM_LIST)(State::getPlayer()->getPlayable()->getOMListNumber()+1)), Color(.4, .4, 1.0));
    222     this->_radar->addEntityList(&State::getObjectManager()->getEntityList(OM_GROUP_02), Color(1.0, .2, .2));
     222    //this->_radar->addEntityList(&State::getObjectManager()->getEntityList((OM_LIST)(State::getPlayer()->getPlayable()->getOMListNumber()+1)), Color(.4, .4, 1.0));
     223    this->_radar->addEntityList(&State::getObjectManager()->getEntityList(OM_GROUP_00), Color(1, 0, 0));
     224    this->_radar->addEntityList(&State::getObjectManager()->getEntityList(OM_GROUP_01), Color(0, 0, 1));
    223225    this->_radar->setAbsCoor2D(0.8 * this->resX, 0.01 * this->resY);
    224226    this->_radar->setWidgetSize(0.2 * this->resX, 0.2 * this->resY);
     
    230232  if (this->energyWidget != NULL)
    231233  {
    232     this->energyWidget->setAbsCoor2D(0.0 * this->resX, 0.85 * this->resY);
     234    this->energyWidget->setAbsCoor2D(0.2 * this->resX, 0.85 * this->resY);
    233235    this->energyWidget->setWidgetSize(.25 * this->resX, 0.1 * this->resY);
    234236  }
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10081 r10092  
    953953      PRINTF(4)("Playmode %s Not Implemented in %s\n", Playable::playmodeToString(this->getPlaymode()).c_str(), this->getClassCName());
    954954  }
     955 
     956  this->travelNode->shiftCoor(Vector(this->cameraSpeed * dt, 0, 0));
     957  this->shiftCoor (this->velocity * dt);
     958 
     959  float angle = this->velocity.z / travelSpeed * pi / 3;
     960  if (angle > pi/4) angle = pi/4;
     961  if (angle < -pi/4) angle = -pi/4;
     962  this->setRelDirSoft(Quaternion(angle, Vector(1,0,0)), 5.0f);
    955963}
    956964
Note: See TracChangeset for help on using the changeset viewer.