Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5653


Ignore:
Timestamp:
Aug 17, 2009, 3:42:39 PM (15 years ago)
Author:
rgrieder
Message:

Added class to handle handle resources more easily via Ogre::ResourceGroupManager.
And modified the XMLFile to store the resource group as well.

Location:
code/branches/resource2/src
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/src/core/CMakeLists.txt

    r3370 r5653  
    3333  ObjectListBase.cc
    3434  OrxonoxClass.cc
     35  Resource.cc
    3536  WindowEventListener.cc
    3637
  • code/branches/resource2/src/core/CorePrereqs.h

    r3370 r5653  
    148148    class OgreWindowEventListener;
    149149    class OrxonoxClass;
     150    struct ResourceInfo;
    150151    class Shell;
    151152    class ShellListener;
     
    223224}
    224225
     226// Ogre
     227namespace Ogre
     228{
     229    class DataStream;
     230    template <class T> class SharedPtr;
     231    typedef SharedPtr<DataStream> DataStreamPtr;
     232}
     233namespace orxonox
     234{
     235    // Import the Ogre::DataStream
     236    using Ogre::DataStream;
     237    using Ogre::DataStreamPtr;
     238}
     239
    225240// CEGUI
    226241namespace CEGUI
  • code/branches/resource2/src/core/XMLFile.h

    r3196 r5653  
    4040    {
    4141        public:
    42             XMLFile(const std::string& filename) : filename_(filename) {}
    43             XMLFile(const std::string& filename, const ClassTreeMask& mask) : filename_(filename), mask_(mask) {};
     42            XMLFile(const std::string& filename, const std::string& resourceGroup = "General")
     43                : filename_(filename)
     44                , group_(resourceGroup)
     45            { }
     46            XMLFile(const ClassTreeMask& mask, const std::string& filename, const std::string& resourceGroup = "General")
     47                : filename_(filename)
     48                , group_(resourceGroup)
     49                , mask_(mask)
     50            { }
    4451
    4552            const std::string& getFilename() const { return this->filename_; }
     53            const std::string& getResourceGroup() const { return this->group_; }
    4654            const ClassTreeMask& getMask() const { return this->mask_; }
    4755
    4856        private:
    4957            std::string filename_;
     58            std::string group_;
    5059            ClassTreeMask mask_;
    5160    };
  • code/branches/resource2/src/orxonox/objects/Level.cc

    r5645 r5653  
    101101        mask.include(Class(OverlayGroup)); // HACK to include the ChatOverlay
    102102
    103         this->xmlfile_ = new XMLFile(Core::getDataPathString() + this->xmlfilename_, mask);
     103        this->xmlfile_ = new XMLFile(mask, this->xmlfilename_);
    104104
    105105        Loader::open(this->xmlfile_);
Note: See TracChangeset for help on using the changeset viewer.