Revision: 1644
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1644&view=rev
Author: rorthomas
Date: 2011-02-05 20:20:34 +0000 (Sat, 05 Feb 2011)
Log Message:
-----------
do not use nedmalloc anymore, inconsistent usage can have bad effects
moved content initialization after main data initialization
Modified Paths:
--------------
trunk/source/main/RigsOfRods.cpp
trunk/source/main/RoRPrerequisites.h
Modified: trunk/source/main/RigsOfRods.cpp
===================================================================
--- trunk/source/main/RigsOfRods.cpp 2011-02-05 20:19:04 UTC (rev 1643)
+++ trunk/source/main/RigsOfRods.cpp 2011-02-05 20:20:34 UTC (rev 1644)
@@ -247,21 +247,10 @@
//streams path, to be processed later by the cache system
LogManager::getSingleton().logMessage("Loading filesystems");
- //main synced streams
-
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("Streams
Path"), "FileSystem", "Streams");
- exploreStreams(); //this will explore subdirs and register them as
Packs dirs
- //cache, flat
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"cache", "FileSystem", "cache");
//config, flat
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"config", "FileSystem",
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
//packs, to be processed later by the cache system
-
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"packs", "FileSystem", "Packs", true);
- //user vehicles, to be processed later by the cache system
-
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"vehicles", "FileSystem", "VehicleFolders");
- exploreVehicles(); //this will add subdirs contents into General
- //user terrains, to be processed later by the cache system
-
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"terrains", "FileSystem", "TerrainFolders");
- exploreTerrains(); //this will add subdirs contents into General
// add scripts folder
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"scripts", "FileSystem", "Scripts", true);
@@ -349,6 +338,29 @@
#ifdef USE_OPENAL
if(ssm) ssm->setLoadingBaseSounds(false);
#endif // USE_OPENAL
+
+
+ // and the content
+ //main synced streams
+
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("Streams
Path"), "FileSystem", "Streams");
+ exploreStreams(); //this will explore subdirs and register them as
Packs dirs
+ //cache, flat
+
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"packs", "FileSystem", "Packs", true);
+ //user vehicles, to be processed later by the cache system
+
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"vehicles", "FileSystem", "VehicleFolders");
+ exploreVehicles(); //this will add subdirs contents into General
+ //user terrains, to be processed later by the cache system
+
ResourceGroupManager::getSingleton().addResourceLocation(SETTINGS.getSetting("User
Path")+"terrains", "FileSystem", "TerrainFolders");
+ exploreTerrains(); //this will add subdirs contents into General
+ LogManager::getSingleton().logMessage("initialiseAllResourceGroups() -
Content");
+ try
+ {
+
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+ } catch(Ogre::Exception& e)
+ {
+ LogManager::getSingleton().logMessage("catched error while
initializing Content Resource groups: " + e.getFullDescription());
+ }
+
//rgm.initialiseResourceGroup(ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
#ifndef NOLANG
@@ -479,9 +491,17 @@
rgm.addResourceLocation(filename, "FileSystem", "Packs");
// HACK: add subfolders
- rgm.addResourceLocation(filename+dirsep+"vehicles",
"FileSystem", "VehicleFolders");
- rgm.addResourceLocation(filename+dirsep+"terrains",
"FileSystem", "TerrainFolders");
+ rgm.addResourceLocation(filename+dirsep+"vehicles",
"FileSystem", "streams");
+ rgm.addResourceLocation(filename+dirsep+"terrains",
"FileSystem", "streams");
}
+ LogManager::getSingleton().logMessage("initialiseResourceGroups:
streams");
+ try
+ {
+
ResourceGroupManager::getSingleton().initialiseResourceGroup("streams");
+ } catch(Ogre::Exception& e)
+ {
+ LogManager::getSingleton().logMessage("catched error while
initializing streams Resource groups: " + e.getFullDescription());
+ }
}
void RigsOfRods::exploreVehicles()
@@ -503,6 +523,14 @@
//add textures/temp for unpacked ddx support
rgm.addResourceLocation(fullpath+(*iterFiles).filename+dirsep+"textures"+dirsep+"temp",
"FileSystem", "VehicleFolders");
}
+ LogManager::getSingleton().logMessage("initialiseResourceGroups:
VehicleFolders");
+ try
+ {
+
ResourceGroupManager::getSingleton().initialiseResourceGroup("VehicleFolders");
+ } catch(Ogre::Exception& e)
+ {
+ LogManager::getSingleton().logMessage("catched error while
initializing VehicleFolders Resource groups: " + e.getFullDescription());
+ }
}
void RigsOfRods::exploreTerrains()
@@ -534,4 +562,12 @@
rgm.addResourceLocation(fullpath+(*iterFiles).filename+dirsep+"Templates",
"FileSystem", "TerrainFolders");
rgm.addResourceLocation(fullpath+(*iterFiles).filename+dirsep+"Terrain",
"FileSystem", "TerrainFolders");
}
+ LogManager::getSingleton().logMessage("initialiseResourceGroups:
TerrainFolders");
+ try
+ {
+
ResourceGroupManager::getSingleton().initialiseResourceGroup("TerrainFolders");
+ } catch(Ogre::Exception& e)
+ {
+ LogManager::getSingleton().logMessage("catched error while
initializing TerrainFolders Resource groups: " + e.getFullDescription());
+ }
}
Modified: trunk/source/main/RoRPrerequisites.h
===================================================================
--- trunk/source/main/RoRPrerequisites.h 2011-02-05 20:19:04 UTC (rev
1643)
+++ trunk/source/main/RoRPrerequisites.h 2011-02-05 20:20:34 UTC (rev
1644)
@@ -32,8 +32,10 @@
#define RORPREREQUISITES_H__
// replace standard allocations with nedmalloc
-#define REPLACE_SYSTEM_ALLOCATOR
-#include "nedmalloc.h"
+//#define REPLACE_SYSTEM_ALLOCATOR
+//#include "nedmalloc.h"
+//CAUTION, do not try to use normal free on nedmalloc'ed memory and the other
way round
+// if you are not sure that this replacement is consistent, better leave it
out.
class AeroEngine;
class Airfoil;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel