Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 15, 2010, 3:27:09 PM (15 years ago)
Author:
dafrick
Message:

Merged pickup branch into trunk. Yay. Persisting bugs will be fixed, very soon.

Location:
code/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

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

    r6417 r6524  
    115115        XMLPortParam(BaseObject, "active", setActive, isActive, xmlelement, mode);
    116116        XMLPortParam(BaseObject, "mainstate", setMainStateName, getMainStateName, xmlelement, mode);
    117 
     117        XMLPortParamTemplate(BaseObject, "template", addTemplate, getSingleTemplate, xmlelement, mode, const std::string&);
     118       
    118119        XMLPortObjectTemplate(BaseObject, Template, "templates", addTemplate, getTemplate, xmlelement, mode, Template*);
    119120        XMLPortObject(BaseObject, BaseObject, "eventlisteners", addEventListener, getEventListener, xmlelement, mode);
     
    190191
    191192    /**
     193        @brief Returns the name of the first Template.
     194        @return The name as string.
     195    */
     196    const std::string& BaseObject::getSingleTemplate(void) const
     197    {
     198        if(this->templates_.empty())
     199            return BLANKSTRING;
     200
     201        return (*this->templates_.begin())->getName();
     202    }
     203
     204    /**
    192205        @brief Returns the Template with the given index.
    193206        @param index The index
  • code/trunk/src/libraries/core/BaseObject.h

    r6417 r6524  
    195195
    196196            void setXMLName(const std::string& name);
     197            const std::string& getSingleTemplate(void) const;
    197198            Template* getTemplate(unsigned int index) const;
    198199            void registerEventStates();
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r6502 r6524  
    318318        this->viewport_ = this->renderWindow_->addViewport(0, 0);
    319319
    320         Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(0);
     320        Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(Ogre::MIP_UNLIMITED);
    321321
    322322        // add console commands
  • code/trunk/src/libraries/core/OrxonoxClass.h

    r6417 r6524  
    3939
    4040#include "CorePrereqs.h"
     41#include "Super.h"
    4142
    4243#include <set>
     
    107108            bool isParentOf(const OrxonoxClass* object);
    108109            bool isDirectParentOf(const OrxonoxClass* object);
     110           
     111            virtual void clone(OrxonoxClass*& item) {}
    109112
    110113            inline unsigned int getReferenceCount() const
     
    169172            std::vector<std::pair<unsigned int, void*> > objectPointers_;
    170173    };
     174   
     175    SUPER_FUNCTION(11, OrxonoxClass, clone, true);
     176   
    171177}
    172178
  • code/trunk/src/libraries/core/Super.h

    r5929 r6524  
    267267    #define SUPER_changedGametype(classname, functionname, ...) \
    268268        SUPER_NOARGS(classname, functionname)
     269       
     270    #define SUPER_changedUsed(classname, functionname, ...) \
     271        SUPER_NOARGS(classname, functionname)
     272       
     273    #define SUPER_clone(classname, functionname, ...) \
     274        SUPER_ARGS(classname, functionname, __VA_ARGS__)
     275       
     276    #define SUPER_changedCarrier(classname, functionname, ...) \
     277        SUPER_NOARGS(classname, functionname)
     278       
     279    #define SUPER_changedPickedUp(classname, functionname, ...) \
     280        SUPER_NOARGS(classname, functionname)
     281       
    269282    // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
    270283
     
    517530            ()
    518531        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
     532       
     533        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedUsed, false)
     534            ()
     535        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
     536
     537        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, clone, true, OrxonoxClass* item)
     538            (item)
     539        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
     540       
     541        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(12, changedCarrier, false)
     542            ()
     543        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
     544       
     545        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(13, changedPickedUp, false)
     546            ()
     547        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
     548
    519549        // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
    520550
     
    570600    SUPER_INTRUSIVE_DECLARATION(changedName);
    571601    SUPER_INTRUSIVE_DECLARATION(changedGametype);
     602    SUPER_INTRUSIVE_DECLARATION(changedUsed);
     603    SUPER_INTRUSIVE_DECLARATION(clone);
     604    SUPER_INTRUSIVE_DECLARATION(changedCarrier);
     605    SUPER_INTRUSIVE_DECLARATION(changedPickedUp);
    572606    // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
    573607
Note: See TracChangeset for help on using the changeset viewer.