Index: /code/trunk/cmake/tools/FindCEGUI.cmake
===================================================================
--- /code/trunk/cmake/tools/FindCEGUI.cmake	(revision 9674)
+++ /code/trunk/cmake/tools/FindCEGUI.cmake	(revision 9675)
@@ -31,16 +31,31 @@
 INCLUDE(HandleLibraryTypes)
 
-# Find CEGUI headers
-FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
+# Determine CEGUI's version
+FIND_FILE(CEGUI_VERSION_FILE CEGUIVersion.h Version.h
   PATHS $ENV{CEGUIDIR}
   PATH_SUFFIXES include include/CEGUI
 )
+DETERMINE_VERSION(CEGUI ${CEGUI_VERSION_FILE})
 
-# Inspect CEGUIVersion.h for the version number
-DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
+# Find CEGUI headers
+COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.8" _version_0_8_compare TRUE)
+# Version 0.8 introduced a new directory and file naming convention
+IF(_version_0_8_compare GREATER -1)
+  # 0.8 and newer
+  FIND_PATH(CEGUI_INCLUDE_DIR CEGUI/CEGUI.h
+    PATHS $ENV{CEGUIDIR}
+    PATH_SUFFIXES include
+  )
+ELSE()
+  # 0.8 and older
+  FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
+    PATHS $ENV{CEGUIDIR}
+    PATH_SUFFIXES include include/CEGUI
+  )
+ENDIF()
 
 # Find CEGUI library
 FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
-  NAMES CEGUIBase CEGUI
+  NAMES CEGUIBase CEGUI CEGUIBase-0
   PATHS $ENV{CEGUIDIR}
   PATH_SUFFIXES lib bin
@@ -55,14 +70,15 @@
 
 # Find CEGUILua headers
-FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
+FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h Functor.h
   PATHS
     $ENV{CEGUIDIR}
     $ENV{CEGUILUADIR}
     ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
+    ${CEGUI_INCLUDE_DIR}/CEGUI/ScriptModules/Lua
   PATH_SUFFIXES include include/CEGUI
 )
 # Find CEGUILua libraries
 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
-  NAMES CEGUILua CEGUILuaScriptModule
+  NAMES CEGUILua CEGUILuaScriptModule CEGUILuaScriptModule-0
   PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
   PATH_SUFFIXES lib bin
@@ -82,4 +98,5 @@
     # For newer CEGUI versions >= 0.7
     ${CEGUILUA_INCLUDE_DIR}/support/tolua++
+    ${DEP_INCLUDE_DIR}/tolua++/include
     # For Mac OS X, tolua++ is a separate framework in the dependency package
     ${DEP_FRAMEWORK_DIR}
@@ -99,8 +116,8 @@
 
 # Newer versions of CEGUI have the renderer for OGRE shipped with them
-COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE)
-IF(_version_compare GREATER -1)
+COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_0_7_compare TRUE)
+IF(_version_0_7_compare GREATER -1)
   # Find CEGUI OGRE Renderer headers
-  FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h
+  FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h Renderer.h
     PATHS
       $ENV{CEGUIDIR}
@@ -111,5 +128,5 @@
   # Find CEGUI OGRE Renderer libraries
   FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
-    NAMES CEGUIOgreRenderer
+    NAMES CEGUIOgreRenderer CEGUIOgreRenderer-0
     PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
     PATH_SUFFIXES lib bin
Index: /code/trunk/src/OrxonoxConfig.h.in
===================================================================
--- /code/trunk/src/OrxonoxConfig.h.in	(revision 9674)
+++ /code/trunk/src/OrxonoxConfig.h.in	(revision 9675)
@@ -246,3 +246,7 @@
 #endif
 
+// CEGUI changed its file naming convention in version 0.8 thus we cannot even include CEGUI's Version.h file before knowing its version
+#include <@CEGUI_VERSION_FILE@>
+#define CEGUI_VERSION ((CEGUI_VERSION_MAJOR << 16) | (CEGUI_VERSION_MINOR << 8) | CEGUI_VERSION_PATCH)
+
 #endif /* _OrxonoxConfig_H__ */
Index: /code/trunk/src/libraries/core/CorePrereqs.h
===================================================================
--- /code/trunk/src/libraries/core/CorePrereqs.h	(revision 9674)
+++ /code/trunk/src/libraries/core/CorePrereqs.h	(revision 9675)
@@ -38,5 +38,4 @@
 #include "OrxonoxConfig.h"
 #include <boost/version.hpp>
-#include <CEGUIVersion.h>
 
 //-----------------------------------------------------------------------
Index: /code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- /code/trunk/src/libraries/core/GUIManager.cc	(revision 9674)
+++ /code/trunk/src/libraries/core/GUIManager.cc	(revision 9675)
@@ -36,33 +36,55 @@
 #include <OgreRenderWindow.h>
 
-#include <CEGUIDefaultLogger.h>
-#include <CEGUIExceptions.h>
-#include <CEGUIFontManager.h>
-#include <CEGUIInputEvent.h>
-#include <CEGUIMouseCursor.h>
-#include <CEGUIResourceProvider.h>
-#include <CEGUISystem.h>
-#include <CEGUIWindow.h>
-#include <CEGUIWindowManager.h>
-#include <CEGUIXMLAttributes.h>
-#include <elements/CEGUIListbox.h>
-#include <elements/CEGUIListboxItem.h>
+#if CEGUI_VERSION >= 0x000800
+#   include <CEGUI/DefaultLogger.h>
+#   include <CEGUI/Exceptions.h>
+#   include <CEGUI/FontManager.h>
+#   include <CEGUI/InputEvent.h>
+#   include <CEGUI/MouseCursor.h>
+#   include <CEGUI/ResourceProvider.h>
+#   include <CEGUI/System.h>
+#   include <CEGUI/Window.h>
+#   include <CEGUI/WindowManager.h>
+#   include <CEGUI/XMLAttributes.h>
+#   include <CEGUI/widgets/Listbox.h>
+#   include <CEGUI/widgets/ListboxItem.h>
+#else
+#   include <CEGUIDefaultLogger.h>
+#   include <CEGUIExceptions.h>
+#   include <CEGUIFontManager.h>
+#   include <CEGUIInputEvent.h>
+#   include <CEGUIMouseCursor.h>
+#   include <CEGUIResourceProvider.h>
+#   include <CEGUISystem.h>
+#   include <CEGUIWindow.h>
+#   include <CEGUIWindowManager.h>
+#   include <CEGUIXMLAttributes.h>
+#   include <elements/CEGUIListbox.h>
+#   include <elements/CEGUIListboxItem.h>
+#endif
 
 #ifdef ORXONOX_OLD_CEGUI
-#  include <CEGUILua.h>
-#  include <ogreceguirenderer/OgreCEGUIRenderer.h>
+#   include <CEGUILua.h>
+#   include <ogreceguirenderer/OgreCEGUIRenderer.h>
 extern "C" {
-#  include <lauxlib.h>
+#   include <lauxlib.h>
 }
 #else
-#  include <ScriptingModules/LuaScriptModule/CEGUILua.h>
-#  include <RendererModules/Ogre/CEGUIOgreImageCodec.h>
-#  include <RendererModules/Ogre/CEGUIOgreRenderer.h>
-#  include <RendererModules/Ogre/CEGUIOgreResourceProvider.h>
-#  include <OgreCamera.h>
-#  include <OgreRenderQueueListener.h>
-#  include <OgreRenderSystem.h>
-#  include <OgreRoot.h>
-#  include <OgreSceneManager.h>
+#   if CEGUI_VERSION >= 0x000800
+#       include <CEGUI/ScriptModules/Lua/ScriptModule.h>
+#       include <CEGUI/RendererModules/Ogre/ImageCodec.h>
+#       include <CEGUI/RendererModules/Ogre/Renderer.h>
+#       include <CEGUI/RendererModules/Ogre/ResourceProvider.h>
+#   else
+#       include <ScriptingModules/LuaScriptModule/CEGUILua.h>
+#       include <RendererModules/Ogre/CEGUIOgreImageCodec.h>
+#       include <RendererModules/Ogre/CEGUIOgreRenderer.h>
+#       include <RendererModules/Ogre/CEGUIOgreResourceProvider.h>
+#   endif
+#   include <OgreCamera.h>
+#   include <OgreRenderQueueListener.h>
+#   include <OgreRenderSystem.h>
+#   include <OgreRoot.h>
+#   include <OgreSceneManager.h>
 #endif
 
@@ -208,5 +230,9 @@
             if (id == Ogre::RENDER_QUEUE_OVERLAY && invocation.empty())
             {
+#if CEGUI_VERSION >= 0x000800
+                CEGUI::System::getSingleton().renderAllGUIContexts();
+#else
                 CEGUI::System::getSingleton().renderGUI();
+#endif
 
                 // Important workaround! (at least required by CEGUI 0.7.5)
@@ -332,5 +358,9 @@
 
         // Align CEGUI mouse with OIS mouse
+#if CEGUI_VERSION >= 0x000800
+        guiSystem_->getDefaultGUIContext().injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
+#else
         guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
+#endif
 
         // Initialise the Lua framework and load the schemes
@@ -344,7 +374,13 @@
         this->menuRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "MenuRootWindow");
         // And connect them
+#if CEGUI_VERSION >= 0x000800
+        CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(this->rootWindow_);
+        this->rootWindow_->addChild(this->hudRootWindow_);
+        this->rootWindow_->addChild(this->menuRootWindow_);
+#else
         CEGUI::System::getSingleton().setGUISheet(this->rootWindow_);
         this->rootWindow_->addChildWindow(this->hudRootWindow_);
         this->rootWindow_->addChildWindow(this->menuRootWindow_);
+#endif
 
         // No background to start with (sets the alpha value to 0)
@@ -413,5 +449,5 @@
     {
         assert(guiSystem_);
-        this->protectedCall(boost::bind(&CEGUI::System::injectTimePulse, _1, time.getDeltaTime()));
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectTimePulse, _1, time.getDeltaTime()));
     }
 
@@ -588,11 +624,20 @@
     void GUIManager::buttonPressed(const KeyEvent& evt)
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectKeyDown, _1, evt.getKeyCode()));
-        this->protectedCall(boost::bind(&CEGUI::System::injectChar, _1, evt.getText()));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectKeyDown, _1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectChar, _1, evt.getText()));
+#else
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectKeyDown, _1, evt.getKeyCode()));
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectChar, _1, evt.getText()));
+#endif
     }
 
     void GUIManager::buttonReleased(const KeyEvent& evt)
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectKeyUp, _1, evt.getKeyCode()));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectKeyUp, _1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?
+#else
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectKeyUp, _1, evt.getKeyCode()));
+#endif
     }
 
@@ -608,5 +653,9 @@
     void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseButtonDown, _1, convertButton(id)));
+#else
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
+#endif
     }
 
@@ -622,15 +671,27 @@
     void GUIManager::buttonReleased(MouseButtonCode::ByEnum id)
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonUp, _1, convertButton(id)));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseButtonUp, _1, convertButton(id)));
+#else
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseButtonUp, _1, convertButton(id)));
+#endif
     }
 
     void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMousePosition, _1, (float)abs.x, (float)abs.y));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMousePosition, _1, (float)abs.x, (float)abs.y));
+#else
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMousePosition, _1, (float)abs.x, (float)abs.y));
+#endif
     }
 
     void GUIManager::mouseScrolled(int abs, int rel)
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
+#else
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
+#endif
     }
 
@@ -640,5 +701,9 @@
     void GUIManager::mouseLeft()
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseLeaves, _1));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(boost::bind(&CEGUI::GUIContext::injectMouseLeaves, _1));
+#else
+        this->protectedCeguiSystemCall(boost::bind(&CEGUI::System::injectMouseLeaves, _1));
+#endif
     }
 
@@ -692,10 +757,10 @@
         True if input was handled, false otherwise. A caught exception yields true.
     */
-    template <typename FunctionType>
-    bool GUIManager::protectedCall(FunctionType function)
+    template <typename FunctionType, typename ObjectType>
+    bool GUIManager::protectedCall(FunctionType function, ObjectType object)
     {
         try
         {
-            return function(this->guiSystem_);
+            return function(object);
         }
         catch (CEGUI::ScriptException& ex)
@@ -706,4 +771,18 @@
         }
     }
+
+    template <typename FunctionType>
+    bool GUIManager::protectedCeguiSystemCall(FunctionType function)
+    {
+        return this->protectedCall(function, this->guiSystem_);
+    }
+
+#if CEGUI_VERSION >= 0x000800
+    template <typename FunctionType>
+    bool GUIManager::protectedCeguiContextCall(FunctionType function)
+    {
+        return this->protectedCall(function, this->guiSystem_->getDefaultGUIContext());
+    }
+#endif
 
     /**
@@ -762,5 +841,9 @@
     void GUIManager::windowResized(unsigned int newWidth, unsigned int newHeight)
     {
+#if CEGUI_VERSION >= 0x000800
+        this->guiRenderer_->setDisplaySize(CEGUI::Sizef((float)newWidth, (float)newHeight));
+#else
         this->guiRenderer_->setDisplaySize(CEGUI::Size((float)newWidth, (float)newHeight));
+#endif
     }
 
@@ -812,5 +895,9 @@
             return;
 
+    #if CEGUI_VERSION >= 0x000800
+        CEGUI::FontManager::getSingleton().createFreeTypeFont(name, (float)size, true, fontName, "", CEGUI::ASM_Both, CEGUI::Sizef(800.0f, 600.0f));
+    #else
         CEGUI::FontManager::getSingleton().createFreeTypeFont(name, (float)size, true, fontName, "", true, 800.0f, 600.0f);
+    #endif
 #endif
     }
Index: /code/trunk/src/libraries/core/GUIManager.h
===================================================================
--- /code/trunk/src/libraries/core/GUIManager.h	(revision 9674)
+++ /code/trunk/src/libraries/core/GUIManager.h	(revision 9675)
@@ -40,6 +40,13 @@
 #include <map>
 #include <string>
-#include <CEGUIForwardRefs.h>
-#include <CEGUIVersion.h>
+
+#if CEGUI_VERSION >= 0x000800
+#   include <CEGUI/ForwardRefs.h>
+#   include <CEGUI/Version.h>
+#else
+#   include <CEGUIForwardRefs.h>
+#   include <CEGUIVersion.h>
+#endif
+
 #include <boost/shared_ptr.hpp>
 
@@ -149,6 +156,14 @@
         void executeCode(const std::string& str);
 
+        template <typename FunctionType, typename ObjectType>
+        bool protectedCall(FunctionType function, ObjectType object);
+
         template <typename FunctionType>
-        bool protectedCall(FunctionType function);
+        bool protectedCeguiSystemCall(FunctionType function);
+
+#if CEGUI_VERSION >= 0x000800
+        template <typename FunctionType>
+        bool protectedCeguiContextCall(FunctionType function);
+#endif
 
         void changedCeguiOutputLevel();
Index: /code/trunk/src/libraries/core/GraphicsManager.cc
===================================================================
--- /code/trunk/src/libraries/core/GraphicsManager.cc	(revision 9674)
+++ /code/trunk/src/libraries/core/GraphicsManager.cc	(revision 9675)
@@ -402,7 +402,15 @@
         The name of this log (so you can have several listeners
         for different logs, and identify them)
+    @param skipThisMessage
+        If set to true by the messageLogged() implementation message will not be logged
     */
+#if OGRE_VERSION >= 0x010800
+    void GraphicsManager::messageLogged(const std::string& message,
+        Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName, bool& skipThisMessage)
+        // TODO: do we have to ignore the message if skipThisMessage is set?
+#else
     void GraphicsManager::messageLogged(const std::string& message,
         Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName)
+#endif
     {
         OutputLevel orxonoxLevel;
Index: /code/trunk/src/libraries/core/GraphicsManager.h
===================================================================
--- /code/trunk/src/libraries/core/GraphicsManager.h	(revision 9674)
+++ /code/trunk/src/libraries/core/GraphicsManager.h	(revision 9675)
@@ -108,6 +108,9 @@
 
         // event from Ogre::LogListener
-        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
-        bool maskDebug, const std::string& logName);
+#if OGRE_VERSION >= 0x010800
+        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName, bool& skipThisMessage);
+#else
+        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName);
+#endif
 
         // console commands
Index: /code/trunk/src/libraries/core/Resource.cc
===================================================================
--- /code/trunk/src/libraries/core/Resource.cc	(revision 9674)
+++ /code/trunk/src/libraries/core/Resource.cc	(revision 9675)
@@ -101,5 +101,9 @@
                 ptr->group = group;
                 ptr->size = it->uncompressedSize;
+#if OGRE_VERSION >= 0x010800
+                if (dynamic_cast<const Ogre::FileSystemArchive*>(it->archive) != NULL)
+#else
                 if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != NULL)
+#endif
                 {
                     boost::filesystem::path base(it->archive->getName());
Index: /code/trunk/src/libraries/util/Exception.cc
===================================================================
--- /code/trunk/src/libraries/util/Exception.cc	(revision 9674)
+++ /code/trunk/src/libraries/util/Exception.cc	(revision 9675)
@@ -36,5 +36,11 @@
 
 #include <cstddef>
-#include <CEGUIExceptions.h>
+
+#if CEGUI_VERSION >= 0x000800
+#   include <CEGUI/Exceptions.h>
+#else
+#   include <CEGUIExceptions.h>
+#endif
+
 #include "Output.h"
 
Index: /code/trunk/src/modules/objects/Planet.cc
===================================================================
--- /code/trunk/src/modules/objects/Planet.cc	(revision 9674)
+++ /code/trunk/src/modules/objects/Planet.cc	(revision 9675)
@@ -108,9 +108,11 @@
                 float scaleFactor = this->getScale();
 
-    #if OGRE_VERSION >= 0x010700
+#if OGRE_VERSION >= 0x010800
+                Ogre::ProgressiveMesh::LodValueList distList;
+#elif OGRE_VERSION >= 0x010700
                 Ogre::Mesh::LodValueList distList;
-    #else
+#else
                 Ogre::Mesh::LodDistanceList distList;
-    #endif
+#endif
 
                 distList.push_back(10.0f*scaleFactor);
@@ -127,5 +129,10 @@
                 float reductionValue = 0.2f;
 
+#if OGRE_VERSION >= 0x010800
+                Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
+                    reductionValue);
+#else
                 this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
+#endif
                 billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
 
Index: /code/trunk/src/orxonox/chat/ChatInputHandler.cc
===================================================================
--- /code/trunk/src/orxonox/chat/ChatInputHandler.cc	(revision 9674)
+++ /code/trunk/src/orxonox/chat/ChatInputHandler.cc	(revision 9675)
@@ -32,9 +32,18 @@
 #include <cstddef>
 #include <string>
-#include <CEGUIWindow.h>
-#include <CEGUIWindowManager.h>
-#include <elements/CEGUIListbox.h>
-#include <elements/CEGUIListboxItem.h>
-#include <elements/CEGUIListboxTextItem.h>
+
+#if CEGUI_VERSION >= 0x000800
+#   include <CEGUI/Window.h>
+#   include <CEGUI/WindowManager.h>
+#   include <CEGUI/widgets/Listbox.h>
+#   include <CEGUI/widgets/ListboxItem.h>
+#   include <CEGUI/widgets/ListboxTextItem.h>
+#else
+#   include <CEGUIWindow.h>
+#   include <CEGUIWindowManager.h>
+#   include <elements/CEGUIListbox.h>
+#   include <elements/CEGUIListboxItem.h>
+#   include <elements/CEGUIListboxTextItem.h>
+#endif
 
 #include "util/ScopedSingletonManager.h"
@@ -119,9 +128,13 @@
 
     /* GET WINDOW POINTERS */
+#if CEGUI_VERSION >= 0x000800
+    input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/input" );
+    inputonly = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox-inputonly/input" );
+    CEGUI::Window *history = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/history" );
+#else
     input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" );
     inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" );
-
-    /* get pointer to the history window */
     CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" );
+#endif
 
     /* cast it to a listbox */
@@ -142,5 +155,5 @@
     // reds
     for( i = 0; i < NumberOfColors/3; ++i )
-    { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
+    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
       green += 0.2f, blue += 0.2f;
     }
@@ -149,5 +162,5 @@
     red = 0.5, green = 1, blue = 0.5;
     for( ; i < NumberOfColors*2/3; ++i )
-    { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
+    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
       red += 0.2f, blue += 0.2f;
     }
@@ -156,5 +169,5 @@
     red = 0.5, green = 0.5, blue = 1;
     for( ; i < NumberOfColors; ++i )
-    { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
+    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
       red += 0.2f, green += 0.2f;
     }
@@ -273,6 +286,9 @@
     {
       /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6),
-        cursorpos, assembled.length() );
+#if CEGUI_VERSION >= 0x000800
+      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
+#else
+      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
+#endif
       this->input->setProperty( "Text", assembled.substr( disp_offset ) );
     }
@@ -280,6 +296,9 @@
     {
       /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6),
-        cursorpos, assembled.length() );
+#if CEGUI_VERSION >= 0x000800
+      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
+#else
+      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
+#endif
       this->inputonly->setProperty( "Text", assembled.substr( disp_offset) );
     }
Index: /code/trunk/src/orxonox/chat/ChatInputHandler.h
===================================================================
--- /code/trunk/src/orxonox/chat/ChatInputHandler.h	(revision 9674)
+++ /code/trunk/src/orxonox/chat/ChatInputHandler.h	(revision 9675)
@@ -33,6 +33,12 @@
 
 #include <string>
-#include <CEGUIForwardRefs.h>
-#include <CEGUIcolour.h>
+
+#if CEGUI_VERSION >= 0x000800
+#   include <CEGUI/ForwardRefs.h>
+#   include <CEGUI/Colour.h>
+#else
+#   include <CEGUIForwardRefs.h>
+#   include <CEGUIcolour.h>
+#endif
 
 #include "util/Singleton.h"
@@ -41,4 +47,11 @@
 namespace orxonox // tolua_export
 { // tolua_export
+
+#if CEGUI_VERSION >= 0x000800
+  typedef CEGUI::Colour CEGUIColour;
+#else
+  typedef CEGUI::colour CEGUIColour;
+#endif
+
   /* class to handle chat using an InputBuffer */
   class _OrxonoxExport ChatInputHandler  // tolua_export
@@ -55,5 +68,5 @@
       /* colors for nickname coloring */
       static const int NumberOfColors = 10;
-      CEGUI::colour text_colors[ NumberOfColors ];
+      CEGUIColour text_colors[ NumberOfColors ];
 
       /** input state */
Index: /code/trunk/src/orxonox/graphics/Model.cc
===================================================================
--- /code/trunk/src/orxonox/graphics/Model.cc	(revision 9674)
+++ /code/trunk/src/orxonox/graphics/Model.cc	(revision 9675)
@@ -30,4 +30,5 @@
 
 #include <OgreEntity.h>
+#include <OgreProgressiveMesh.h>
 
 #include "core/CoreIncludes.h"
@@ -162,5 +163,7 @@
                 orxout(verbose, context::lod) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << endl;
 
-#if OGRE_VERSION >= 0x010700
+#if OGRE_VERSION >= 0x010800
+                Ogre::ProgressiveMesh::LodValueList distList;
+#elif OGRE_VERSION >= 0x010700
                 Ogre::Mesh::LodValueList distList;
 #else
@@ -190,5 +193,10 @@
 
                     //Generiert LOD-Levels
+#if OGRE_VERSION >= 0x010800
+                    Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
+                        this->lodReductionRate_);
+#else
                     this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, this->lodReductionRate_);
+#endif
                 }
                 else
