Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10433 in orxonox.OLD for trunk


Ignore:
Timestamp:
Jan 28, 2007, 12:01:34 PM (18 years ago)
Author:
patrick
Message:

merged blinki into trunk

Location:
trunk/src/world_entities
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/WorldEntities.am

    r10422 r10433  
    9898                \
    9999                world_entities/effects/lightning_bolt.cc \
     100                world_entities/effects/blink.cc \
    100101                \
    101102                world_entities/script_trigger.cc \
     
    228229                \
    229230                effects/lightning_bolt.h \
     231                effects/blink.h \
    230232                \
    231233                script_trigger.h \
  • trunk/src/world_entities/effects/billboard.cc

    r10114 r10433  
    2424
    2525
    26 
     26#include "debug.h"
    2727
    2828
     
    6666  //this->setVisibiliy(true);
    6767  this->setSize(5, 5);
     68
     69  this->texColor = NULL;
    6870}
    6971
     
    147149//v += this->getAbsCoor();
    148150    //PRINTF(0)("sizeX: %f sizeY: %f\n", sizeX, sizeY);
     151
     152  // changes the color of the texture (if any is set)
     153  if(this->texColor != NULL)
     154    glColor4ub((GLubyte)this->texColor->r()*255, (GLubyte)this->texColor->g()*255, (GLubyte)this->texColor->b()*255, (GLubyte)(this->texColor->a()*255));
     155
    149156  glBegin(GL_QUADS);
    150157  glTexCoord2f(0.0f, 0.0f);
     
    171178  glPopAttrib();
    172179}
     180
     181
     182/**
     183 * changes the texture color
     184 * @param col color for the texture
     185 */
     186void Billboard::colorTexture(const Color col)
     187{
     188  this->texColor = new Color(col.r(), col.g(), col.b(), col.a());
     189}
  • trunk/src/world_entities/effects/billboard.h

    r9869 r10433  
    1010class Material;
    1111class TiXmlElement;
     12class Color;
    1213
    1314class Billboard : public WorldEntity
     
    2324    void setSize(float sizeX, float sizeY);
    2425    void setTexture(const std::string& textureFile);
     26    void colorTexture(const Color col);
    2527
    2628    virtual void tick(float dt);
     
    2931  private:
    3032    Material*        material;
     33    Color*           texColor;
    3134    float sizeX;
    3235    float sizeY;
Note: See TracChangeset for help on using the changeset viewer.