Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 25, 2009, 10:23:58 PM (14 years ago)
Author:
rgrieder
Message:

Merged presentation2 branch back to trunk.
Major new features:

  • Actual GUI with settings, etc.
  • Improved space ship steering (human interaction)
  • Rocket fire and more particle effects
  • Advanced sound framework
Location:
code/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/tools/BillboardSet.cc

    r5781 r6417  
    3838#include "util/Convert.h"
    3939#include "util/Math.h"
    40 #include "util/StringUtils.h"
    4140#include "core/GameMode.h"
    4241
     
    8180        catch (...)
    8281        {
    83             COUT(1) << "Error: Couln't load billboard \"" << file << "\"" << std::endl;
     82            COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;
    8483            this->billboardSet_ = 0;
    8584        }
     
    104103        catch (...)
    105104        {
    106             COUT(1) << "Error: Couln't load billboard \"" << file << "\"" << std::endl;
     105            COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;
    107106            this->billboardSet_ = 0;
    108107        }
  • code/trunk/src/libraries/tools/CMakeLists.txt

    r5929 r6417  
    2323  LINK_LIBRARIES
    2424    core
     25    network
    2526  SOURCE_FILES ${TOOLS_SRC_FILES}
    2627)
  • code/trunk/src/libraries/tools/Mesh.cc

    r5781 r6417  
    3636
    3737#include "util/Convert.h"
    38 #include "util/StringUtils.h"
    3938#include "core/GameMode.h"
    4039
     
    8483            catch (...)
    8584            {
    86                 COUT(1) << "Error: Couln't load mesh \"" << meshsource << "\"" << std::endl;
     85                COUT(1) << "Error: Couln't load mesh \"" << meshsource << '"' << std::endl;
    8786                this->entity_ = 0;
    8887            }
  • code/trunk/src/libraries/tools/ParticleInterface.cc

    r5781 r6417  
    6464        this->bAllowedByLOD_ = true;
    6565        this->speedFactor_ = 1.0f;
     66
     67        this->setDetailLevel(static_cast<unsigned int>(detaillevel));
     68
     69        this->setConfigValues();
    6670
    6771        if (GameMode::showsGraphics())
     
    7478            catch (...)
    7579            {
    76                 COUT(1) << "Error: Couln't load particle system \"" << templateName << "\"" << std::endl;
     80                COUT(1) << "Error: Couln't load particle system \"" << templateName << '"' << std::endl;
    7781                this->particleSystem_ = 0;
    7882            }
    7983        }
    80 
    81         this->setDetailLevel(static_cast<unsigned int>(detaillevel));
    8284    }
    8385
  • code/trunk/src/libraries/tools/ResourceLocation.cc

    r5929 r6417  
    9292    {
    9393        // Remove from Ogre paths
    94         resourceGroup_.erase();
     94        resourceGroup_.clear();
    9595        try
    9696        {
  • code/trunk/src/libraries/tools/Shader.cc

    r5781 r6417  
    5757        this->bLoadCompositor_ = GameMode::showsGraphics();
    5858        this->bViewportInitialized_ = false;
    59         this->compositor_ = "";
    60         this->oldcompositor_ = "";
    6159
    6260        if (this->bLoadCompositor_ && Ogre::Root::getSingletonPtr())
     
    7977    Shader::~Shader()
    8078    {
    81 
    82         if (this->bLoadCompositor_ && this->compositorInstance_)
     79        if (this->compositorInstance_ && this->bLoadCompositor_)
    8380        {
    8481            Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
     
    112109            Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
    113110            assert(viewport);
    114             if (this->oldcompositor_ != "")
     111            if (!this->oldcompositor_.empty())
    115112            {
    116113                Ogre::CompositorManager::getSingleton().removeCompositor(viewport, this->oldcompositor_);
    117114                this->compositorInstance_ = 0;
    118115            }
    119             if (this->compositor_ != "")
     116            if (!this->compositor_.empty())
    120117            {
    121118                this->compositorInstance_ = Ogre::CompositorManager::getSingleton().addCompositor(viewport, this->compositor_);
     
    299296                        continue;
    300297
    301                     if (pass_pointer->getFragmentProgramName() != "")
     298                    if (!pass_pointer->getFragmentProgramName().empty())
    302299                    {
    303300                        Ogre::GpuProgramParameters* parameter_pointer = pass_pointer->getFragmentProgramParameters().get();
  • code/trunk/src/libraries/tools/TextureGenerator.cc

    r5781 r6417  
    7272        if (it == colourMap.end())
    7373        {
    74             std::string materialName = textureName + "_Material_" + multi_cast<std::string>(materialCount_s++);
     74            const std::string& materialName = textureName + "_Material_" + multi_cast<std::string>(materialCount_s++);
    7575            Ogre::MaterialPtr material = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().create(materialName, "General"));
    7676            material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
     
    8282        else
    8383        {
    84             return (*it).second;
     84            return it->second;
    8585        }
    8686    }
  • code/trunk/src/libraries/tools/Timer.cc

    r5929 r6417  
    112112        this->deleteExecutor();
    113113    }
    114    
     114
    115115    /**
    116116        @brief Initializes the Timer
  • code/trunk/src/libraries/tools/Timer.h

    r5929 r6417  
    140140        private:
    141141            void init();
    142        
     142
    143143            Executor* executor_;  //!< The executor of the function that should be called when the time expires
    144144
  • code/trunk/src/libraries/tools/interfaces/TimeFactorListener.h

    r5781 r6417  
    3737    class _ToolsExport TimeFactorListener : virtual public OrxonoxClass
    3838    {
    39         friend class GSRoot;
    40 
    4139        public:
    4240            TimeFactorListener();
    4341            virtual ~TimeFactorListener() {}
    4442
     43            static void setTimeFactor( float factor );
     44            static void setTimeFactorInternal( float factor );
     45            static inline float getTimeFactor(){ return TimeFactorListener::timefactor_s; }
     46
    4547        protected:
    4648            virtual void changedTimeFactor(float factor_new, float factor_old) {}
    47             inline float getTimeFactor() const
    48                 { return TimeFactorListener::timefactor_s; }
    4949
    5050        private:
  • code/trunk/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc

    r5781 r6417  
    3737
    3838#include "core/CoreIncludes.h"
     39#include "core/GameMode.h"
     40#include "network/NetworkFunction.h"
    3941
    4042namespace orxonox
     
    4345    // TimeFactorListener
    4446    //----------------------------
     47    registerStaticNetworkFunction( &TimeFactorListener::setTimeFactorInternal );
     48
    4549    float TimeFactorListener::timefactor_s = 1.0f;
    4650
     
    4852    {
    4953        RegisterRootObject(TimeFactorListener);
     54    }
     55
     56    /*static*/ void TimeFactorListener::setTimeFactor( float factor )
     57    {
     58        if ( !GameMode::isStandalone() )
     59            callStaticNetworkFunction( &TimeFactorListener::setTimeFactorInternal, CLIENTID_UNKNOWN, factor );
     60        TimeFactorListener::setTimeFactorInternal(factor);
     61    }
     62
     63    /*static*/ void TimeFactorListener::setTimeFactorInternal( float factor )
     64    {
     65        float oldFactor = TimeFactorListener::timefactor_s;
     66        TimeFactorListener::timefactor_s = factor;
     67        for (ObjectList<TimeFactorListener>::iterator it = ObjectList<TimeFactorListener>::begin(); it != ObjectList<TimeFactorListener>::end(); ++it)
     68            it->changedTimeFactor(factor, oldFactor);
    5069    }
    5170
Note: See TracChangeset for help on using the changeset viewer.