Revision: 2706
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2706&view=rev
Author:   ulteq
Date:     2012-05-26 18:35:57 +0000 (Sat, 26 May 2012)
Log Message:
-----------
renamed GEnv.h to GlobalEnvironment.h

Modified Paths:
--------------
    trunk/source/main/RoRPrerequisites.h
    trunk/source/main/gameplay/Landusemap.cpp
    trunk/source/main/gameplay/Landusemap.h
    trunk/source/main/gameplay/RoRFrameListener.cpp
    trunk/source/main/physics/collision/collisions.cpp

Added Paths:
-----------
    trunk/source/main/GlobalEnvironment.h

Removed Paths:
-------------
    trunk/source/main/GEnv.h

Deleted: trunk/source/main/GEnv.h
===================================================================
--- trunk/source/main/GEnv.h    2012-05-26 18:21:04 UTC (rev 2705)
+++ trunk/source/main/GEnv.h    2012-05-26 18:35:57 UTC (rev 2706)
@@ -1,73 +0,0 @@
-/*
-This source file is part of Rigs of Rods
-Copyright 2005-2012 Pierre-Michel Ricordel
-Copyright 2007-2012 Thomas Fischer
-
-For more information, see http://www.rigsofrods.com/
-
-Rigs of Rods is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 3, as
-published by the Free Software Foundation.
-
-Rigs of Rods is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Rigs of Rods.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef GEnv_H__
-#define GEnv_H__
-
-class RoRFrameListener;
-class TerrainManager;
-class Collisions;
-class IHeightFinder;
-class Water;
-class Network;
-class MapControl;
-class Character;
-class SkyManager;
-
-class GlobalEnvironment
-{
-public:
-       GlobalEnvironment() :
-             ogreRoot(0)
-               , ogreViewPort(0)
-               , ogreRenderWindow(0)
-               , ogreCamera(0)
-               , ogreSceneManager(0)
-               , frameListener(0)
-               , terrainManager(0)
-               , collisions(0)
-               , heightFinder(0)
-               , water(0)
-               , network(0)
-               , surveyMap(0)
-               , player(0)
-               , sky(0)
-               , embeddedMode(false)
-       {
-       }
-       Ogre::Root *ogreRoot;
-       Ogre::Viewport *ogreViewPort;
-       Ogre::RenderWindow *ogreRenderWindow;
-       Ogre::Camera *ogreCamera;
-       Ogre::SceneManager *ogreSceneManager;
-
-       RoRFrameListener *frameListener;
-       TerrainManager *terrainManager;
-       Collisions *collisions;
-       IHeightFinder *heightFinder;
-       Water *water;
-       Network *network;
-       MapControl *surveyMap;
-       Character *player;
-       SkyManager *sky;
-
-       bool embeddedMode;
-};
-
-#endif // GEnv_H__

Copied: trunk/source/main/GlobalEnvironment.h (from rev 2704, 
trunk/source/main/GEnv.h)
===================================================================
--- trunk/source/main/GlobalEnvironment.h                               (rev 0)
+++ trunk/source/main/GlobalEnvironment.h       2012-05-26 18:35:57 UTC (rev 
2706)
@@ -0,0 +1,74 @@
+/*
+This source file is part of Rigs of Rods
+Copyright 2005-2012 Pierre-Michel Ricordel
+Copyright 2007-2012 Thomas Fischer
+
+For more information, see http://www.rigsofrods.com/
+
+Rigs of Rods is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 3, as
+published by the Free Software Foundation.
+
+Rigs of Rods is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Rigs of Rods.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef __GlobalEnvironment_H_
+#define __GlobalEnvironment_H_
+
+class RoRFrameListener;
+class TerrainManager;
+class Collisions;
+class IHeightFinder;
+class Water;
+class Network;
+class MapControl;
+class Character;
+class SkyManager;
+
+class GlobalEnvironment
+{
+public:
+       GlobalEnvironment() :
+                 collisions(0)
+               , embeddedMode(false)
+               , frameListener(0)
+               , heightFinder(0)
+               , network(0)
+               , ogreCamera(0)
+               , ogreRenderWindow(0)
+               , ogreSceneManager(0)
+               , ogreViewPort(0)
+               , player(0)
+               , sky(0)
+               , surveyMap(0)
+               , terrainManager(0)
+               , water(0)
+           , ogreRoot(0)
+       {
+       }
+
+       Ogre::Camera *ogreCamera;
+       Ogre::RenderWindow *ogreRenderWindow;
+       Ogre::Root *ogreRoot;
+       Ogre::SceneManager *ogreSceneManager;
+       Ogre::Viewport *ogreViewPort;
+
+       Character *player;
+       Collisions *collisions;
+       IHeightFinder *heightFinder;
+       MapControl *surveyMap;
+       Network *network;
+       RoRFrameListener *frameListener;
+       SkyManager *sky;
+       TerrainManager *terrainManager;
+       Water *water;
+
+       bool embeddedMode;
+};
+
+#endif // __GlobalEnvironment_H_

Modified: trunk/source/main/RoRPrerequisites.h
===================================================================
--- trunk/source/main/RoRPrerequisites.h        2012-05-26 18:21:04 UTC (rev 
2705)
+++ trunk/source/main/RoRPrerequisites.h        2012-05-26 18:35:57 UTC (rev 
2706)
@@ -39,7 +39,7 @@
 #include <OgreQuaternion.h>
 #include <OgreUTFString.h>
 
-#include "GEnv.h"
+#include "GlobalEnvironment.h"
 
 // some config for angelscript, doesnt matter if we compile with angelscript 
or not as its just a definition
 #ifdef USE_ANGELSCRIPT

Modified: trunk/source/main/gameplay/Landusemap.cpp
===================================================================
--- trunk/source/main/gameplay/Landusemap.cpp   2012-05-26 18:21:04 UTC (rev 
2705)
+++ trunk/source/main/gameplay/Landusemap.cpp   2012-05-26 18:35:57 UTC (rev 
2706)
@@ -17,6 +17,7 @@
 You should have received a copy of the GNU General Public License
 along with Rigs of Rods.  If not, see <http://www.gnu.org/licenses/>.
 */
+#if 0
 #include "Landusemap.h"
 #include "collisions.h"
 #include <Ogre.h>
@@ -25,7 +26,9 @@
 #include <OgreStringConverter.h>
 #include "language.h"
 #include "errorutils.h"
+#include ""
 
+
 #ifdef USE_PAGED
 #include "PropertyMaps.h"
 #include "PagedGeometry.h"
@@ -35,9 +38,11 @@
 
 // this is the Height-Finder for the standart ogre Terrain Manager
 
-Landusemap::Landusemap(String configFilename, Collisions *c, int _mapsizex, 
int _mapsizez) :
-       data(0), coll(c), mapsizex(_mapsizex), mapsizez(_mapsizez)
+Landusemap::Landusemap(String configFilename) : 
+         data(0)
+       , mapsize(Vector3::ZERO)
 {
+       mapsize = gEnv->terrainManager->getMax();
        loadConfig(configFilename);
 #ifndef USE_PAGED
        LOG("RoR was not compiled with PagedGeometry support. You cannot use 
Landuse maps with it.");
@@ -179,3 +184,4 @@
 #endif // USE_PAGED
        return 0;
 }
+#endif
\ No newline at end of file

Modified: trunk/source/main/gameplay/Landusemap.h
===================================================================
--- trunk/source/main/gameplay/Landusemap.h     2012-05-26 18:21:04 UTC (rev 
2705)
+++ trunk/source/main/gameplay/Landusemap.h     2012-05-26 18:35:57 UTC (rev 
2706)
@@ -18,29 +18,29 @@
 along with Rigs of Rods.  If not, see <http://www.gnu.org/licenses/>.
 */
 //created by thomas fischer 23 February 2009
-#ifndef __Tractionmap_H__
-#define __Tractionmap_H__
+#if 0
+#ifndef __LandUseMap_H_
+#define __LandUseMap_H_
 
 #include "RoRPrerequisites.h"
-#include <OgrePrerequisites.h>
-#include <OgreVector3.h>
-#include "collisions.h"
 
 class Landusemap
 {
-protected:
-       ground_model_t **data;
-       int mapsizex;
-       int mapsizez;
-       ground_model_t *default_ground_model;
-       Collisions *coll;
+public:
 
-public:
-       Landusemap(Ogre::String cfgfilename, Collisions *c, int mapsizex, int 
mapsizez);
+       Landusemap(Ogre::String cfgfilename);
        ~Landusemap();
 
        ground_model_t *getGroundModelAt(int x, int z);
        int loadConfig(Ogre::String filename);
+
+protected:
+
+       ground_model_t **data;
+       ground_model_t *default_ground_model;
+
+       Ogre::Vector3 mapsize;
 };
 
-#endif
+#endif // __LandUseMap_H_
+#endif 0
\ No newline at end of file

Modified: trunk/source/main/gameplay/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.cpp     2012-05-26 18:21:04 UTC 
(rev 2705)
+++ trunk/source/main/gameplay/RoRFrameListener.cpp     2012-05-26 18:35:57 UTC 
(rev 2706)
@@ -2757,9 +2757,9 @@
 #endif //OIS_G27
 
        LOG(" ** Shutdown final");
-       if (w) w->prepareShutdown();
+       if (gEnv->water) gEnv->water->prepareShutdown();
        if (dashboard) dashboard->prepareShutdown();
-       if (envmap) envmap->prepareShutdown();
+       if (gEnv->terrainManager->envmap) 
gEnv->terrainManager->envmap->prepareShutdown();
        if (heathaze) heathaze->prepareShutdown();
 
        Beam *curr_truck = BeamFactory::getSingleton().getCurrentTruck();
@@ -2807,17 +2807,16 @@
 
        LOG("Loading new terrain format: " + terrainfile);
 
-       if(terrainManager)
+       if (gEnv->terrainManager)
        {
                // remove old terrain
-               delete(terrainManager);
+               delete(gEnv->terrainManager);
        }
 
-       terrainManager = new TerrainManager(mSceneMgr, mWindow, mCamera, 
person);
-       gEnv->terrainManager = terrainManager;
+       gEnv->terrainManager = new TerrainManager();
        terrainManager->loadTerrain(terrainfile);
 
-       if (person) person->setVisible(true);
+       if (gEnv->player) gEnv->player->setVisible(true);
 
 #ifdef USE_MYGUI
        LoadingWindow::getSingleton().hide();

Modified: trunk/source/main/physics/collision/collisions.cpp
===================================================================
--- trunk/source/main/physics/collision/collisions.cpp  2012-05-26 18:21:04 UTC 
(rev 2705)
+++ trunk/source/main/physics/collision/collisions.cpp  2012-05-26 18:35:57 UTC 
(rev 2706)
@@ -29,7 +29,6 @@
 #include "Scripting.h"
 #include "Settings.h"
 #include "TerrainManager.h"
-//#include "TerrainGeometryManager.h"
 
 // some gcc fixes
 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to