[Orxonox-commit 5038] r9702 - in code/branches/invaders/src/modules: . invader
zifloria at orxonox.net
zifloria at orxonox.net
Mon Oct 14 17:44:27 CEST 2013
Author: zifloria
Date: 2013-10-14 17:44:27 +0200 (Mon, 14 Oct 2013)
New Revision: 9702
Added:
code/branches/invaders/src/modules/invader/
code/branches/invaders/src/modules/invader/CMakeLists.txt
code/branches/invaders/src/modules/invader/Invader.cc
code/branches/invaders/src/modules/invader/Invader.h
code/branches/invaders/src/modules/invader/InvaderPrereqs.h
Log:
more of the same
Added: code/branches/invaders/src/modules/invader/CMakeLists.txt
===================================================================
--- code/branches/invaders/src/modules/invader/CMakeLists.txt (rev 0)
+++ code/branches/invaders/src/modules/invader/CMakeLists.txt 2013-10-14 15:44:27 UTC (rev 9702)
@@ -0,0 +1,14 @@
+SET_SOURCE_FILES(Invader_SRC_FILES
+BUILD_UNIT InvaderBuildUnit.cc
+ Invader.cc
+END_BUILD_UNIT
+)
+
+ORXONOX_ADD_LIBRARY(Invader
+ MODULE
+ FIND_HEADER_FILES
+ LINK_LIBRARIES
+ orxonox
+ overlays
+ SOURCE_FILES ${Invader_SRC_FILES}
+)
Added: code/branches/invaders/src/modules/invader/Invader.cc
===================================================================
--- code/branches/invaders/src/modules/invader/Invader.cc (rev 0)
+++ code/branches/invaders/src/modules/invader/Invader.cc 2013-10-14 15:44:27 UTC (rev 9702)
@@ -0,0 +1,72 @@
+/*
+ * 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 Invader.cc
+ @brief Implementation of the Invader class.
+*/
+
+#include "Invader.h"
+
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/command/Executor.h"
+#include "core/config/ConfigValueIncludes.h"
+
+#include "gamestates/GSLevel.h"
+#include "chat/ChatManager.h"
+
+namespace orxonox
+{
+ RegisterUnloadableClass(Invader);
+
+ Invader::Invader(Context* context) : Deathmatch(context)
+ {
+ RegisterObject(Invader);
+
+ }
+
+ Invader::~Invader()
+ {
+ }
+
+ void Invader::start()
+ {
+ // Set variable to temporarily force the player to spawn.
+ this->bForceSpawn_ = true;
+
+ // Call start for the parent class.
+ Deathmatch::start();
+ }
+
+ void Invader::end()
+ {
+ // Call end for the parent class.
+ Deathmatch::end();
+ }
+}
Added: code/branches/invaders/src/modules/invader/Invader.h
===================================================================
--- code/branches/invaders/src/modules/invader/Invader.h (rev 0)
+++ code/branches/invaders/src/modules/invader/Invader.h 2013-10-14 15:44:27 UTC (rev 9702)
@@ -0,0 +1,56 @@
+/*
+ * 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 Invader.h
+ @brief Declaration of the Invader class.
+ @ingroup Invader
+*/
+
+#ifndef _Invader_H__
+#define _Invader_H__
+
+#include "invader/InvaderPrereqs.h"
+
+#include "gametypes/Deathmatch.h"
+
+namespace orxonox
+{
+
+ class _InvaderExport Invader : public Deathmatch
+ {
+ public:
+ Invader(Context* context); //!< Constructor. Registers and initializes the object.
+ virtual ~Invader(); //!< Destructor. Cleans up, if initialized.
+
+ virtual void start(); //!< Starts the Invader minigame.
+ virtual void end(); ///!< Ends the Invader minigame.
+ };
+}
+
+#endif /* _Invader_H__ */
Added: code/branches/invaders/src/modules/invader/InvaderPrereqs.h
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderPrereqs.h (rev 0)
+++ code/branches/invaders/src/modules/invader/InvaderPrereqs.h 2013-10-14 15:44:27 UTC (rev 9702)
@@ -0,0 +1,73 @@
+/*
+ * 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:
+ * Reto Grieder
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ at file
+ at brief
+ Shared library macros, enums, constants and forward declarations for the Invader module
+*/
+
+#ifndef _InvaderPrereqs_H__
+#define _InvaderPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Invader_STATIC_BUILD)
+# ifdef Invader_SHARED_BUILD
+# define _InvaderExport __declspec(dllexport)
+# else
+# if defined( __MINGW32__ )
+# define _InvaderExport
+# else
+# define _InvaderExport __declspec(dllimport)
+# endif
+# endif
+# define _InvaderPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+# define _InvaderExport __attribute__ ((visibility("default")))
+# define _InvaderPrivate __attribute__ ((visibility("hidden")))
+#else
+# define _InvaderExport
+# define _InvaderPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+ class Invader;
+}
+
+#endif /* _InvaderPrereqs_H__ */
More information about the Orxonox-commit
mailing list