[Orxonox-commit 5999] r10658 - code/branches/hoverHS15/src/modules/hover

meierman at orxonox.net meierman at orxonox.net
Mon Oct 19 14:32:33 CEST 2015


Author: meierman
Date: 2015-10-19 14:32:32 +0200 (Mon, 19 Oct 2015)
New Revision: 10658

Added:
   code/branches/hoverHS15/src/modules/hover/CMakeLists.txt
   code/branches/hoverHS15/src/modules/hover/Hover.cc
   code/branches/hoverHS15/src/modules/hover/Hover.h
Log:
new basic files added to Hover

Added: code/branches/hoverHS15/src/modules/hover/CMakeLists.txt
===================================================================
--- code/branches/hoverHS15/src/modules/hover/CMakeLists.txt	                        (rev 0)
+++ code/branches/hoverHS15/src/modules/hover/CMakeLists.txt	2015-10-19 12:32:32 UTC (rev 10658)
@@ -0,0 +1,13 @@
+SET_SOURCE_FILES(Hover_SRC_FILES
+Hover.cc
+HoverShip.cc
+)
+
+ORXONOX_ADD_LIBRARY(hover
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${Hover_SRC_FILES}
+)

Added: code/branches/hoverHS15/src/modules/hover/Hover.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/Hover.cc	                        (rev 0)
+++ code/branches/hoverHS15/src/modules/hover/Hover.cc	2015-10-19 12:32:32 UTC (rev 10658)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      Florian Zinggeler
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Hover.cc
+    @brief Implementation of the Hover class.
+*/
+
+#include "Hover.h"
+#include "HoverShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterUnloadableClass(Hover);
+
+    Hover::Hover(Context* context) : GameType(context)
+    {
+        RegisterObject(Hover);
+
+        //this->setHUDTemplate("HoverHUD");
+    }
+
+
+
+    void Hover::tick(float dt)
+    {
+
+        SUPER(Hover, tick, dt);
+    }
+
+    
+
+    void Hover::start()
+    {
+
+        // Call start for the parent class.
+        GameType::start();
+    }
+
+
+    void Hover::end()
+    {
+        // DON'T CALL THIS!
+        //      Deathmatch::end();
+        // It will misteriously crash the game!
+        // Instead startMainMenu, this won't crash.
+        GSLevel::startMainMenu();
+    }
+}

Added: code/branches/hoverHS15/src/modules/hover/Hover.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/Hover.h	                        (rev 0)
+++ code/branches/hoverHS15/src/modules/hover/Hover.h	2015-10-19 12:32:32 UTC (rev 10658)
@@ -0,0 +1,83 @@
+/*
+ *   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:
+ *      Florian Zinggeler
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Hover.h
+    @brief Gametype.
+    @ingroup Hover
+*/
+
+#ifndef _Hover_H__
+#define _Hover_H__
+
+#include "Hover/HoverPrereqs.h"
+
+#include "HoverCenterPoint.h" // Necessary for WeakPointer??
+//#include "HoverShip.h"        DO NOT include in Header. Will cause forward declaration issues
+
+//#include "HoverHUDinfo.h"
+
+
+#include "core/EventIncludes.h"
+#include "core/command/Executor.h"
+#include "core/config/ConfigValueIncludes.h"
+
+#include "gamestates/GSLevel.h"
+#include "chat/ChatManager.h"
+#include <vector>
+
+// ! HACK
+#include "infos/PlayerInfo.h"
+
+#include "core/command/ConsoleCommand.h"
+#include "worldentities/BigExplosion.h"
+
+#include "gametypes/Deathmatch.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+
+    class Hover : public GameType
+    {
+       public:
+            Hover(Context* context);
+
+            virtual void start();
+            virtual void end();
+
+            virtual void tick(float dt);
+
+            void setCenterpoint(HoverCenterPoint* center)
+                       { this->center_ = center; }
+
+
+    };
+}
+
+#endif /* _Hover_H__ */




More information about the Orxonox-commit mailing list