tomka 15/01/12 13:05:17
Added:ogre-1.9-compat.patch
Log:
bump, compatibility with ogre-1.9, make 0.4.3 depend on old ogre (bug #528480)
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key
565C32BC)
Revision ChangesPath
1.1 games-strategy/freeorion/files/ogre-1.9-compat.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-strategy/freeorion/files/ogre-1.9-compat.patch?rev=1.1view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-strategy/freeorion/files/ogre-1.9-compat.patch?rev=1.1content-type=text/plain
Index: ogre-1.9-compat.patch
===
diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/include/BatchedGeometry.h
freeorion-0.4.4/PagedGeometry/include/BatchedGeometry.h
--- freeorion-0.4.4-orig/PagedGeometry/include/BatchedGeometry.h
2015-01-12 13:16:19.480177578 +0100
+++ freeorion-0.4.4/PagedGeometry/include/BatchedGeometry.h 2015-01-12
13:44:40.700200986 +0100
@@ -88,7 +88,11 @@
void setMaterialName(const Ogre::String mat, const Ogre::String rg =
Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
{
-m_ptrMaterial =
Ogre::MaterialManager::getSingleton().getByName(mat, rg);
+#if (OGRE_VERSION ((1 16) | (9 8) | 0))
+ m_ptrMaterial =
Ogre::MaterialManager::getSingleton().getByName(mat, rg);
+#else
+ m_ptrMaterial =
Ogre::MaterialManager::getSingleton().getByName(mat,
rg).staticCastOgre::Material();
+#endif
}
/// Get material name. Be careful, resource group name missing
diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/BatchedGeometry.cpp
freeorion-0.4.4/PagedGeometry/source/BatchedGeometry.cpp
--- freeorion-0.4.4-orig/PagedGeometry/source/BatchedGeometry.cpp
2015-01-12 13:16:19.470177578 +0100
+++ freeorion-0.4.4/PagedGeometry/source/BatchedGeometry.cpp2015-01-12
13:29:10.890188192 +0100
@@ -479,7 +479,11 @@
// that the user may be using somewhere else).
{
Ogre::String newName = parentMaterial-getName() + _Batched;
- m_ptrMaterial = MaterialManager::getSingleton().getByName(newName,
parentMaterial-getGroup());
+ #if (OGRE_VERSION ((1 16) | (9 8) | 0))
+ m_ptrMaterial = MaterialManager::getSingleton().getByName(newName,
parentMaterial-getGroup());
+ #else
+ m_ptrMaterial = MaterialManager::getSingleton().getByName(newName,
parentMaterial-getGroup()).staticCastMaterial();
+ #endif
if (m_ptrMaterial.isNull())
m_ptrMaterial = parentMaterial-clone(newName);
}
diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/BatchPage.cpp
freeorion-0.4.4/PagedGeometry/source/BatchPage.cpp
--- freeorion-0.4.4-orig/PagedGeometry/source/BatchPage.cpp 2015-01-12
13:16:19.470177578 +0100
+++ freeorion-0.4.4/PagedGeometry/source/BatchPage.cpp 2015-01-12
13:27:56.810187173 +0100
@@ -472,7 +472,11 @@
}
//Search for the desired material
- MaterialPtr generatedMaterial =
MaterialManager::getSingleton().getByName(materialSignature.str());
+ #if (OGRE_VERSION ((1 16) | (9 8) | 0))
+ MaterialPtr generatedMaterial =
MaterialManager::getSingleton().getByName(materialSignature.str());
+ #else
+ MaterialPtr generatedMaterial =
MaterialManager::getSingleton().getByName(materialSignature.str()).staticCastOgre::Material();
+ #endif
if (generatedMaterial.isNull())
{
//Clone the material
diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/GrassLoader.cpp
freeorion-0.4.4/PagedGeometry/source/GrassLoader.cpp
--- freeorion-0.4.4-orig/PagedGeometry/source/GrassLoader.cpp 2015-01-12
13:16:19.470177578 +0100
+++ freeorion-0.4.4/PagedGeometry/source/GrassLoader.cpp2015-01-12
13:31:39.330190235 +0100
@@ -765,7 +765,11 @@
void GrassLayer::setMaterialName(const String matName)
{
if (material.isNull() || matName != material-getName()){
- material = MaterialManager::getSingleton().getByName(matName);
+ #if (OGRE_VERSION ((1 16) | (9 8) | 0))
+ material =
MaterialManager::getSingleton().getByName(matName);
+ #else
+ material =
MaterialManager::getSingleton().getByName(matName).staticCastMaterial();
+ #endif
if (material.isNull())
OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, The
specified grass material does not exist, GrassLayer::setMaterialName());
shaderNeedsUpdate = true;
@@ -1128,7 +1132,11 @@
const String matName = material-getName() + _ +
vsName;
//Check if the desired material already exists (if not,
create it)
-