[Orxonox-commit 155] r2837 - in branches/map/src/orxonox/overlays: . map

Naaduun at orxonox.net Naaduun at orxonox.net
Tue Mar 24 13:06:10 CET 2009


Author: Naaduun
Date: 2009-03-24 12:06:10 +0000 (Tue, 24 Mar 2009)
New Revision: 2837

Added:
   branches/map/src/orxonox/overlays/map/
   branches/map/src/orxonox/overlays/map/CMakeLists.txt
   branches/map/src/orxonox/overlays/map/Map.cc
   branches/map/src/orxonox/overlays/map/Map.h
Modified:
   branches/map/src/orxonox/overlays/CMakeLists.txt
Log:
added Map class

Modified: branches/map/src/orxonox/overlays/CMakeLists.txt
===================================================================
--- branches/map/src/orxonox/overlays/CMakeLists.txt	2009-03-23 16:00:54 UTC (rev 2836)
+++ branches/map/src/orxonox/overlays/CMakeLists.txt	2009-03-24 12:06:10 UTC (rev 2837)
@@ -7,6 +7,7 @@
 ADD_SUBDIRECTORY(console)
 ADD_SUBDIRECTORY(debug)
 ADD_SUBDIRECTORY(hud)
+ADD_SUBDIRECTORY(map)
 ADD_SUBDIRECTORY(notifications)
 ADD_SUBDIRECTORY(stats)
 

Added: branches/map/src/orxonox/overlays/map/CMakeLists.txt
===================================================================
--- branches/map/src/orxonox/overlays/map/CMakeLists.txt	                        (rev 0)
+++ branches/map/src/orxonox/overlays/map/CMakeLists.txt	2009-03-24 12:06:10 UTC (rev 2837)
@@ -0,0 +1,3 @@
+ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+  Map.cc
+)

Added: branches/map/src/orxonox/overlays/map/Map.cc
===================================================================
--- branches/map/src/orxonox/overlays/map/Map.cc	                        (rev 0)
+++ branches/map/src/orxonox/overlays/map/Map.cc	2009-03-24 12:06:10 UTC (rev 2837)
@@ -0,0 +1,69 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program 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 this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Si Sun
+ *
+ */
+#include "OrxonoxStableHeaders.h"
+#include "Map.h"
+ 
+#include <string>
+#include <OgreOverlay.h>
+#include <OgreOverlayElement.h>
+#include <OgreOverlayManager.h>
+#include <OgreOverlayContainer.h>
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/ConsoleCommand.h"
+#include "objects/Scene.h"
+ 
+ namespace orxonox
+ {
+    CreateFactory(Map);
+     SetConsoleCommand(Map, openMap, true);
+    
+    Map::Map(BaseObject* creator) : OrxonoxOverlay(creator)
+    {
+        RegisterObject(Map);
+        
+        //COUT(0) << "Map loaded\n" << this->getScene();
+        Ogre::SceneManager* sm = this->getScene()->getSceneManager();
+        Ogre::SceneNode* sn = new Ogre::SceneNode(sm);
+        COUT(0) << "Map loaded\n" << sm << " / " << sn << std::endl;
+    }
+    
+    void Map::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(Map, XMLPort, xmlElement, mode);
+    }
+    
+    void Map::changedVisibility()
+    {
+        SUPER(Map, changedVisibility);
+        
+    }
+    
+    void Map::tick(float dt)
+    {
+    }
+    
+ }

Added: branches/map/src/orxonox/overlays/map/Map.h
===================================================================
--- branches/map/src/orxonox/overlays/map/Map.h	                        (rev 0)
+++ branches/map/src/orxonox/overlays/map/Map.h	2009-03-24 12:06:10 UTC (rev 2837)
@@ -0,0 +1,69 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program 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 this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Si Sun
+ *
+ */
+
+#ifndef _MAP_H__
+#define _MAP_H__
+
+
+#include "OrxonoxPrereqs.h"
+#include <OgrePrerequisites.h>
+
+#include <OgreBorderPanelOverlayElement.h>
+#include <OgreTextAreaOverlayElement.h>
+
+#include "overlays/OrxonoxOverlay.h"
+#include "objects/Tickable.h"
+
+
+namespace orxonox
+{
+    class _OrxonoxExport Map : public OrxonoxOverlay, public Tickable
+    {
+
+    public: // functions
+        Map(BaseObject* creator);
+        virtual ~Map() {}
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+
+        virtual void changedVisibility();
+        
+        inline static void openMap()
+            {
+                COUT(0) << "Opening Map";
+            }
+        
+    private: // functions
+
+
+    private: // variables
+
+
+    };
+}
+
+#endif /* _MAP_H__ */




More information about the Orxonox-commit mailing list