Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2009, 12:36:08 AM (16 years ago)
Author:
dafrick
Message:

Merging of the current QuestSystem branch.

Location:
code/branches/questsystem5
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem5

  • code/branches/questsystem5/src/orxonox/tools/BillboardSet.cc

    r2662 r2907  
    3737#include <OgreBillboard.h>
    3838
    39 #include "core/Core.h"
     39#include "core/GameMode.h"
    4040#include "util/Convert.h"
    4141#include "util/String.h"
     
    7272        try
    7373        {
    74             if (Core::showsGraphics())
     74            if (GameMode::showsGraphics())
    7575            {
    7676                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
     
    9595        try
    9696        {
    97             if (Core::showsGraphics())
     97            if (GameMode::showsGraphics())
    9898            {
    9999                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
  • code/branches/questsystem5/src/orxonox/tools/CMakeLists.txt

    r2710 r2907  
    55  Shader.cc
    66  TextureGenerator.cc
     7  TimeFactorListener.cc
    78  Timer.cc
    89  WindowEventListener.cc
  • code/branches/questsystem5/src/orxonox/tools/Mesh.cc

    r2662 r2907  
    3535#include <cassert>
    3636
    37 #include "core/Core.h"
     37#include "core/GameMode.h"
    3838#include "util/Convert.h"
    3939#include "util/String.h"
     
    6464            this->scenemanager_->destroyEntity(this->entity_);
    6565
    66         if (Core::showsGraphics())
     66        if (GameMode::showsGraphics())
    6767        {
    6868            try
     
    7070                this->entity_ = this->scenemanager_->createEntity("Mesh" + convertToString(Mesh::meshCounter_s++), meshsource);
    7171                this->entity_->setCastShadows(this->bCastShadows_);
     72
     73                this->entity_->setNormaliseNormals(true);
     74                /*
     75                    Excerpt from Ogre forum:
     76                    "Note that the above is only for the fixed function pipeline.
     77                    If/when you get into shaders, you'll need to manually normalize() the normal inside the vertex or pixel shader."
     78
     79                    I don't know exactly what this means, but I put this here if there will be problems with shaders.
     80                */
    7281            }
    7382            catch (...)
  • code/branches/questsystem5/src/orxonox/tools/ParticleInterface.cc

    r2662 r2907  
    4040#include <cassert>
    4141
    42 #include "GraphicsEngine.h"
    43 #include "core/Core.h"
     42#include "GraphicsManager.h"
     43#include "core/GameMode.h"
    4444#include "core/CoreIncludes.h"
    4545#include "util/Convert.h"
     
    6464        this->speedFactor_ = 1.0f;
    6565
    66         if (Core::showsGraphics())
     66        if (GameMode::showsGraphics())
    6767        {
    6868            try
     
    178178    {
    179179        this->detaillevel_ = level;
    180         if (GraphicsEngine::getInstancePtr())
    181             this->detailLevelChanged(GraphicsEngine::getInstance().getDetailLevelParticle());
     180        if (GameMode::showsGraphics())
     181            this->detailLevelChanged(GraphicsManager::getInstance().getDetailLevelParticle());
    182182    }
    183183
  • code/branches/questsystem5/src/orxonox/tools/ParticleInterface.h

    r2662 r2907  
    3737#include "core/OrxonoxClass.h"
    3838#include "util/Math.h"
    39 #include "gamestates/GSRoot.h"
     39#include "tools/TimeFactorListener.h"
    4040
    4141#define getAllEmitters() \
  • code/branches/questsystem5/src/orxonox/tools/Shader.cc

    r2662 r2907  
    3636#include <OgrePlugin.h>
    3737
    38 #include "core/Core.h"
     38#include "core/GameMode.h"
    3939#include "core/CoreIncludes.h"
    4040#include "core/Executor.h"
    41 #include "GraphicsEngine.h"
     41#include "GraphicsManager.h"
    4242#include "util/Exception.h"
    4343
     
    5959        this->compositorInstance_ = 0;
    6060        this->bVisible_ = true;
    61         this->bLoadCompositor_ = Core::showsGraphics() && GraphicsEngine::getInstancePtr();
     61        this->bLoadCompositor_ = GameMode::showsGraphics();
    6262        this->bViewportInitialized_ = false;
    6363        this->compositor_ = "";
     
    8686        if (this->bLoadCompositor_ && this->compositorInstance_)
    8787        {
    88             Ogre::Viewport* viewport = GraphicsEngine::getInstance().getViewport();
     88            Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
    8989            assert(viewport);
    9090            Ogre::CompositorManager::getSingleton().removeCompositor(viewport, this->compositor_);
     
    114114        if (this->bLoadCompositor_)
    115115        {
    116             Ogre::Viewport* viewport = GraphicsEngine::getInstance().getViewport();
     116            Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
    117117            assert(viewport);
    118118            if (this->oldcompositor_ != "")
     
    246246    Shader::ParameterPointer* Shader::getParameterPointer(const std::string& material, size_t technique, size_t pass, const std::string& parameter)
    247247    {
    248         if (!Core::showsGraphics() || !Shader::bLoadedCgPlugin_s)
     248        if (!GameMode::showsGraphics() || !Shader::bLoadedCgPlugin_s)
    249249            return 0;
    250250
  • code/branches/questsystem5/src/orxonox/tools/Timer.h

    r2662 r2907  
    6464#include "core/Executor.h"
    6565#include "core/OrxonoxClass.h"
    66 #include "gamestates/GSRoot.h"
     66#include "tools/TimeFactorListener.h"
    6767
    6868namespace orxonox
  • code/branches/questsystem5/src/orxonox/tools/WindowEventListener.h

    r2662 r2907  
    4949
    5050            /** Window has resized */
    51             virtual void windowResized(int newWidth, int newHeight) { }
     51            virtual void windowResized(unsigned int newWidth, unsigned int newHeight) { }
    5252
    5353            /** Window has lost/gained focus */
Note: See TracChangeset for help on using the changeset viewer.