[Orxonox-commit 915] r5638 - code/branches/libraries/src/orxonox/gamestates
landauf at orxonox.net
landauf at orxonox.net
Wed Aug 12 17:13:29 CEST 2009
Author: landauf
Date: 2009-08-12 17:13:28 +0200 (Wed, 12 Aug 2009)
New Revision: 5638
Added:
code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h
Modified:
code/branches/libraries/src/orxonox/gamestates/CMakeLists.txt
code/branches/libraries/src/orxonox/gamestates/GSClient.h
code/branches/libraries/src/orxonox/gamestates/GSDedicated.h
code/branches/libraries/src/orxonox/gamestates/GSGraphics.h
code/branches/libraries/src/orxonox/gamestates/GSIOConsole.h
code/branches/libraries/src/orxonox/gamestates/GSLevel.h
code/branches/libraries/src/orxonox/gamestates/GSMainMenu.h
code/branches/libraries/src/orxonox/gamestates/GSRoot.h
code/branches/libraries/src/orxonox/gamestates/GSServer.h
code/branches/libraries/src/orxonox/gamestates/GSStandalone.h
Log:
Put all gamestates into a new plugin (gamestates)
Modified: code/branches/libraries/src/orxonox/gamestates/CMakeLists.txt
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/CMakeLists.txt 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/CMakeLists.txt 2009-08-12 15:13:28 UTC (rev 5638)
@@ -1,4 +1,4 @@
-ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+SET_SOURCE_FILES(GAMESTATES_SRC_FILES
GSClient.cc
GSDedicated.cc
GSGraphics.cc
@@ -9,3 +9,12 @@
GSServer.cc
GSStandalone.cc
)
+
+ORXONOX_ADD_LIBRARY(gamestates
+ PLUGIN
+ DEFINE_SYMBOL
+ "GAMESTATES_SHARED_BUILD"
+ LINK_LIBRARIES
+ orxonox
+ SOURCE_FILES ${GAMESTATES_SRC_FILES}
+)
Modified: code/branches/libraries/src/orxonox/gamestates/GSClient.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSClient.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSClient.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,14 +29,14 @@
#ifndef _GSClient_H__
#define _GSClient_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "core/GameState.h"
#include "network/NetworkPrereqs.h"
namespace orxonox
{
- class _OrxonoxExport GSClient : public GameState
+ class _GamestatesExport GSClient : public GameState
{
public:
GSClient(const GameStateInfo& info);
Modified: code/branches/libraries/src/orxonox/gamestates/GSDedicated.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSDedicated.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSDedicated.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,7 +29,7 @@
#ifndef _GSDedicated_H__
#define _GSDedicated_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "core/GameState.h"
#include "network/NetworkPrereqs.h"
@@ -43,8 +43,8 @@
namespace orxonox
{
-
- class _OrxonoxExport GSDedicated : public GameState
+
+ class _GamestatesExport GSDedicated : public GameState
{
public:
GSDedicated(const GameStateInfo& info);
@@ -60,12 +60,12 @@
void processQueue();
void setTerminalMode();
static void resetTerminalMode();
-
+
void insertCharacter( unsigned int position, char c );
void deleteCharacter( unsigned int position );
-
+
Server* server_;
-
+
boost::thread *inputThread_;
boost::recursive_mutex inputLineMutex_;
boost::recursive_mutex inputQueueMutex_;
@@ -75,7 +75,7 @@
unsigned int inputIterator_;
std::queue<std::string> commandQueue_;
static termios* originalTerminalSettings_;
-
+
unsigned int cursorX_;
unsigned int cursorY_;
};
Modified: code/branches/libraries/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSGraphics.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSGraphics.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -35,7 +35,7 @@
#ifndef _GSGraphics_H__
#define _GSGraphics_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "core/GameState.h"
namespace orxonox
@@ -46,7 +46,7 @@
This game state is only left out if we start a dedicated server where no graphics are present.
*/
- class _OrxonoxExport GSGraphics : public GameState
+ class _GamestatesExport GSGraphics : public GameState
{
public:
GSGraphics(const GameStateInfo& info);
Modified: code/branches/libraries/src/orxonox/gamestates/GSIOConsole.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSIOConsole.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSIOConsole.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,12 +29,12 @@
#ifndef _GSIOConsole_H__
#define _GSIOConsole_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "core/GameState.h"
namespace orxonox
{
- class _OrxonoxExport GSIOConsole : public GameState
+ class _GamestatesExport GSIOConsole : public GameState
{
public:
GSIOConsole(const GameStateInfo& info);
Modified: code/branches/libraries/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSLevel.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSLevel.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,7 +29,7 @@
#ifndef _GSLevel_H__
#define _GSLevel_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include <string>
#include "core/OrxonoxClass.h"
@@ -37,7 +37,7 @@
namespace orxonox
{
- class _OrxonoxExport GSLevel : public GameState, public OrxonoxClass
+ class _GamestatesExport GSLevel : public GameState, public OrxonoxClass
{
public:
GSLevel(const GameStateInfo& info);
Modified: code/branches/libraries/src/orxonox/gamestates/GSMainMenu.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSMainMenu.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSMainMenu.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,14 +29,14 @@
#ifndef _GSMainMenu_H__
#define _GSMainMenu_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "util/OgreForwardRefs.h"
#include "core/GameState.h"
namespace orxonox
{
- class _OrxonoxExport GSMainMenu : public GameState
+ class _GamestatesExport GSMainMenu : public GameState
{
public:
GSMainMenu(const GameStateInfo& info);
Modified: code/branches/libraries/src/orxonox/gamestates/GSRoot.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSRoot.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSRoot.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,12 +29,12 @@
#ifndef _GSRoot_H__
#define _GSRoot_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "core/GameState.h"
namespace orxonox
{
- class _OrxonoxExport GSRoot : public GameState
+ class _GamestatesExport GSRoot : public GameState
{
public:
GSRoot(const GameStateInfo& info);
Modified: code/branches/libraries/src/orxonox/gamestates/GSServer.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSServer.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSServer.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,14 +29,14 @@
#ifndef _GSServer_H__
#define _GSServer_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "core/GameState.h"
#include "network/NetworkPrereqs.h"
namespace orxonox
{
- class _OrxonoxExport GSServer : public GameState
+ class _GamestatesExport GSServer : public GameState
{
public:
GSServer(const GameStateInfo& info);
Modified: code/branches/libraries/src/orxonox/gamestates/GSStandalone.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSStandalone.h 2009-08-12 15:06:34 UTC (rev 5637)
+++ code/branches/libraries/src/orxonox/gamestates/GSStandalone.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -29,12 +29,12 @@
#ifndef _GSStandalone_H__
#define _GSStandalone_H__
-#include "OrxonoxPrereqs.h"
+#include "gamestates/GamestatesPrereqs.h"
#include "core/GameState.h"
namespace orxonox
{
- class _OrxonoxExport GSStandalone : public GameState
+ class _GamestatesExport GSStandalone : public GameState
{
public:
GSStandalone(const GameStateInfo& info);
Added: code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h (rev 0)
+++ code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h 2009-08-12 15:13:28 UTC (rev 5638)
@@ -0,0 +1,60 @@
+/*
+ * 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:
+ * ...
+ *
+ */
+
+/**
+ @file
+ @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _GamestatesPrereqs_H__
+#define _GamestatesPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+# ifdef GAMESTATES_SHARED_BUILD
+# define _GamestatesExport __declspec(dllexport)
+# else
+# if defined( __MINGW32__ )
+# define _GamestatesExport
+# else
+# define _GamestatesExport __declspec(dllimport)
+# endif
+# endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+# define _GamestatesExport __attribute__ ((visibility("default")))
+#else
+# define _GamestatesExport
+#endif
+
+#endif /* _GamestatesPrereqs_H__ */
Property changes on: code/branches/libraries/src/orxonox/gamestates/GamestatesPrereqs.h
___________________________________________________________________
Added: svn:eol-style
+ native
More information about the Orxonox-commit
mailing list