Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 2583e6f287731e75c7c919b0268b9ea7 > files > 2

funguloids-1.06-0.pre0.4mdv2008.0.src.rpm

--- funguloids-1.06-0/src/ogreapp.cpp.root	2007-04-16 01:43:47.000000000 +0200
+++ funguloids-1.06-0/src/ogreapp.cpp	2007-05-02 13:21:23.000000000 +0200
@@ -36,6 +36,17 @@
 extern HINSTANCE hInstance;	// from main.cpp
 #endif
 
+#ifdef OGRE_PLATFORM_LINUX
+extern String getFunguloidsDir();
+#endif
+
+// Defines for the different paths
+#ifndef OGRE_PLUGINS_AND_RESOURCES_PATH // This path needs read only access
+#define OGRE_PLUGINS_AND_RESOURCES_PATH ""
+#endif
+#ifndef OGRE_CONFIG_AND_LOG_PATH        // This path needs rw access
+#define OGRE_CONFIG_AND_LOG_PATH getFunguloidsDir()
+#endif
 
 
 OgreApplication::~OgreApplication() {
@@ -63,7 +74,11 @@
 
 // Setup
 bool OgreApplication::setup() {
-	mRoot = new Root();
+	mRoot = new Root(
+		String(OGRE_PLUGINS_AND_RESOURCES_PATH) + "plugins.cfg",
+		OGRE_CONFIG_AND_LOG_PATH + "ogre.cfg",
+		OGRE_CONFIG_AND_LOG_PATH + "Ogre.log"
+		);
 
 	// Random seed
 	srand(time(NULL));