blob: ec452eeefc2fe18ae06b815869503c3b60c37ecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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;
}
|