Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6980 in orxonox.OLD


Ignore:
Timestamp:
Feb 2, 2006, 1:57:21 PM (18 years ago)
Author:
patrick
Message:

trunk: lenseflares loadable

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/effects/fog_effect.cc

    r6977 r6980  
    3737 FogEffect::FogEffect(const TiXmlElement* root)
    3838{
    39   PRINTF(0)("Fog Effect Created\n");
    4039  this->setClassID(CL_FOG_EFFECT, "FogEffect");
    4140
     
    4443  this->fogStart = 10.0f;
    4544  this->fogEnd = 1000.0f;
    46 
    4745
    4846  if (root != NULL)
     
    5553 */
    5654FogEffect::~FogEffect()
    57 {}
     55{
     56  this->deactivate();
     57}
    5858
    5959
     
    6363void FogEffect::loadParams(const TiXmlElement* root)
    6464{
    65   PRINTF(0)(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.loadParms\n\n");
    66 
    6765  GraphicsEffect::loadParams(root);
    6866
    69    LoadParam(root, "fog-mode", this, FogEffect, setFogMode)
    70        .describe("sets the the fog mode {GL_LINEAR, GL_EXP, GL_EXP2}");
    7167
    72    LoadParam(root, "fog-density", this, FogEffect, setFogDensity)
    73        .describe("sets the the fog density of the exponentionl functions");
     68  LoadParam(root, "fog-mode", this, FogEffect, setFogMode)
     69      .describe("sets the the fog mode {GL_LINEAR, GL_EXP, GL_EXP2}");
    7470
    75    LoadParam(root, "fog-range", this, FogEffect, setFogRange)
    76        .describe("sets the the range of the linear functions");
     71  LoadParam(root, "fog-density", this, FogEffect, setFogDensity)
     72      .describe("sets the the fog density of the exponentionl functions");
     73
     74  LoadParam(root, "fog-range", this, FogEffect, setFogRange)
     75      .describe("sets the the range of the linear functions");
    7776}
    7877
     
    9089bool FogEffect::activate()
    9190{
    92   printf("fog==============================================>>>>>>>>>>>>>>>>>>>>>>>>...\n\n");
    9391  PRINTF(4)( "Enabling Fog Effect, mode: %i, density: %f, start: %f, end: %f\n", this->fogMode, this->fogDensity,
    9492             this->fogStart, this->fogEnd);
  • trunk/src/lib/graphics/effects/lense_flare.cc

    r6976 r6980  
    4646 LenseFlare::LenseFlare(const TiXmlElement* root)
    4747{
    48   if (root != NULL)
    49     this->loadParams(root);
     48  this->setClassID(CL_LENSE_FLARE, "LenseFlare");
    5049
    5150  this->flareMatrix = new float[14];
     
    6059
    6160  this->lightSource = (LightManager::getInstance())->getLight(0);
     61  PRINTF(0)("light is: %p\n", this->lightSource);
     62
     63  if (root != NULL)
     64  {
     65    this->loadParams(root);
     66    this->activate();
     67  }
    6268}
    6369
     
    8187  GraphicsEffect::loadParams(root);
    8288
    83     LoadParam(root, "add-flare-texture", this, LenseFlare, addFlare)
     89  LOAD_PARAM_START_CYCLE(root, element);
     90  {
     91    LoadParam_CYCLE(element, "add-flare-texture", this, LenseFlare, addFlare)
    8492        .describe("adds a lensflare texture to the engine");
    85 }
    86 
     93  }
     94  LOAD_PARAM_END_CYCLE(element);
     95}
    8796
    8897/**
     
    151160    bb->setVisibility(true);
    152161  }
     162  PRINTF(0)("Finished adding\n", textureName);
    153163}
    154164
  • trunk/src/lib/graphics/graphics_engine.cc

    r6979 r6980  
    133133  .describe("loads a graphics effect");
    134134}
     135
     136
     137
     138
     139/**
     140 * @param root The XML-element to load GraphicsEffects from
     141 */
     142void GraphicsEngine::loadGraphicsEffects(const TiXmlElement* root)
     143{
     144  LOAD_PARAM_START_CYCLE(root, element);
     145  {
     146    PRINTF(0)("element is: %s\n", element->Value());
     147    Factory::fabricate(element);
     148  }
     149  LOAD_PARAM_END_CYCLE(element);
     150}
     151
    135152
    136153
     
    711728  }
    712729}
    713 
    714 
    715 /**
    716  * @param root The XML-element to load GraphicsEffects from
    717  */
    718 void GraphicsEngine::loadGraphicsEffects(const TiXmlElement* root)
    719 {
    720   LOAD_PARAM_START_CYCLE(root, element);
    721   {
    722     PRINTF(0)("element is: %s\n", element->Value());
    723     Factory::fabricate(element);
    724   }
    725   LOAD_PARAM_END_CYCLE(element);
    726 }
  • trunk/src/story_entities/simple_game_menu.cc

    r6884 r6980  
    199199    }
    200200  }
    201   this->menuSelected->getNullElement()->update2D(0.0f);
     201  this->menuSelected->getNullElement()->update2D(0.1f);
    202202  this->menuSelectedIndex = 0;
    203203  this->menuSelected = this->menuLayer[0]->menuList[this->menuSelectedIndex];
Note: See TracChangeset for help on using the changeset viewer.