Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 14, 2011, 8:53:28 PM (13 years ago)
Author:
dafrick
Message:

Merging presentation branch back into trunk.
There are many new features and also a lot of other changes and bugfixes, if you want to know, digg through the svn log.
Not everything is yet working as it should, but it should be fairly stable. If you habe any bug reports, just send me an email.

Location:
code/trunk
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/BaseObject.cc

    r7401 r8706  
    195195    void BaseObject::addTemplate(Template* temp)
    196196    {
     197        // network
     198        if (temp->isLink())
     199        {
     200            this->networkTemplateNames_.insert(temp->getLink());
     201           
     202            Template* link;
     203            assert(!(link = Template::getTemplate(temp->getLink())) || !link->isLink());
     204            link = NULL;
     205        }
     206        else
     207            this->networkTemplateNames_.insert(temp->getName());
     208
     209        // add template
    197210        this->templates_.insert(temp);
    198         if( temp->isLink() )
    199         {
    200           this->networkTemplateNames_.insert(temp->getLink());
    201           assert( !Template::getTemplate(temp->getLink())->isLink() );
    202         }
    203         else
    204           this->networkTemplateNames_.insert(temp->getName());
    205211        temp->applyOn(this);
    206212    }
  • code/trunk/src/libraries/core/ConfigValueContainer.h

    r7401 r8706  
    109109            */
    110110            template <class D, class V>
    111             ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const D& defvalue, const V& value)
     111            ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const D& defvalue, const V&)
    112112            {
    113113                this->init(type, identifier, sectionname, varname);
     
    125125            */
    126126            template <class D, class V>
    127             ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>& value)
     127            ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>&)
    128128            {
    129129                this->init(type, identifier, sectionname, varname);
  • code/trunk/src/libraries/core/CoreIncludes.h

    r7401 r8706  
    171171    */
    172172    template <class T>
    173     inline Identifier* ClassByObjectType(const T* object)
     173    inline Identifier* ClassByObjectType(const T*)
    174174    {
    175175        return ClassIdentifier<T>::getIdentifier();
  • code/trunk/src/libraries/core/GUIManager.cc

    r8530 r8706  
    3838#include <CEGUIDefaultLogger.h>
    3939#include <CEGUIExceptions.h>
     40#include <CEGUIFontManager.h>
    4041#include <CEGUIInputEvent.h>
    4142#include <CEGUIMouseCursor.h>
     
    4445#include <CEGUIWindow.h>
    4546#include <CEGUIWindowManager.h>
     47#include <CEGUIXMLAttributes.h>
    4648#include <elements/CEGUIListbox.h>
    4749#include <elements/CEGUIListboxItem.h>
     
    260262        COUT(3) << "Initialising CEGUI." << std::endl;
    261263
     264        this->oldCEGUI_ = false;
     265       
    262266        // Note: No SceneManager specified yet
    263267#ifdef ORXONOX_OLD_CEGUI
    264268        guiRenderer_ = new OgreCEGUIRenderer(GraphicsManager::getInstance().getRenderWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000);
    265269        resourceProvider_ = guiRenderer_->createResourceProvider();
     270        this->oldCEGUI_ = true;
    266271#else
    267272        guiRenderer_ = &OgreRenderer::create(*GraphicsManager::getInstance().getRenderWindow());
     
    729734    }
    730735
     736    /**
     737    @brief
     738        Adds a new freetype font to the CEGUI system.
     739    @param name
     740        The name of the new font.
     741    @param size
     742        The font size of the new font in pixels.
     743        @param fontName
     744        The filename of the font.
     745    */
     746    /*static*/ void GUIManager::addFontHelper(const std::string& name, int size, const std::string& fontName)
     747    {
     748#ifdef ORXONOX_OLD_CEGUI
     749        if(CEGUI::FontManager::getSingleton().isFontPresent(name)) // If a font with that name already exists.
     750            return;
     751
     752        CEGUI::Font* font = NULL;
     753        CEGUI::XMLAttributes xmlAttributes;
     754
     755        // Attributes specified within CEGUIFont
     756        xmlAttributes.add("Name", name);
     757        xmlAttributes.add("Filename", fontName);
     758        xmlAttributes.add("ResourceGroup", "");
     759        xmlAttributes.add("AutoScaled", "true");
     760        xmlAttributes.add("NativeHorzRes", "800");
     761        xmlAttributes.add("NativeVertRes", "600");
     762
     763        // Attributes specified within CEGUIXMLAttributes
     764        xmlAttributes.add("Size", multi_cast<std::string>(size));
     765        xmlAttributes.add("AntiAlias", "true");
     766
     767        font = CEGUI::FontManager::getSingleton().createFont("FreeType", xmlAttributes);
     768        if(font != NULL)
     769            font->load();
     770#else
     771        if(CEGUI::FontManager::getSingleton().isDefined(name)) // If a font with that name already exists.
     772            return;
     773
     774        CEGUI::FontManager::getSingleton().createFreeTypeFont(name, (float)size, true, fontName, "", true, 800.0f, 600.0f);
     775#endif
     776    }
     777
    731778}
  • code/trunk/src/libraries/core/GUIManager.h

    r8530 r8706  
    128128
    129129        // TODO: Temporary hack because the tolua exported CEGUI method does not seem to work
    130         static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export
    131         static void setTooltipTextHelper(CEGUI::ListboxItem* item, const std::string& toooltip); //tolua_export
    132         static void setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled); //tolua_export
     130        static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); // tolua_export
     131        static void setTooltipTextHelper(CEGUI::ListboxItem* item, const std::string& toooltip); // tolua_export
     132        static void setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled); // tolua_export
     133        static void addFontHelper(const std::string& name, int size, const std::string& fontName); // tolua_export
    133134
    134135        static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
     136
     137        /**
     138        @brief Check whether CEGUI is version < 0.7.
     139        @return Returns true if the CEGUI version is < 0.7. False otherwise.
     140        */
     141        inline bool usingOldCEGUI(void) { return this->oldCEGUI_; } // tolua_export
    135142
    136143    private:
     
    185192        static const std::string defaultScheme_;
    186193        std::string guiScheme_;
    187 
     194        bool oldCEGUI_;
     195       
    188196        int numScrollLines_; ///< How many lines to scroll in a list if the scroll wheel is used
    189197
  • code/trunk/src/libraries/core/Game.cc

    r8423 r8706  
    556556    {
    557557        this->bChangingState_ = true;
    558         LOKI_ON_BLOCK_EXIT_OBJ(*this, &Game::resetChangingState);
     558        LOKI_ON_BLOCK_EXIT_OBJ(*this, &Game::resetChangingState); (void)LOKI_ANONYMOUS_VARIABLE(scopeGuard);
    559559
    560560        // If state requires graphics, load it
  • code/trunk/src/libraries/core/GraphicsManager.h

    r8423 r8706  
    109109        // event from Ogre::LogListener
    110110        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
    111             bool maskDebug, const std::string& logName);
     111        bool maskDebug, const std::string& logName);
    112112
    113113        // console commands
  • code/trunk/src/libraries/core/Identifier.h

    r8351 r8706  
    119119
    120120            /// Returns the network ID to identify a class through the network.
    121             inline const uint32_t getNetworkID() const { return this->networkID_; }
     121            inline uint32_t getNetworkID() const { return this->networkID_; }
    122122            void setNetworkID(uint32_t id);
    123123
  • code/trunk/src/libraries/core/Super.h

    r8351 r8706  
    100100            } \
    101101            \
    102             static void apply(void* temp) {} \
     102            static void apply(void*) {} \
    103103            \
    104             static void apply(baseclass* temp) \
     104            static void apply(baseclass*) \
    105105            { \
    106106                ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier(); \
     
    312312        struct SuperFunctionInitialization
    313313        {
    314             static void initialize(ClassIdentifier<T>* identifier) {}
     314            static void initialize(ClassIdentifier<T>*) {}
    315315        };
    316316
     
    321321        struct SuperFunctionDestruction
    322322        {
    323             static void destroy(ClassIdentifier<T>* identifier) {}
     323            static void destroy(ClassIdentifier<T>*) {}
    324324        };
    325325
  • code/trunk/src/libraries/core/ThreadWin.cc

    • Property svn:eol-style set to native
  • code/trunk/src/libraries/core/command/Functor.h

    r7871 r8706  
    411411        // Helper class, used to call a function-pointer with a given object and parameters and to return its return-value (if available)
    412412        template <class R, class O, bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller                                              { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, P4, P5>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (object->*functionPointer)(param1, param2, param3, param4, param5); } };
    413         template <class R, class O, bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<R, O, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, P4, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (object->*functionPointer)(param1, param2, param3, param4); } };
    414         template <class R, class O, bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<R, O, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (object->*functionPointer)(param1, param2, param3); } };
    415         template <class R, class O, bool isconst, class P1, class P2>                               struct FunctorCaller<R, O, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, P2, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (object->*functionPointer)(param1, param2); } };
    416         template <class R, class O, bool isconst, class P1>                                         struct FunctorCaller<R, O, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (object->*functionPointer)(param1); } };
    417         template <class R, class O, bool isconst>                                                   struct FunctorCaller<R, O, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, void, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (object->*functionPointer)(); } };
     413        template <class R, class O, bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<R, O, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, P4, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { return (object->*functionPointer)(param1, param2, param3, param4); } };
     414        template <class R, class O, bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<R, O, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { return (object->*functionPointer)(param1, param2, param3); } };
     415        template <class R, class O, bool isconst, class P1, class P2>                               struct FunctorCaller<R, O, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, P2, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { return (object->*functionPointer)(param1, param2); } };
     416        template <class R, class O, bool isconst, class P1>                                         struct FunctorCaller<R, O, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (object->*functionPointer)(param1); } };
     417        template <class R, class O, bool isconst>                                                   struct FunctorCaller<R, O, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, void, void, void, void, void>::Type functionPointer, O* object, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (object->*functionPointer)(); } };
    418418        template <class O, bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<void, O, isconst, P1, P2, P3, P4, P5>           { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, P4, P5>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(param1, param2, param3, param4, param5); return MT_Type::Null; } };
    419         template <class O, bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<void, O, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, P4, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(param1, param2, param3, param4); return MT_Type::Null; } };
    420         template <class O, bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<void, O, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(param1, param2, param3); return MT_Type::Null; } };
    421         template <class O, bool isconst, class P1, class P2>                               struct FunctorCaller<void, O, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(param1, param2); return MT_Type::Null; } };
    422         template <class O, bool isconst, class P1>                                         struct FunctorCaller<void, O, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(param1); return MT_Type::Null; } };
    423         template <class O, bool isconst>                                                   struct FunctorCaller<void, O, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, void, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(); return MT_Type::Null; } };
     419        template <class O, bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<void, O, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, P4, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { (object->*functionPointer)(param1, param2, param3, param4); return MT_Type::Null; } };
     420        template <class O, bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<void, O, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { (object->*functionPointer)(param1, param2, param3); return MT_Type::Null; } };
     421        template <class O, bool isconst, class P1, class P2>                               struct FunctorCaller<void, O, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(param1, param2); return MT_Type::Null; } };
     422        template <class O, bool isconst, class P1>                                         struct FunctorCaller<void, O, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(param1); return MT_Type::Null; } };
     423        template <class O, bool isconst>                                                   struct FunctorCaller<void, O, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, void, void, void, void, void>::Type functionPointer, O* object, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(); return MT_Type::Null; } };
    424424        template <class R, bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<R, void, isconst, P1, P2, P3, P4, P5>           { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, P3, P4, P5>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (*functionPointer)(param1, param2, param3, param4, param5); } };
    425         template <class R, bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<R, void, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, P3, P4, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (*functionPointer)(param1, param2, param3, param4); } };
    426         template <class R, bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<R, void, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, P3, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (*functionPointer)(param1, param2, param3); } };
    427         template <class R, bool isconst, class P1, class P2>                               struct FunctorCaller<R, void, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (*functionPointer)(param1, param2); } };
    428         template <class R, bool isconst, class P1>                                         struct FunctorCaller<R, void, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (*functionPointer)(param1); } };
    429         template <class R, bool isconst>                                                   struct FunctorCaller<R, void, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, void, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (*functionPointer)(); } };
     425        template <class R, bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<R, void, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, P3, P4, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { return (*functionPointer)(param1, param2, param3, param4); } };
     426        template <class R, bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<R, void, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, P3, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { return (*functionPointer)(param1, param2, param3); } };
     427        template <class R, bool isconst, class P1, class P2>                               struct FunctorCaller<R, void, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { return (*functionPointer)(param1, param2); } };
     428        template <class R, bool isconst, class P1>                                         struct FunctorCaller<R, void, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (*functionPointer)(param1); } };
     429        template <class R, bool isconst>                                                   struct FunctorCaller<R, void, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, void, void, void, void, void>::Type functionPointer, void*, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (*functionPointer)(); } };
    430430        template <bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<void, void, isconst, P1, P2, P3, P4, P5>           { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, P4, P5>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(param1, param2, param3, param4, param5); return MT_Type::Null; } };
    431         template <bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<void, void, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, P4, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(param1, param2, param3, param4); return MT_Type::Null; } };
    432         template <bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<void, void, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(param1, param2, param3); return MT_Type::Null; } };
    433         template <bool isconst, class P1, class P2>                               struct FunctorCaller<void, void, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(param1, param2); return MT_Type::Null; } };
    434         template <bool isconst, class P1>                                         struct FunctorCaller<void, void, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(param1); return MT_Type::Null; } };
    435         template <bool isconst>                                                   struct FunctorCaller<void, void, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, void, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(); return MT_Type::Null; } };
     431        template <bool isconst, class P1, class P2, class P3, class P4>           struct FunctorCaller<void, void, isconst, P1, P2, P3, P4, void>         { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, P4, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { (*functionPointer)(param1, param2, param3, param4); return MT_Type::Null; } };
     432        template <bool isconst, class P1, class P2, class P3>                     struct FunctorCaller<void, void, isconst, P1, P2, P3, void, void>       { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { (*functionPointer)(param1, param2, param3); return MT_Type::Null; } };
     433        template <bool isconst, class P1, class P2>                               struct FunctorCaller<void, void, isconst, P1, P2, void, void, void>     { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(param1, param2); return MT_Type::Null; } };
     434        template <bool isconst, class P1>                                         struct FunctorCaller<void, void, isconst, P1, void, void, void, void>   { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(param1); return MT_Type::Null; } };
     435        template <bool isconst>                                                   struct FunctorCaller<void, void, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, void, void, void, void, void>::Type functionPointer, void*, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(); return MT_Type::Null; } };
    436436
    437437        // Helper class, used to identify the header of a function-pointer (independent of its class)
  • code/trunk/src/libraries/core/command/Shell.cc

    r8079 r8706  
    265265            return;
    266266
    267         size_t previous_offset = mod(this->historyOffset_ - 1, this->maxHistoryLength_);
     267        size_t previous_offset = mod(static_cast<int>(this->historyOffset_) - 1, this->maxHistoryLength_);
    268268        if (previous_offset < this->commandHistory_.size() && command == this->commandHistory_[previous_offset])
    269269            return;
  • code/trunk/src/libraries/network/LANDiscovery.cc

    r8351 r8706  
    3838namespace orxonox
    3939{
    40   ManageScopedSingleton(LANDiscovery, ScopeID::Root, true);
     40  ManageScopedSingleton(LANDiscovery, ScopeID::Graphics, true);
    4141
    4242  LANDiscovery::LANDiscovery()
     
    4949  LANDiscovery::~LANDiscovery()
    5050  {
    51     enet_host_destroy(this->host_);
     51    if (this->host_ != NULL)
     52      enet_host_destroy(this->host_);
    5253  }
    5354
  • code/trunk/src/libraries/network/Server.cc

    r8351 r8706  
    413413   
    414414    COUT(4) << "sending welcome" << std::endl;
    415     packet::Welcome *w = new packet::Welcome(clientID, OBJECTID_UNKNOWN);
     415    packet::Welcome *w = new packet::Welcome(clientID);
    416416    w->setPeerID(clientID);
    417417    b = w->send( static_cast<Host*>(this) );
  • code/trunk/src/libraries/network/packet/Welcome.cc

    r7801 r8706  
    4444#define _ENDIANTEST           _CLIENTID + sizeof(uint32_t)
    4545
    46   Welcome::Welcome( uint32_t clientID, uint32_t shipID )
     46  Welcome::Welcome( uint32_t clientID )
    4747 : Packet()
    4848{
  • code/trunk/src/libraries/network/packet/Welcome.h

    r7801 r8706  
    4141{
    4242public:
    43   Welcome( uint32_t clientID, uint32_t shipID );
     43  Welcome( uint32_t clientID );
    4444  Welcome( uint8_t* data, uint32_t clientID );
    4545  virtual ~Welcome();
  • code/trunk/src/libraries/network/synchronisable/Serialise.h

    r7284 r8706  
    8484
    8585    /** @brief returns the size of the objectID needed to synchronise the pointer */
    86     template <class T> inline uint32_t returnSize( const SmartPtr<T>& variable )
     86    template <class T> inline uint32_t returnSize( const SmartPtr<T>& )
    8787    {
    8888        return sizeof(uint32_t);
  • code/trunk/src/libraries/network/synchronisable/Synchronisable.cc

    r8329 r8706  
    383383  /**
    384384   * This function determines, wheter the object should be saved to the bytestream (according to its syncmode/direction)
    385    * @param id gamestate id
    386385   * @param mode Synchronisation mode (toclient, toserver or bidirectional)
    387386   * @return true/false
     
    397396  /**
    398397   * This function determines, wheter the object should accept data from the bytestream (according to its syncmode/direction)
    399    * @param id gamestate id
    400398   * @param mode Synchronisation mode (toclient, toserver or bidirectional)
    401399   * @return true/false
  • code/trunk/src/libraries/network/synchronisable/Synchronisable.h

    r8329 r8706  
    5050  namespace ObjectDirection{
    5151    enum Value{
     52      None=0x0,
    5253      ToClient=0x1,
    5354      ToServer=0x2,
  • code/trunk/src/libraries/util/Convert.h

    r8351 r8706  
    143143    struct ConverterFallback
    144144    {
    145         ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
     145        ORX_FORCEINLINE static bool convert(ToType* /*output*/, const FromType& /*input*/)
    146146        {
    147147            COUT(2) << "Could not convert value of type " << typeid(FromType).name()
  • code/trunk/src/libraries/util/Exception.h

    r7401 r8706  
    110110        virtual const std::string& getDescription()     const { return this->description_; }
    111111        //! Returns the line number on which the exception occurred.
    112         virtual const unsigned int getLineNumber()      const { return this->lineNumber_; }
     112        virtual unsigned int getLineNumber()            const { return this->lineNumber_; }
    113113        //! Returns the function in which the exception occurred.
    114114        virtual const std::string& getFunctionName()    const { return this->functionName_; }
  • code/trunk/src/libraries/util/Math.h

    r8351 r8706  
    174174            return (x % max);
    175175        else
    176             return ((x % max) + max);
     176        {
     177            T temp = x % max;
     178            return (temp < 0) ? (temp + max) : temp;
     179        }
    177180    }
    178181
  • code/trunk/src/libraries/util/MultiTypeValue.h

    r7401 r8706  
    255255        return 4*returnSize(this->value_.x);
    256256    }
    257     template <> inline void MT_Value<void*>::importData( uint8_t*& mem )
     257    template <> inline void MT_Value<void*>::importData( uint8_t*& /*mem*/ )
    258258    {
    259259        assert(0);
    260260    }
    261     template <> inline void MT_Value<void*>::exportData( uint8_t*& mem ) const
     261    template <> inline void MT_Value<void*>::exportData( uint8_t*& /*mem*/ ) const
    262262    {
    263263        assert(0);
  • code/trunk/src/libraries/util/ScopedSingletonManager.h

    r7401 r8706  
    247247
    248248        //! Destroys the singleton instance - overloaded for OrxonoxClass, calls OrxonoxClass::destroy()
    249         void destroy(OrxonoxClass* ptr)
     249        void destroy(OrxonoxClass*)
    250250        {
    251251            singletonPtr_->destroy();
    252252        }
    253253        //! Destroys the singleton instance - overloaded for void*, calls delete
    254         void destroy(void* ptr)
     254        void destroy(void*)
    255255        {
    256256            delete singletonPtr_;
  • code/trunk/src/libraries/util/Serialise.h

    r7401 r8706  
    8787// =========== bool
    8888
    89     template <> inline uint32_t returnSize( const bool& variable )
     89    template <> inline uint32_t returnSize( const bool& )
    9090    {
    9191        return sizeof(uint8_t);
     
    111111// =========== char
    112112
    113     template <> inline uint32_t returnSize( const char& variable )
     113    template <> inline uint32_t returnSize( const char& )
    114114    {
    115115        return sizeof(uint8_t);
     
    135135// =========== unsigned char
    136136
    137     template <> inline uint32_t returnSize( const unsigned char& variable )
     137    template <> inline uint32_t returnSize( const unsigned char& )
    138138    {
    139139        return sizeof(uint8_t);
     
    159159// =========== short
    160160
    161     template <> inline uint32_t returnSize( const short& variable )
     161    template <> inline uint32_t returnSize( const short& )
    162162    {
    163163        return sizeof(int16_t);
     
    183183// =========== unsigned short
    184184
    185     template <> inline uint32_t returnSize( const unsigned short& variable )
     185    template <> inline uint32_t returnSize( const unsigned short& )
    186186    {
    187187        return sizeof(uint16_t);
     
    207207// =========== int
    208208
    209     template <> inline uint32_t returnSize( const int& variable )
     209    template <> inline uint32_t returnSize( const int& )
    210210    {
    211211        return sizeof(int32_t);
     
    231231// =========== unsigned int
    232232
    233     template <> inline uint32_t returnSize( const unsigned int& variable )
     233    template <> inline uint32_t returnSize( const unsigned int& )
    234234    {
    235235        return sizeof(uint32_t);
     
    255255// =========== long
    256256
    257     template <> inline uint32_t returnSize( const long& variable )
     257    template <> inline uint32_t returnSize( const long& )
    258258    {
    259259        return sizeof(int32_t);
     
    279279// =========== unsigned long
    280280
    281     template <> inline uint32_t returnSize( const unsigned long& variable )
     281    template <> inline uint32_t returnSize( const unsigned long& )
    282282    {
    283283        return sizeof(uint32_t);
     
    303303// =========== long long
    304304
    305     template <> inline uint32_t returnSize( const long long& variable )
     305    template <> inline uint32_t returnSize( const long long& )
    306306    {
    307307        return sizeof(int64_t);
     
    327327// =========== unsigned long long
    328328
    329     template <> inline uint32_t returnSize( const unsigned long long& variable )
     329    template <> inline uint32_t returnSize( const unsigned long long& )
    330330    {
    331331        return sizeof(uint64_t);
     
    351351// =========== float
    352352
    353     template <> inline uint32_t returnSize( const float& variable )
     353    template <> inline uint32_t returnSize( const float& )
    354354    {
    355355        return sizeof(uint32_t);
     
    375375// =========== double
    376376
    377     template <> inline uint32_t returnSize( const double& variable )
     377    template <> inline uint32_t returnSize( const double& )
    378378    {
    379379        return sizeof(uint64_t);
     
    399399// =========== long double
    400400
    401     template <> inline uint32_t returnSize( const long double& variable )
     401    template <> inline uint32_t returnSize( const long double& )
    402402    {
    403403        return sizeof(uint64_t);
     
    452452// =========== Degree
    453453
    454     template <> inline uint32_t returnSize( const Degree& variable )
     454    template <> inline uint32_t returnSize( const Degree& )
    455455    {
    456456        return sizeof(Ogre::Real);
     
    479479// =========== Radian
    480480
    481     template <> inline uint32_t returnSize( const Radian& variable )
     481    template <> inline uint32_t returnSize( const Radian& )
    482482    {
    483483        return sizeof(Ogre::Real);
  • code/trunk/src/libraries/util/SubString.h

    r7401 r8706  
    110110            SL_COMMENT,           //!< In Comment mode.
    111111            SL_PARENTHESES,       //!< Between parentheses (usually '{' and '}')
    112             SL_PARENTHESESESCAPE, //!< Between parentheses with the internal escape character, that escapes even the closing paranthesis character.
     112            SL_PARENTHESESESCAPE, //!< Between parentheses with the internal escape character, that escapes even the closing parenthesis character.
    113113        };
    114114
     
    169169        /// Returns the number of tokens stored in this SubString
    170170        inline unsigned int size() const { return this->tokens_.size(); }
    171         /// Returns the i'th token from the subset of strings @param index The index of the requested doken
     171        /// Returns the i'th token from the subset of strings @param index The index of the requested token
    172172        inline const std::string& operator[](unsigned int index) const { return this->tokens_[index]; }
    173173        /// Returns the i'th token from the subset of strings @param index The index of the requested token
     
    209209                                          SPLIT_LINE_STATE start_state = SL_NORMAL);
    210210
    211         std::vector<std::string>  tokens_;              ///< The tokens after spliting the input line
     211        std::vector<std::string>  tokens_;              ///< The tokens after splitting the input line
    212212        std::vector<bool>         bTokenInSafemode_;    ///< Saves for each token if it was in safe mode (between quotation marks or parenthesis)
    213213    };
Note: See TracChangeset for help on using the changeset viewer.