Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/tools/ParticleInterface.cc

    r3301 r3370  
    4343#include "util/Math.h"
    4444#include "core/CoreIncludes.h"
     45#include "core/ConfigValueIncludes.h"
    4546#include "core/GameMode.h"
    46 #include "GraphicsManager.h"
    4747
    4848namespace orxonox
     
    9191    }
    9292
     93    void ParticleInterface::setConfigValues()
     94    {
     95        SetConfigValue(globalDetailLevel_, 2)
     96            .description("O: off, 1: low, 2: normal, 3: high").callback(this, &ParticleInterface::detailLevelChanged);
     97    }
     98
    9399    Ogre::ParticleEmitter* ParticleInterface::createNewEmitter()
    94100    {
     
    180186        this->detaillevel_ = level;
    181187        if (GameMode::showsGraphics())
    182             this->detailLevelChanged(GraphicsManager::getInstance().getDetailLevelParticle());
    183     }
    184 
    185     void ParticleInterface::detailLevelChanged(unsigned int newlevel)
    186     {
    187         if (newlevel >= static_cast<unsigned int>(this->detaillevel_))
     188            this->detailLevelChanged();
     189    }
     190
     191    void ParticleInterface::detailLevelChanged()
     192    {
     193        if (this->globalDetailLevel_ >= this->detaillevel_)
    188194            this->bAllowedByLOD_ = true;
    189195        else
Note: See TracChangeset for help on using the changeset viewer.