[Orxonox-commit 4000] r8674 - in code/branches/unity_build/src: libraries/tools modules/pong modules/weapons/munitions modules/weapons/projectiles orxonox/gametypes orxonox/weaponsystem
rgrieder at orxonox.net
rgrieder at orxonox.net
Mon May 30 00:01:33 CEST 2011
Author: rgrieder
Date: 2011-05-30 00:01:33 +0200 (Mon, 30 May 2011)
New Revision: 8674
Modified:
code/branches/unity_build/src/libraries/tools/Shader.h
code/branches/unity_build/src/libraries/tools/Timer.cc
code/branches/unity_build/src/libraries/tools/Timer.h
code/branches/unity_build/src/modules/pong/PongAI.cc
code/branches/unity_build/src/modules/weapons/munitions/ReplenishingMunition.cc
code/branches/unity_build/src/modules/weapons/projectiles/LightningGunProjectile.cc
code/branches/unity_build/src/orxonox/gametypes/Dynamicmatch.cc
code/branches/unity_build/src/orxonox/weaponsystem/Munition.cc
Log:
Reduced some header file dependencies in tools:
- moved Timer::setTimer() to source file
Modified: code/branches/unity_build/src/libraries/tools/Shader.h
===================================================================
--- code/branches/unity_build/src/libraries/tools/Shader.h 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/libraries/tools/Shader.h 2011-05-29 22:01:33 UTC (rev 8674)
@@ -31,14 +31,11 @@
#include "tools/ToolsPrereqs.h"
-#include <map>
+#include <list>
#include <string>
-#include <vector>
-
#include <OgreCompositorInstance.h>
#include "util/MultiType.h"
-#include "util/OgreForwardRefs.h"
#include "core/ViewportEventListener.h"
namespace orxonox
Modified: code/branches/unity_build/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/unity_build/src/libraries/tools/Timer.cc 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/libraries/tools/Timer.cc 2011-05-29 22:01:33 UTC (rev 8674)
@@ -41,6 +41,7 @@
#include "core/CoreIncludes.h"
#include "core/command/ConsoleCommand.h"
#include "core/command/CommandExecutor.h"
+#include "core/command/Executor.h"
#include "core/command/Functor.h"
#include "tools/interfaces/TimeFactorListener.h"
@@ -177,6 +178,26 @@
}
/**
+ @brief Initializes and starts the timer, which will call an executor after some time.
+ @param interval The timer-interval in seconds
+ @param bLoop If true, the executor gets called every @a interval seconds
+ @param executor The executor that will be called
+ @param bKillAfterCall If true, the timer will be deleted after the executor was called
+ */
+ void Timer::setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall)
+ {
+ this->setInterval(interval);
+ this->bLoop_ = bLoop;
+ this->executor_ = executor;
+ this->bActive_ = true;
+
+ this->time_ = this->interval_;
+ this->bKillAfterCall_ = bKillAfterCall;
+
+ executor->getFunctor()->setSafeMode(true);
+ }
+
+ /**
@brief Calls the executor and destroys the timer if requested.
*/
void Timer::run()
Modified: code/branches/unity_build/src/libraries/tools/Timer.h
===================================================================
--- code/branches/unity_build/src/libraries/tools/Timer.h 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/libraries/tools/Timer.h 2011-05-29 22:01:33 UTC (rev 8674)
@@ -79,7 +79,7 @@
#include "tools/ToolsPrereqs.h"
#include "core/OrxonoxClass.h"
-#include "core/command/Executor.h"
+#include "core/command/ExecutorPtr.h"
namespace orxonox
{
@@ -108,26 +108,8 @@
Timer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false);
- /**
- @brief Initializes and starts the timer, which will call an executor after some time.
- @param interval The timer-interval in seconds
- @param bLoop If true, the executor gets called every @a interval seconds
- @param executor The executor that will be called
- @param bKillAfterCall If true, the timer will be deleted after the executor was called
- */
- void setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false)
- {
- this->setInterval(interval);
- this->bLoop_ = bLoop;
- this->executor_ = executor;
- this->bActive_ = true;
+ void setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false);
- this->time_ = this->interval_;
- this->bKillAfterCall_ = bKillAfterCall;
-
- executor->getFunctor()->setSafeMode(true);
- }
-
void run();
/// Re-starts the timer: The executor will be called after @a interval seconds.
Modified: code/branches/unity_build/src/modules/pong/PongAI.cc
===================================================================
--- code/branches/unity_build/src/modules/pong/PongAI.cc 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/modules/pong/PongAI.cc 2011-05-29 22:01:33 UTC (rev 8674)
@@ -35,6 +35,7 @@
#include "core/CoreIncludes.h"
#include "core/ConfigValueIncludes.h"
+#include "core/command/Executor.h"
#include "tools/Timer.h"
#include "worldentities/ControllableEntity.h"
Modified: code/branches/unity_build/src/modules/weapons/munitions/ReplenishingMunition.cc
===================================================================
--- code/branches/unity_build/src/modules/weapons/munitions/ReplenishingMunition.cc 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/modules/weapons/munitions/ReplenishingMunition.cc 2011-05-29 22:01:33 UTC (rev 8674)
@@ -27,7 +27,9 @@
*/
#include "ReplenishingMunition.h"
+
#include "core/CoreIncludes.h"
+#include "core/command/Executor.h"
namespace orxonox
{
Modified: code/branches/unity_build/src/modules/weapons/projectiles/LightningGunProjectile.cc
===================================================================
--- code/branches/unity_build/src/modules/weapons/projectiles/LightningGunProjectile.cc 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/modules/weapons/projectiles/LightningGunProjectile.cc 2011-05-29 22:01:33 UTC (rev 8674)
@@ -30,6 +30,7 @@
#include "util/Convert.h"
#include "core/CoreIncludes.h"
+#include "core/command/Executor.h"
namespace orxonox
{
Modified: code/branches/unity_build/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/branches/unity_build/src/orxonox/gametypes/Dynamicmatch.cc 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/orxonox/gametypes/Dynamicmatch.cc 2011-05-29 22:01:33 UTC (rev 8674)
@@ -47,6 +47,7 @@
#include "util/Convert.h"
#include "core/CoreIncludes.h"
+#include "core/command/Executor.h"
#include "network/Host.h"
#include "infos/PlayerInfo.h"
#include "worldentities/pawns/Pawn.h"
Modified: code/branches/unity_build/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/branches/unity_build/src/orxonox/weaponsystem/Munition.cc 2011-05-29 21:59:17 UTC (rev 8673)
+++ code/branches/unity_build/src/orxonox/weaponsystem/Munition.cc 2011-05-29 22:01:33 UTC (rev 8674)
@@ -28,7 +28,9 @@
*/
#include "Munition.h"
+
#include "core/CoreIncludes.h"
+#include "core/command/Executor.h"
namespace orxonox
{
More information about the Orxonox-commit
mailing list