Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 728


Ignore:
Timestamp:
Dec 30, 2007, 6:56:58 PM (16 years ago)
Author:
nicolasc
Message:
  • various cleanup
  • improved readability in PI
  • fixed iterator in language
Location:
code/branches/FICN
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/CMakeLists.txt

    r727 r728  
    1 
    21PROJECT(Orxonox)
    32#set some global variables, which are used throughout the project
     
    5857
    5958
    60 
    6159#This sets where to look for "Find*.cmake" files
    6260SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
  • code/branches/FICN/src/audio/CMakeLists.txt

    r665 r728  
    1818ENDIF(WIN32)
    1919
    20 TARGET_LINK_LIBRARIES(audio ${OPENAL_LIBRARY} ${ALUT_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})
     20TARGET_LINK_LIBRARIES(
     21  audio
     22  ${OPENAL_LIBRARY}
     23  ${ALUT_LIBRARY}
     24  ${VORBISFILE_LIBRARY}
     25  ${VORBISENC_LIBRARY}
     26  ${VORBIS_LIBRARY}
     27  ${OGG_LIBRARY}
     28)
    2129
    2230
  • code/branches/FICN/src/misc/testing/TestConverter.cpp

    r727 r728  
    44int main(int argc, char** argv)
    55{
    6   int input = 5;
     6  int input = rand();
    77  std::string sub;
    88  int output = 0;
  • code/branches/FICN/src/orxonox/core/CorePrereqs.h

    r708 r728  
    2727
    2828/**
    29  @file  OrxonoxPrereq.cc
     29 @file  OrxonoxPrereq.h
    3030 @brief Contains all the necessary forward declarations for all classes, structs and enums.
    3131 */
  • code/branches/FICN/src/orxonox/core/Language.cc

    r725 r728  
    142142
    143143        // Make sure we don't create a duplicate entry
    144         if (!it->second)
     144        if (it == this->languageEntries_.end())
    145145        {
    146146            LanguageEntry* newEntry = new LanguageEntry(entry);
     
    161161    void Language::addEntry(const LanguageEntryName& name, const std::string& entry)
    162162    {
     163        COUT(5) << "Called addEntry with\n  name: " << name << "\n  entry: " <<  entry << std::endl;
    163164        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
    164         if (!it->second)
     165        if (it == this->languageEntries_.end())
    165166        {
    166167            // The entry isn't available yet, meaning it's new, so create it
     
    180181        // Write the default language file because either a new entry was created or an existing entry has changed
    181182        this->writeDefaultLanguageFile();
     183
    182184    }
    183185
     
    190192    {
    191193        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
    192         if (it->second)
     194        if (it != this->languageEntries_.end())
    193195            return it->second->getTranslation();
    194196        else
     
    294296
    295297                    // Check if the entry exists
    296                     if (it->second)
     298                    if (it != this->languageEntries_.end())
    297299                        it->second->setTranslation(lineString.substr(pos + 1));
    298300                    else
  • code/branches/FICN/src/orxonox/core/Language.h

    r725 r728  
    6363            void setDefault(const std::string& fallbackEntry);
    6464
    65             /** @brief Returns the translated entry in the configured language. @return The translated entry */
     65            /**
     66              @brief Returns the translated entry in the configured language.
     67              @return The translated entry
     68            */
    6669            inline const std::string& getTranslation()
    6770                { return this->translatedEntry_; }
    6871
    69             /** @brief Returns the default entry. @return The default entry */
     72            /**
     73              @brief Returns the default entry.
     74              @return The default entry
     75            */
    7076            inline const std::string& getDefault()
    7177                { return this->fallbackEntry_; }
  • code/branches/FICN/src/orxonox/objects/NPC.h

    r708 r728  
    4242      static int const ALIGNMENTDISTANCE = 300;  //detectionradius of alignment
    4343      static int const COHESIONDISTANCE = 5000;  //detectionradius of cohesion
    44       static int const ANZELEMENTS = 9;  //number of elements
     44      static int const NUMELEMENTS = 9;  //number of elements
    4545  };
    4646
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.cc

    r715 r728  
    6767  {
    6868    //Abgleichen der anderen Emitter an die Variabeln
    69     for (int i=1; i<numberOfEmitters_; i++) {
     69    for (int i=1; i < numberOfEmitters_; i++) {
    7070      particleSystem_->getEmitter(i)->setColour( colour_ );
    7171      particleSystem_->getEmitter(i)->setTimeToLive( distance_ );
     
    130130  void ParticleInterface::setDirection ( Vector3 direction )
    131131  {
    132     for(int i=0; i<numberOfEmitters_; i++) {
     132    for(int i=0; i < numberOfEmitters_; i++) {
    133133      particleSystem_->getEmitter(i)->setDirection(direction);
    134134    }
     
    137137  void ParticleInterface::switchEnable(){
    138138    bool enable=(!(particleSystem_->getEmitter(0)->getEnabled()));
    139     for(int i=0; i<numberOfEmitters_; i++) {
     139    for(int i=0; i < numberOfEmitters_; i++) {
    140140      particleSystem_->getEmitter(i)->setEnabled(enable);
    141141    }
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.h

    r716 r728  
    2828    ~ParticleInterface( void );
    2929
    30     void inline addToSceneNode( Ogre::SceneNode* sceneNode ) { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
    31     void inline detachFromSceneNode( void ) { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
     30    inline void addToSceneNode( Ogre::SceneNode* sceneNode )
     31        { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
     32    inline void detachFromSceneNode( void )
     33        { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
    3234
    3335    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
     
    3537
    3638    Vector3 getPositionOfEmitter ( int emitterNr );
    37     inline void setPositionOfEmitter ( int emitterNr, Vector3 position ) { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
     39    inline void setPositionOfEmitter ( int emitterNr, Vector3 position )
     40        { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
    3841
    39     inline Vector3 getDirection ( void ) { return particleSystem_->getEmitter(0)->getDirection(); };
     42    inline Vector3 getDirection ( void )
     43        { return particleSystem_->getEmitter(0)->getDirection(); };
    4044    void setDirection ( Vector3 direction );
    4145
    42     inline Real getVelocity() {return velocity_; };
     46    inline Real getVelocity()
     47        {return velocity_; };
    4348    void setVelocity( Real v );
    4449
    45     inline int getRate() { return rate_; };
     50    inline int getRate()
     51      { return rate_; };
    4652    void setRate( int r );
    4753
    48     inline Real getDistance() { return distance_; };
     54    inline Real getDistance()
     55        { return distance_; };
    4956    void setDistance( Real d );
    5057
    51     inline ColourValue getColour( void ) {return colour_;};
     58    inline ColourValue getColour( void )
     59        {return colour_;};
    5260    void setColour( ColourValue colour );
    5361
    5462    void switchEnable();
    5563
    56     inline Ogre::ParticleSystem* getParticleSystem() { return this->particleSystem_; };
     64    inline Ogre::ParticleSystem* getParticleSystem()
     65        { return this->particleSystem_; };
    5766
    5867  private:
Note: See TracChangeset for help on using the changeset viewer.