Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10449 in orxonox.OLD


Ignore:
Timestamp:
Jan 28, 2007, 5:46:16 PM (17 years ago)
Author:
patrick
Message:

drawing track is now loadable, merge from branche playability

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/hud.cc

    r10420 r10449  
    129129    //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setStandardSettings();
    130130    this->energyWidget->setParent2D(this->leftRect);
     131    dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedImage("textures/gui/gui_electronics_icon.png");
    131132    this->energyWidget->show();
    132133    /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
     
    157158    //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->shieldWidget)->setStandardSettings();
    158159    this->shieldWidget->setParent2D(this->leftRect);
     160    dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->shieldWidget)->setDisplayedImage("textures/gui/gui_shield_icon.png");
    159161    this->shieldWidget->show();
    160162    /*    this->shieldWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
     
    187189    //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->armorWidget)->setStandardSettings();
    188190    this->armorWidget->setParent2D(this->leftRect);
     191    dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->armorWidget)->setDisplayedImage("textures/gui/gui_health_icon.png");
    189192    this->armorWidget->show();
    190193    /*    this->armorWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
  • trunk/src/util/track/track.cc

    r10424 r10449  
    9393           LoadParam_CYCLE(element, "mode", this, Track, setMode)
    9494             .describe("Sets mode of track behavior");
    95 
    9695     }
    9796     LOAD_PARAM_END_CYCLE(element);
  • trunk/src/world_entities/camera.cc

    r10410 r10449  
    231231void Camera::draw() const
    232232{
    233   if( this->entityTrack != NULL)
     233  if( this->entityTrack != NULL && this->isDrawTrack())
    234234    this->entityTrack->drawGraph();
    235235}
  • trunk/src/world_entities/npcs/npc.cc

    r10448 r10449  
    271271void NPC::draw() const
    272272{
     273 if( this->entityTrack != NULL && this->isDrawTrack())
     274  this->entityTrack->drawGraph();
     275
    273276 WorldEntity::draw();
    274   if( this->entityTrack != NULL)
    275     this->entityTrack->drawGraph();
    276 }
     277}
  • trunk/src/world_entities/space_ships/space_ship.cc

    r10420 r10449  
    490490void SpaceShip::draw () const
    491491{
    492   if( this->entityTrack != NULL)
     492  if( this->entityTrack != NULL && this->isDrawTrack())
    493493    this->entityTrack->drawGraph();
    494494
  • trunk/src/world_entities/world_entity.cc

    r10391 r10449  
    9494  // Track of this entity
    9595  this->entityTrack = NULL;
     96  this->bDrawTrack = false;
    9697
    9798  // registering default reactions:
     
    168169  LoadParam(root, "list", this, WorldEntity, toListS);
    169170
     171  LoadParam(root, "drawTrack", this, WorldEntity, drawDebugTrack)
     172      .describe("draws the track for debugging purposes");
    170173
    171174  // Track
  • trunk/src/world_entities/world_entity.h

    r10391 r10449  
    185185    //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
    186186
     187  inline void drawDebugTrack(int flag) { this->bDrawTrack = (bool)flag; }
     188  inline bool isDrawTrack() const { return this->bDrawTrack; }
     189
    187190
    188191private:
     
    240243  Vector                  velocity;                        //!< speed of the entity
    241244  Track*                  entityTrack;                     //!< this is the track this entity follows (or NULL if none)
     245  bool                    bDrawTrack;                      //!< if true draws the debug track
    242246
    243247};
Note: See TracChangeset for help on using the changeset viewer.