Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10491 in orxonox.OLD for trunk/src/world_entities/effects


Ignore:
Timestamp:
Jan 30, 2007, 1:13:28 AM (18 years ago)
Author:
patrick
Message:

merged blinki branche back to trunk

Location:
trunk/src/world_entities/effects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/effects/billboard.cc

    r10473 r10491  
    154154  // changes the color of the texture (if any is set)
    155155  if(this->texColor != NULL)
    156     glColor4ub((GLubyte)this->texColor->r()*255, (GLubyte)this->texColor->g()*255, (GLubyte)this->texColor->b()*255, (GLubyte)(this->texColor->a()*255));
     156    glColor4ub((GLubyte)(this->texColor->r()*255.0f), (GLubyte)(this->texColor->g()*255.0f), (GLubyte)(this->texColor->b()*255.0f), (GLubyte)(this->texColor->a()*255));
    157157
    158158  glBegin(GL_QUADS);
  • trunk/src/world_entities/effects/blink.cc

    r10445 r10491  
    3838  // calculation of the symbolTime
    3939  this->symbolTime = this->period / this->blinkSequence.length();
     40  //PRINTF(0)("\n\n\nperiod: %f\n\n\n", this->period);
    4041}
    4142
     
    8081  this->timer = 0;
    8182  this->seqCounter = 0;
     83
     84  // ugly hack continued
     85  this->setCoor = true;
    8286}
    8387
     
    9195  WorldEntity::loadParams(root);
    9296
    93   LoadParam(root, "position", this, Blink, setPosition);
     97  LoadParam(root, "position", this, Blink, PNode::setAbsCoor);
    9498  LoadParam(root, "size", this, Blink, setSize);
    9599  LoadParam(root, "color", this, Blink, setColor);
     
    105109void Blink::tick(float dt)
    106110{
     111  // ugly hack continued, set absCoor only once
     112  if(this->setCoor) {
     113    this->bBoard->setAbsCoor(this->getAbsCoor());
     114    this->setCoor = false;
     115    this->symbolTime = this->period / this->blinkSequence.length();
     116  }
     117
    107118  timer += dt;
    108119
  • trunk/src/world_entities/effects/blink.h

    r10445 r10491  
    3636    void loadParams(const TiXmlElement* root);
    3737
    38     void setPosition(float x, float y, float z) { this->bBoard->setAbsCoor(x, y, z); }
     38    //void setAbsCoor(const Vector& absCoor) { this->bBoard->setAbsCoor(absCoor); }
     39    //void setAbsCoor(float x, float y, float z) { this->bBoard->setAbsCoor(x, y, z); }
     40    //void setPosition(float x, float y, float z) { this->bBoard->setAbsCoor(x, y, z); }
    3941    void setSize(float s) { this->size = s; this->bBoard->setSize(this->size, this->size); }
    4042    void setPeriod(float t) { this->period = t; }
     
    5658    float             symbolTime;       //! defines how long one symbol of the sequence will be shown in sec
    5759    float             timer;
     60    bool              setCoor;          // this is a really ugly hack
    5861};
    5962
Note: See TracChangeset for help on using the changeset viewer.