Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9675


Ignore:
Timestamp:
Sep 26, 2013, 11:03:33 PM (8 years ago)
Author:
landauf
Message:

merged branch 'libs' back to trunk. orxonox now compiles and runs with ogre 1.8 and it compiles (but doesn't run) with cegui 0.8

Location:
code/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/cmake/tools/FindCEGUI.cmake

    r9163 r9675  
    3131INCLUDE(HandleLibraryTypes)
    3232
    33 # Find CEGUI headers
    34 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
     33# Determine CEGUI's version
     34FIND_FILE(CEGUI_VERSION_FILE CEGUIVersion.h Version.h
    3535  PATHS $ENV{CEGUIDIR}
    3636  PATH_SUFFIXES include include/CEGUI
    3737)
     38DETERMINE_VERSION(CEGUI ${CEGUI_VERSION_FILE})
    3839
    39 # Inspect CEGUIVersion.h for the version number
    40 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     40# Find CEGUI headers
     41COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.8" _version_0_8_compare TRUE)
     42# Version 0.8 introduced a new directory and file naming convention
     43IF(_version_0_8_compare GREATER -1)
     44  # 0.8 and newer
     45  FIND_PATH(CEGUI_INCLUDE_DIR CEGUI/CEGUI.h
     46    PATHS $ENV{CEGUIDIR}
     47    PATH_SUFFIXES include
     48  )
     49ELSE()
     50  # 0.8 and older
     51  FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
     52    PATHS $ENV{CEGUIDIR}
     53    PATH_SUFFIXES include include/CEGUI
     54  )
     55ENDIF()
    4156
    4257# Find CEGUI library
    4358FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
    44   NAMES CEGUIBase CEGUI
     59  NAMES CEGUIBase CEGUI CEGUIBase-0
    4560  PATHS $ENV{CEGUIDIR}
    4661  PATH_SUFFIXES lib bin
     
    5570
    5671# Find CEGUILua headers
    57 FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
     72FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h Functor.h
    5873  PATHS
    5974    $ENV{CEGUIDIR}
    6075    $ENV{CEGUILUADIR}
    6176    ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
     77    ${CEGUI_INCLUDE_DIR}/CEGUI/ScriptModules/Lua
    6278  PATH_SUFFIXES include include/CEGUI
    6379)
    6480# Find CEGUILua libraries
    6581FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
    66   NAMES CEGUILua CEGUILuaScriptModule
     82  NAMES CEGUILua CEGUILuaScriptModule CEGUILuaScriptModule-0
    6783  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
    6884  PATH_SUFFIXES lib bin
     
    8298    # For newer CEGUI versions >= 0.7
    8399    ${CEGUILUA_INCLUDE_DIR}/support/tolua++
     100    ${DEP_INCLUDE_DIR}/tolua++/include
    84101    # For Mac OS X, tolua++ is a separate framework in the dependency package
    85102    ${DEP_FRAMEWORK_DIR}
     
    99116
    100117# Newer versions of CEGUI have the renderer for OGRE shipped with them
    101 COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE)
    102 IF(_version_compare GREATER -1)
     118COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_0_7_compare TRUE)
     119IF(_version_0_7_compare GREATER -1)
    103120  # Find CEGUI OGRE Renderer headers
    104   FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h
     121  FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h Renderer.h
    105122    PATHS
    106123      $ENV{CEGUIDIR}
     
    111128  # Find CEGUI OGRE Renderer libraries
    112129  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
    113     NAMES CEGUIOgreRenderer
     130    NAMES CEGUIOgreRenderer CEGUIOgreRenderer-0
    114131    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
    115132    PATH_SUFFIXES lib bin
  • code/trunk/src/OrxonoxConfig.h.in

    r8858 r9675  
    246246#endif
    247247
     248// CEGUI changed its file naming convention in version 0.8 thus we cannot even include CEGUI's Version.h file before knowing its version
     249#include <@CEGUI_VERSION_FILE@>
     250#define CEGUI_VERSION ((CEGUI_VERSION_MAJOR << 16) | (CEGUI_VERSION_MINOR << 8) | CEGUI_VERSION_PATCH)
     251
    248252#endif /* _OrxonoxConfig_H__ */
  • code/trunk/src/libraries/core/CorePrereqs.h

    r9667 r9675  
    3838#include "OrxonoxConfig.h"
    3939#include <boost/version.hpp>
    40 #include <CEGUIVersion.h>
    4140
    4241//-----------------------------------------------------------------------
  • code/trunk/src/libraries/core/GUIManager.cc

    r9667 r9675  
    3636#include <OgreRenderWindow.h>
    3737
    38 #include <CEGUIDefaultLogger.h>
    39 #include <CEGUIExceptions.h>
    40 #include <CEGUIFontManager.h>
    41 #include <CEGUIInputEvent.h>
    42 #include <CEGUIMouseCursor.h>
    43 #include <CEGUIResourceProvider.h>
    44 #include <CEGUISystem.h>
    45 #include <CEGUIWindow.h>
    46 #include <CEGUIWindowManager.h>
    47 #include <CEGUIXMLAttributes.h>
    48 #include <elements/CEGUIListbox.h>
    49 #include <elements/CEGUIListboxItem.h>
     38#if CEGUI_VERSION >= 0x000800
     39#   include <CEGUI/DefaultLogger.h>
     40#   include <CEGUI/Exceptions.h>
     41#   include <CEGUI/FontManager.h>
     42#   include <CEGUI/InputEvent.h>
     43#   include <CEGUI/MouseCursor.h>
     44#   include <CEGUI/ResourceProvider.h>
     45#   include <CEGUI/System.h>
     46#   include <CEGUI/Window.h>
     47#   include <CEGUI/WindowManager.h>
     48#   include <CEGUI/XMLAttributes.h>
     49#   include <CEGUI/widgets/Listbox.h>
     50#   include <CEGUI/widgets/ListboxItem.h>
     51#else
     52#   include <CEGUIDefaultLogger.h>
     53#   include <CEGUIExceptions.h>
     54#   include <CEGUIFontManager.h>
     55#   include <CEGUIInputEvent.h>
     56#   include <CEGUIMouseCursor.h>
     57#   include <CEGUIResourceProvider.h>
     58#   include <CEGUISystem.h>
     59#   include <CEGUIWindow.h>
     60#   include <CEGUIWindowManager.h>
     61#   include <CEGUIXMLAttributes.h>
     62#   include <elements/CEGUIListbox.h>
     63#   include <elements/CEGUIListboxItem.h>
     64#endif
    5065
    5166#ifdef ORXONOX_OLD_CEGUI
    52 include <CEGUILua.h>
    53 include <ogreceguirenderer/OgreCEGUIRenderer.h>
     67 include <CEGUILua.h>
     68 include <ogreceguirenderer/OgreCEGUIRenderer.h>
    5469extern "C" {
    55 include <lauxlib.h>
     70 include <lauxlib.h>
    5671}
    5772#else
    58 #  include <ScriptingModules/LuaScriptModule/CEGUILua.h>
    59 #  include <RendererModules/Ogre/CEGUIOgreImageCodec.h>
    60 #  include <RendererModules/Ogre/CEGUIOgreRenderer.h>
    61 #  include <RendererModules/Ogre/CEGUIOgreResourceProvider.h>
    62 #  include <OgreCamera.h>
    63 #  include <OgreRenderQueueListener.h>
    64 #  include <OgreRenderSystem.h>
    65 #  include <OgreRoot.h>
    66 #  include <OgreSceneManager.h>
     73#   if CEGUI_VERSION >= 0x000800
     74#       include <CEGUI/ScriptModules/Lua/ScriptModule.h>
     75#       include <CEGUI/RendererModules/Ogre/ImageCodec.h>
     76#       include <CEGUI/RendererModules/Ogre/Renderer.h>
     77#       include <CEGUI/RendererModules/Ogre/ResourceProvider.h>
     78#   else
     79#       include <ScriptingModules/LuaScriptModule/CEGUILua.h>
     80#       include <RendererModules/Ogre/CEGUIOgreImageCodec.h>
     81#       include <RendererModules/Ogre/CEGUIOgreRenderer.h>
     82#       include <RendererModules/Ogre/CEGUIOgreResourceProvider.h>
     83#   endif
     84#   include <OgreCamera.h>
     85#   include <OgreRenderQueueListener.h>
     86#   include <OgreRenderSystem.h>
     87#   include <OgreRoot.h>
     88#   include <OgreSceneManager.h>
    6789#endif
    6890
     
    208230            if (id == Ogre::RENDER_QUEUE_OVERLAY && invocation.empty())
    209231            {
     232#if CEGUI_VERSION >= 0x000800
     233                CEGUI::System::getSingleton().renderAllGUIContexts();
     234#else
    210235                CEGUI::System::getSingleton().renderGUI();
     236#endif
    211237
    212238                // Important workaround! (at least required by CEGUI 0.7.5)
     
    332358
    333359        // Align CEGUI mouse with OIS mouse
     360#if CEGUI_VERSION >= 0x000800
     361        guiSystem_->getDefaultGUIContext().injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
     362#else
    334363        guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
     364#endif
    335365
    336366        // Initialise the Lua framework and load the schemes
     
    344374        this->menuRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "MenuRootWindow");
    345375        // And connect them
     376#if CEGUI_VERSION >= 0x000800
     377        CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(this->rootWindow_);
     378        this->rootWindow_->addChild(this->hudRootWindow_);
     379        this->rootWindow_->addChild(this->menuRootWindow_);
     380#else
    346381        CEGUI::System::getSingleton().setGUISheet(this->rootWindow_);
    347382        this->rootWindow_->addChildWindow(this->hudRootWindow_);
    348383        this->rootWindow_->addChildWindow(this->menuRootWindow_);
     384#endif
    349385
    350386        // No background to start with (sets the alpha value to 0)
     
    413449    {
    414450        assert(guiSystem_);
    415         this->protectedCall(boost::bind(&CEGUI::System::injectTimePulse, _1, time.getDeltaTime()));
     451        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectTimePulse, _1, time.getDeltaTime()));
    416452    }
    417453
     
    588624    void GUIManager::buttonPressed(const KeyEvent& evt)
    589625    {
    590         this->protectedCall(boost::bind(&CEGUI::System::injectKeyDown, _1, evt.getKeyCode()));
    591         this->protectedCall(boost::bind(&CEGUI::System::injectChar, _1, evt.getText()));
     626#if CEGUI_VERSION >= 0x000800
     627        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectKeyDown, _1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?
     628        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectChar, _1, evt.getText()));
     629#else
     630        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectKeyDown, _1, evt.getKeyCode()));
     631        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectChar, _1, evt.getText()));
     632#endif
    592633    }
    593634
    594635    void GUIManager::buttonReleased(const KeyEvent& evt)
    595636    {
    596         this->protectedCall(boost::bind(&CEGUI::System::injectKeyUp, _1, evt.getKeyCode()));
     637#if CEGUI_VERSION >= 0x000800
     638        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectKeyUp, _1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?
     639#else
     640        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectKeyUp, _1, evt.getKeyCode()));
     641#endif
    597642    }
    598643
     
    608653    void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
    609654    {
    610         this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
     655#if CEGUI_VERSION >= 0x000800
     656        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseButtonDown, _1, convertButton(id)));
     657#else
     658        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
     659#endif
    611660    }
    612661
     
    622671    void GUIManager::buttonReleased(MouseButtonCode::ByEnum id)
    623672    {
    624         this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonUp, _1, convertButton(id)));
     673#if CEGUI_VERSION >= 0x000800
     674        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseButtonUp, _1, convertButton(id)));
     675#else
     676        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseButtonUp, _1, convertButton(id)));
     677#endif
    625678    }
    626679
    627680    void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
    628681    {
    629         this->protectedCall(boost::bind(&CEGUI::System::injectMousePosition, _1, (float)abs.x, (float)abs.y));
     682#if CEGUI_VERSION >= 0x000800
     683        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMousePosition, _1, (float)abs.x, (float)abs.y));
     684#else
     685        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMousePosition, _1, (float)abs.x, (float)abs.y));
     686#endif
    630687    }
    631688
    632689    void GUIManager::mouseScrolled(int abs, int rel)
    633690    {
    634         this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
     691#if CEGUI_VERSION >= 0x000800
     692        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
     693#else
     694        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
     695#endif
    635696    }
    636697
     
    640701    void GUIManager::mouseLeft()
    641702    {
    642         this->protectedCall(boost::bind(&CEGUI::System::injectMouseLeaves, _1));
     703#if CEGUI_VERSION >= 0x000800
     704        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseLeaves, _1));
     705#else
     706        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseLeaves, _1));
     707#endif
    643708    }
    644709
     
    692757        True if input was handled, false otherwise. A caught exception yields true.
    693758    */
    694     template <typename FunctionType>
    695     bool GUIManager::protectedCall(FunctionType function)
     759    template <typename FunctionType, typename ObjectType>
     760    bool GUIManager::protectedCall(FunctionType function, ObjectType object)
    696761    {
    697762        try
    698763        {
    699             return function(this->guiSystem_);
     764            return function(object);
    700765        }
    701766        catch (CEGUI::ScriptException& ex)
     
    706771        }
    707772    }
     773
     774    template <typename FunctionType>
     775    bool GUIManager::protectedCeguiSystemCall(FunctionType function)
     776    {
     777        return this->protectedCall(function, this->guiSystem_);
     778    }
     779
     780#if CEGUI_VERSION >= 0x000800
     781    template <typename FunctionType>
     782    bool GUIManager::protectedCeguiContextCall(FunctionType function)
     783    {
     784        return this->protectedCall(function, this->guiSystem_->getDefaultGUIContext());
     785    }
     786#endif
    708787
    709788    /**
     
    762841    void GUIManager::windowResized(unsigned int newWidth, unsigned int newHeight)
    763842    {
     843#if CEGUI_VERSION >= 0x000800
     844        this->guiRenderer_->setDisplaySize(CEGUI::Sizef((float)newWidth, (float)newHeight));
     845#else
    764846        this->guiRenderer_->setDisplaySize(CEGUI::Size((float)newWidth, (float)newHeight));
     847#endif
    765848    }
    766849
     
    812895            return;
    813896
     897    #if CEGUI_VERSION >= 0x000800
     898        CEGUI::FontManager::getSingleton().createFreeTypeFont(name, (float)size, true, fontName, "", CEGUI::ASM_Both, CEGUI::Sizef(800.0f, 600.0f));
     899    #else
    814900        CEGUI::FontManager::getSingleton().createFreeTypeFont(name, (float)size, true, fontName, "", true, 800.0f, 600.0f);
     901    #endif
    815902#endif
    816903    }
  • code/trunk/src/libraries/core/GUIManager.h

    r9667 r9675  
    4040#include <map>
    4141#include <string>
    42 #include <CEGUIForwardRefs.h>
    43 #include <CEGUIVersion.h>
     42
     43#if CEGUI_VERSION >= 0x000800
     44#   include <CEGUI/ForwardRefs.h>
     45#   include <CEGUI/Version.h>
     46#else
     47#   include <CEGUIForwardRefs.h>
     48#   include <CEGUIVersion.h>
     49#endif
     50
    4451#include <boost/shared_ptr.hpp>
    4552
     
    149156        void executeCode(const std::string& str);
    150157
     158        template <typename FunctionType, typename ObjectType>
     159        bool protectedCall(FunctionType function, ObjectType object);
     160
    151161        template <typename FunctionType>
    152         bool protectedCall(FunctionType function);
     162        bool protectedCeguiSystemCall(FunctionType function);
     163
     164#if CEGUI_VERSION >= 0x000800
     165        template <typename FunctionType>
     166        bool protectedCeguiContextCall(FunctionType function);
     167#endif
    153168
    154169        void changedCeguiOutputLevel();
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r9667 r9675  
    402402        The name of this log (so you can have several listeners
    403403        for different logs, and identify them)
     404    @param skipThisMessage
     405        If set to true by the messageLogged() implementation message will not be logged
    404406    */
     407#if OGRE_VERSION >= 0x010800
     408    void GraphicsManager::messageLogged(const std::string& message,
     409        Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName, bool& skipThisMessage)
     410        // TODO: do we have to ignore the message if skipThisMessage is set?
     411#else
    405412    void GraphicsManager::messageLogged(const std::string& message,
    406413        Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName)
     414#endif
    407415    {
    408416        OutputLevel orxonoxLevel;
  • code/trunk/src/libraries/core/GraphicsManager.h

    r9667 r9675  
    108108
    109109        // event from Ogre::LogListener
    110         void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
    111         bool maskDebug, const std::string& logName);
     110#if OGRE_VERSION >= 0x010800
     111        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName, bool& skipThisMessage);
     112#else
     113        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName);
     114#endif
    112115
    113116        // console commands
  • code/trunk/src/libraries/core/Resource.cc

    r8351 r9675  
    101101                ptr->group = group;
    102102                ptr->size = it->uncompressedSize;
     103#if OGRE_VERSION >= 0x010800
     104                if (dynamic_cast<const Ogre::FileSystemArchive*>(it->archive) != NULL)
     105#else
    103106                if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != NULL)
     107#endif
    104108                {
    105109                    boost::filesystem::path base(it->archive->getName());
  • code/trunk/src/libraries/util/Exception.cc

    r8858 r9675  
    3636
    3737#include <cstddef>
    38 #include <CEGUIExceptions.h>
     38
     39#if CEGUI_VERSION >= 0x000800
     40#   include <CEGUI/Exceptions.h>
     41#else
     42#   include <CEGUIExceptions.h>
     43#endif
     44
    3945#include "Output.h"
    4046
  • code/trunk/src/modules/objects/Planet.cc

    r9667 r9675  
    108108                float scaleFactor = this->getScale();
    109109
    110     #if OGRE_VERSION >= 0x010700
     110#if OGRE_VERSION >= 0x010800
     111                Ogre::ProgressiveMesh::LodValueList distList;
     112#elif OGRE_VERSION >= 0x010700
    111113                Ogre::Mesh::LodValueList distList;
    112     #else
     114#else
    113115                Ogre::Mesh::LodDistanceList distList;
    114     #endif
     116#endif
    115117
    116118                distList.push_back(10.0f*scaleFactor);
     
    127129                float reductionValue = 0.2f;
    128130
     131#if OGRE_VERSION >= 0x010800
     132                Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
     133                    reductionValue);
     134#else
    129135                this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
     136#endif
    130137                billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
    131138
  • code/trunk/src/orxonox/chat/ChatInputHandler.cc

    r9672 r9675  
    3232#include <cstddef>
    3333#include <string>
    34 #include <CEGUIWindow.h>
    35 #include <CEGUIWindowManager.h>
    36 #include <elements/CEGUIListbox.h>
    37 #include <elements/CEGUIListboxItem.h>
    38 #include <elements/CEGUIListboxTextItem.h>
     34
     35#if CEGUI_VERSION >= 0x000800
     36#   include <CEGUI/Window.h>
     37#   include <CEGUI/WindowManager.h>
     38#   include <CEGUI/widgets/Listbox.h>
     39#   include <CEGUI/widgets/ListboxItem.h>
     40#   include <CEGUI/widgets/ListboxTextItem.h>
     41#else
     42#   include <CEGUIWindow.h>
     43#   include <CEGUIWindowManager.h>
     44#   include <elements/CEGUIListbox.h>
     45#   include <elements/CEGUIListboxItem.h>
     46#   include <elements/CEGUIListboxTextItem.h>
     47#endif
    3948
    4049#include "util/ScopedSingletonManager.h"
     
    119128
    120129    /* GET WINDOW POINTERS */
     130#if CEGUI_VERSION >= 0x000800
     131    input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/input" );
     132    inputonly = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox-inputonly/input" );
     133    CEGUI::Window *history = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/history" );
     134#else
    121135    input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" );
    122136    inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" );
    123 
    124     /* get pointer to the history window */
    125137    CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" );
     138#endif
    126139
    127140    /* cast it to a listbox */
     
    142155    // reds
    143156    for( i = 0; i < NumberOfColors/3; ++i )
    144     { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
     157    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
    145158      green += 0.2f, blue += 0.2f;
    146159    }
     
    149162    red = 0.5, green = 1, blue = 0.5;
    150163    for( ; i < NumberOfColors*2/3; ++i )
    151     { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
     164    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
    152165      red += 0.2f, blue += 0.2f;
    153166    }
     
    156169    red = 0.5, green = 0.5, blue = 1;
    157170    for( ; i < NumberOfColors; ++i )
    158     { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
     171    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
    159172      red += 0.2f, green += 0.2f;
    160173    }
     
    273286    {
    274287      /* adjust curser position - magic number 5 for font width */
    275       sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6),
    276         cursorpos, assembled.length() );
     288#if CEGUI_VERSION >= 0x000800
     289      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
     290#else
     291      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
     292#endif
    277293      this->input->setProperty( "Text", assembled.substr( disp_offset ) );
    278294    }
     
    280296    {
    281297      /* adjust curser position - magic number 5 for font width */
    282       sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6),
    283         cursorpos, assembled.length() );
     298#if CEGUI_VERSION >= 0x000800
     299      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
     300#else
     301      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
     302#endif
    284303      this->inputonly->setProperty( "Text", assembled.substr( disp_offset) );
    285304    }
  • code/trunk/src/orxonox/chat/ChatInputHandler.h

    r8858 r9675  
    3333
    3434#include <string>
    35 #include <CEGUIForwardRefs.h>
    36 #include <CEGUIcolour.h>
     35
     36#if CEGUI_VERSION >= 0x000800
     37#   include <CEGUI/ForwardRefs.h>
     38#   include <CEGUI/Colour.h>
     39#else
     40#   include <CEGUIForwardRefs.h>
     41#   include <CEGUIcolour.h>
     42#endif
    3743
    3844#include "util/Singleton.h"
     
    4147namespace orxonox // tolua_export
    4248{ // tolua_export
     49
     50#if CEGUI_VERSION >= 0x000800
     51  typedef CEGUI::Colour CEGUIColour;
     52#else
     53  typedef CEGUI::colour CEGUIColour;
     54#endif
     55
    4356  /* class to handle chat using an InputBuffer */
    4457  class _OrxonoxExport ChatInputHandler  // tolua_export
     
    5568      /* colors for nickname coloring */
    5669      static const int NumberOfColors = 10;
    57       CEGUI::colour text_colors[ NumberOfColors ];
     70      CEGUIColour text_colors[ NumberOfColors ];
    5871
    5972      /** input state */
  • code/trunk/src/orxonox/graphics/Model.cc

    r9667 r9675  
    3030
    3131#include <OgreEntity.h>
     32#include <OgreProgressiveMesh.h>
    3233
    3334#include "core/CoreIncludes.h"
     
    162163                orxout(verbose, context::lod) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << endl;
    163164
    164 #if OGRE_VERSION >= 0x010700
     165#if OGRE_VERSION >= 0x010800
     166                Ogre::ProgressiveMesh::LodValueList distList;
     167#elif OGRE_VERSION >= 0x010700
    165168                Ogre::Mesh::LodValueList distList;
    166169#else
     
    190193
    191194                    //Generiert LOD-Levels
     195#if OGRE_VERSION >= 0x010800
     196                    Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
     197                        this->lodReductionRate_);
     198#else
    192199                    this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, this->lodReductionRate_);
     200#endif
    193201                }
    194202                else
Note: See TracChangeset for help on using the changeset viewer.