[Orxonox-commit 3496] r8182 - in code/branches/spacerace/src/modules: . gametypes
dafrick at orxonox.net
dafrick at orxonox.net
Mon Apr 4 13:37:50 CEST 2011
Author: dafrick
Date: 2011-04-04 13:37:50 +0200 (Mon, 04 Apr 2011)
New Revision: 8182
Added:
code/branches/spacerace/src/modules/gametypes/
code/branches/spacerace/src/modules/gametypes/CMakeLists.txt
code/branches/spacerace/src/modules/gametypes/GametypesPrecompiledHeaders.h
code/branches/spacerace/src/modules/gametypes/GametypesPrereqs.h
code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
code/branches/spacerace/src/modules/gametypes/SpaceRace.h
Modified:
code/branches/spacerace/src/modules/CMakeLists.txt
Log:
Readding spacerace files.
Modified: code/branches/spacerace/src/modules/CMakeLists.txt
===================================================================
--- code/branches/spacerace/src/modules/CMakeLists.txt 2011-04-04 11:35:59 UTC (rev 8181)
+++ code/branches/spacerace/src/modules/CMakeLists.txt 2011-04-04 11:37:50 UTC (rev 8182)
@@ -26,6 +26,7 @@
################ Sub Directories ################
ADD_SUBDIRECTORY(designtools)
+ADD_SUBDIRECTORY(gametypes)
ADD_SUBDIRECTORY(notifications)
ADD_SUBDIRECTORY(objects)
ADD_SUBDIRECTORY(overlays)
Added: code/branches/spacerace/src/modules/gametypes/CMakeLists.txt
===================================================================
--- code/branches/spacerace/src/modules/gametypes/CMakeLists.txt (rev 0)
+++ code/branches/spacerace/src/modules/gametypes/CMakeLists.txt 2011-04-04 11:37:50 UTC (rev 8182)
@@ -0,0 +1,14 @@
+SET_SOURCE_FILES(GAMETYPES_SRC_FILES
+ SpaceRace.cc
+)
+
+ORXONOX_ADD_LIBRARY(gametypes
+ MODULE
+ FIND_HEADER_FILES
+ TOLUA_FILES
+ PCH_FILE
+ GametypesPrecompiledHeaders.h
+ LINK_LIBRARIES
+ orxonox
+ SOURCE_FILES ${GAMETYPES_SRC_FILES}
+)
Added: code/branches/spacerace/src/modules/gametypes/GametypesPrecompiledHeaders.h
===================================================================
--- code/branches/spacerace/src/modules/gametypes/GametypesPrecompiledHeaders.h (rev 0)
+++ code/branches/spacerace/src/modules/gametypes/GametypesPrecompiledHeaders.h 2011-04-04 11:37:50 UTC (rev 8182)
@@ -0,0 +1,53 @@
+/*
+ * 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
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+///// Stable Headers /////
+///////////////////////////////////////////
+
+#include <LinearMath/btTransform.h>
+
+///////////////////////////////////////////
+///// All Rebuild Headers /////
+///////////////////////////////////////////
+
+#include "core/BaseObject.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Added: code/branches/spacerace/src/modules/gametypes/GametypesPrereqs.h
===================================================================
--- code/branches/spacerace/src/modules/gametypes/GametypesPrereqs.h (rev 0)
+++ code/branches/spacerace/src/modules/gametypes/GametypesPrereqs.h 2011-04-04 11:37:50 UTC (rev 8182)
@@ -0,0 +1,70 @@
+/*
+ * 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:
+ * Damian 'Mozork' Frick
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ at file
+ at brief
+ Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _GametypesPrereqs_H__
+#define _GametypesPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Gametypes_STATIC_BUILD)
+# ifdef Gametypes_SHARED_BUILD
+# define _GametypesExport __declspec(dllexport)
+# else
+# if defined( __MINGW32__ )
+# define _GametypesExport
+# else
+# define _GametypesExport __declspec(dllimport)
+# endif
+# endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+# define _GametypesExport __attribute__ ((visibility("default")))
+#else
+# define _GametypesExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+ class SpaceRace;
+}
+
+#endif /* _GametypesPrereqs_H__ */
Added: code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.cc (rev 0)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.cc 2011-04-04 11:37:50 UTC (rev 8182)
@@ -0,0 +1,50 @@
+/*
+ * 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:
+ * Aurelian Jaggi
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "SpaceRace.h"
+
+#include "core/CoreIncludes.h"
+#include "network/Host.h"
+
+namespace orxonox{
+ CreateUnloadableFactory(SpaceRace);
+
+ SpaceRace::SpaceRace(BaseObject* creator) : Gametype(creator)
+ {
+ RegisterObject(SpaceRace);
+ this->numberOfCheckpoints_ = 0;
+ this->checkpointsReached_ = 0;
+ this->numberOfBots_ = 0;
+ }
+
+ void SpaceRace::tick(float dt)
+ {
+ orxonox::Gametype::tick(dt);
+ }
+
+}
\ No newline at end of file
Added: code/branches/spacerace/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.h (rev 0)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.h 2011-04-04 11:37:50 UTC (rev 8182)
@@ -0,0 +1,62 @@
+/*
+ * 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:
+ * Aurelian Jaggi
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _SpaceRace_H__
+#define _SpaceRace_H__
+
+#include "gametypes/Gametype.h"
+#include "gametypes/GametypesPrereqs.h"
+#include "objects/triggers/DistanceTriggerBeacon.h"
+#include <boost/concept_check.hpp>
+
+namespace orxonox
+{
+ class _OrxonoxExport SpaceRace : public Gametype
+ {
+ public:
+ SpaceRace(BaseObject* creator);
+ virtual ~SpaceRace(){};
+
+ virtual void tick(float dt);
+
+ virtual void start();
+ virtual void end();
+
+ protected:
+ inline void newCheckpointReached()
+ { this->checkpointsReached++; }
+ inline bool lastCheckpointReached()
+ { return (this->checkpointsReached == this->numberOfCheckpoints); }
+ private:
+ int numberOfCheckpoints_;
+ int checkpointsReached_;
+
+ };
+}
+
+#endif
More information about the Orxonox-commit
mailing list