[Orxonox-commit 164] r2843 - in branches/gui/src/orxonox: gamestates objects/worldentities tools
rgrieder at orxonox.net
rgrieder at orxonox.net
Wed Mar 25 16:34:40 CET 2009
Author: rgrieder
Date: 2009-03-25 15:34:40 +0000 (Wed, 25 Mar 2009)
New Revision: 2843
Added:
branches/gui/src/orxonox/tools/TimeFactorListener.cc
branches/gui/src/orxonox/tools/TimeFactorListener.h
Modified:
branches/gui/src/orxonox/gamestates/GSRoot.cc
branches/gui/src/orxonox/gamestates/GSRoot.h
branches/gui/src/orxonox/objects/worldentities/Backlight.h
branches/gui/src/orxonox/tools/CMakeLists.txt
branches/gui/src/orxonox/tools/ParticleInterface.h
branches/gui/src/orxonox/tools/Timer.h
Log:
Exported TimeFactorListener to separate file in the tools folder.
Modified: branches/gui/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- branches/gui/src/orxonox/gamestates/GSRoot.cc 2009-03-25 15:21:45 UTC (rev 2842)
+++ branches/gui/src/orxonox/gamestates/GSRoot.cc 2009-03-25 15:34:40 UTC (rev 2843)
@@ -34,6 +34,7 @@
#include "core/Core.h"
#include "core/CoreIncludes.h"
#include "core/ConsoleCommand.h"
+#include "tools/TimeFactorListener.h"
#include "tools/Timer.h"
#include "objects/Tickable.h"
#include "Game.h"
@@ -170,14 +171,4 @@
}
}
}
-
- ////////////////////////
- // TimeFactorListener //
- ////////////////////////
- float TimeFactorListener::timefactor_s = 1.0f;
-
- TimeFactorListener::TimeFactorListener()
- {
- RegisterRootObject(TimeFactorListener);
- }
}
Modified: branches/gui/src/orxonox/gamestates/GSRoot.h
===================================================================
--- branches/gui/src/orxonox/gamestates/GSRoot.h 2009-03-25 15:21:45 UTC (rev 2842)
+++ branches/gui/src/orxonox/gamestates/GSRoot.h 2009-03-25 15:34:40 UTC (rev 2843)
@@ -67,23 +67,6 @@
ConsoleCommand* ccSetTimeFactor_;
ConsoleCommand* ccPause_;
};
-
- class _OrxonoxExport TimeFactorListener : virtual public OrxonoxClass
- {
- friend class GSRoot;
-
- public:
- TimeFactorListener();
- virtual ~TimeFactorListener() {}
-
- protected:
- virtual void changedTimeFactor(float factor_new, float factor_old) {}
- inline float getTimeFactor() const
- { return TimeFactorListener::timefactor_s; }
-
- private:
- static float timefactor_s;
- };
}
#endif /* _GSRoot_H__ */
Modified: branches/gui/src/orxonox/objects/worldentities/Backlight.h
===================================================================
--- branches/gui/src/orxonox/objects/worldentities/Backlight.h 2009-03-25 15:21:45 UTC (rev 2842)
+++ branches/gui/src/orxonox/objects/worldentities/Backlight.h 2009-03-25 15:34:40 UTC (rev 2843)
@@ -31,7 +31,7 @@
#include "OrxonoxPrereqs.h"
#include "FadingBillboard.h"
-#include "gamestates/GSRoot.h"
+#include "tools/TimeFactorListener.h"
namespace orxonox
{
Modified: branches/gui/src/orxonox/tools/CMakeLists.txt
===================================================================
--- branches/gui/src/orxonox/tools/CMakeLists.txt 2009-03-25 15:21:45 UTC (rev 2842)
+++ branches/gui/src/orxonox/tools/CMakeLists.txt 2009-03-25 15:34:40 UTC (rev 2843)
@@ -4,6 +4,7 @@
ParticleInterface.cc
Shader.cc
TextureGenerator.cc
+ TimeFactorListener.cc
Timer.cc
WindowEventListener.cc
)
Modified: branches/gui/src/orxonox/tools/ParticleInterface.h
===================================================================
--- branches/gui/src/orxonox/tools/ParticleInterface.h 2009-03-25 15:21:45 UTC (rev 2842)
+++ branches/gui/src/orxonox/tools/ParticleInterface.h 2009-03-25 15:34:40 UTC (rev 2843)
@@ -36,7 +36,7 @@
#include "core/OrxonoxClass.h"
#include "util/Math.h"
-#include "gamestates/GSRoot.h"
+#include "tools/TimeFactorListener.h"
#define getAllEmitters() \
storeThisAsCurrentParticleInterface(); \
Added: branches/gui/src/orxonox/tools/TimeFactorListener.cc
===================================================================
--- branches/gui/src/orxonox/tools/TimeFactorListener.cc (rev 0)
+++ branches/gui/src/orxonox/tools/TimeFactorListener.cc 2009-03-25 15:34:40 UTC (rev 2843)
@@ -0,0 +1,41 @@
+/*
+ * 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:
+ * ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "TimeFactorListener.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+ float TimeFactorListener::timefactor_s = 1.0f;
+
+ TimeFactorListener::TimeFactorListener()
+ {
+ RegisterRootObject(TimeFactorListener);
+ }
+}
Property changes on: branches/gui/src/orxonox/tools/TimeFactorListener.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Added: branches/gui/src/orxonox/tools/TimeFactorListener.h
===================================================================
--- branches/gui/src/orxonox/tools/TimeFactorListener.h (rev 0)
+++ branches/gui/src/orxonox/tools/TimeFactorListener.h 2009-03-25 15:34:40 UTC (rev 2843)
@@ -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:
+ * Reto Grieder
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _TimeFactorListener_H__
+#define _TimeFactorListener_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+
+namespace orxonox
+{
+ class _OrxonoxExport TimeFactorListener : virtual public OrxonoxClass
+ {
+ friend class GSRoot;
+
+ public:
+ TimeFactorListener();
+ virtual ~TimeFactorListener() {}
+
+ protected:
+ virtual void changedTimeFactor(float factor_new, float factor_old) {}
+ inline float getTimeFactor() const
+ { return TimeFactorListener::timefactor_s; }
+
+ private:
+ static float timefactor_s;
+ };
+}
+
+#endif /* _TimeFactorListener_H__ */
Property changes on: branches/gui/src/orxonox/tools/TimeFactorListener.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: branches/gui/src/orxonox/tools/Timer.h
===================================================================
--- branches/gui/src/orxonox/tools/Timer.h 2009-03-25 15:21:45 UTC (rev 2842)
+++ branches/gui/src/orxonox/tools/Timer.h 2009-03-25 15:34:40 UTC (rev 2843)
@@ -63,7 +63,7 @@
#include "OrxonoxPrereqs.h"
#include "core/Executor.h"
#include "core/OrxonoxClass.h"
-#include "gamestates/GSRoot.h"
+#include "tools/TimeFactorListener.h"
namespace orxonox
{
More information about the Orxonox-commit
mailing list