diff options
Diffstat (limited to 'caelum-ogre-1.9.patch')
-rw-r--r-- | caelum-ogre-1.9.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/caelum-ogre-1.9.patch b/caelum-ogre-1.9.patch new file mode 100644 index 000000000000..ec452eeefc2f --- /dev/null +++ b/caelum-ogre-1.9.patch @@ -0,0 +1,53 @@ +--- main/include/CaelumPrerequisites.h Fri Sep 19 17:39:48 2014 +0300 ++++ main/include/CaelumPrerequisites.h Thu Nov 06 13:02:20 2014 +0100 +@@ -52,7 +52,9 @@ + + // By default only compile type descriptors for scripting. + #ifndef CAELUM_TYPE_DESCRIPTORS +- #if (OGRE_VERSION >= 0x00010600) && OGRE_USE_NEW_COMPILERS ++ #if (OGRE_VERSION >= 0x00010900) ++ #define CAELUM_TYPE_DESCRIPTORS 1 ++ #elif (OGRE_VERSION >= 0x00010600) && OGRE_USE_NEW_COMPILERS + #define CAELUM_TYPE_DESCRIPTORS 1 + #else + #define CAELUM_TYPE_DESCRIPTORS 0 +@@ -71,8 +73,8 @@ + #if !(OGRE_VERSION > 0x00010600) + #error "Caelum script support requires Ogre 1.6." + #endif +- #if !(OGRE_USE_NEW_COMPILERS) +- #error "Caelum script support requires Ogre 1.6 with OGRE_USE_NEW_COMPILERS." ++ #if (OGRE_VERSION < 0x00010900) && !(OGRE_USE_NEW_COMPILERS) ++ #error "Caelum script support requires Ogre 1.6 with OGRE_USE_NEW_COMPILERS or 1.9." + #endif + #if !(CAELUM_TYPE_DESCRIPTORS) + #error "Caelum script support also requires type descriptors." + +--- main/src/CaelumPlugin.cpp Fri Sep 19 17:39:48 2014 +0300 ++++ main/src/CaelumPlugin.cpp Thu Nov 06 13:02:20 2014 +0100 +@@ -134,7 +134,9 @@ + assert (this->isInstalled () && "Must install CaelumPlugin before loading scripts"); + + // Fetch raw resource ptr. Attempt to support explicit resource groups currently in Ogre trunk. +-#if OGRE_VERSION >= 0x00010700 ++#if OGRE_VERSION >= 0x00010900 ++ Ogre::ResourcePtr res = getPropScriptResourceManager ()->createOrRetrieve (objectName, groupName).first; ++#elif OGRE_VERSION >= 0x00010700 + Ogre::ResourcePtr res = getPropScriptResourceManager ()->getByName (objectName, groupName); + #else + Ogre::ResourcePtr res = getPropScriptResourceManager ()->getByName (objectName); + +--- main/src/CaelumScriptTranslator.cpp Fri Sep 19 17:39:48 2014 +0300 ++++ main/src/CaelumScriptTranslator.cpp Thu Nov 06 13:02:20 2014 +0100 +@@ -422,7 +422,11 @@ + //LogManager::getSingleton ().logMessage ( + // "Caelum: Saved " + objNode->cls + " name " + objNode->name + " as a resource"); + PropScriptResourceManager* mgr = this->getResourceManager (); ++#if OGRE_VERSION >= 0x00010900 ++ ResourcePtr resource = mgr->createResource (objNode->name, compiler->getResourceGroup()); ++#else + ResourcePtr resource = mgr->create (objNode->name, compiler->getResourceGroup()); ++#endif + resource->_notifyOrigin (objNode->file); + return; + } |