refactored effectManager
authorPatrik Gornicz <Gornicz.P@gmail.com>
Thu, 22 Jan 2009 00:20:02 +0000 (19:20 -0500)
committerPatrik Gornicz <Gornicz.P@gmail.com>
Thu, 22 Jan 2009 00:20:02 +0000 (19:20 -0500)
TODO
src/effectManager.cpp

diff --git a/TODO b/TODO
index 54b6269..3b9d98a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -23,7 +23,8 @@ and a * entry is something to remember when working in this area of the project.
 
 - remove (at least direct) uses of stl and the std libs
  - create my own set
-  - replace the setPhys in collisionHandler
+  - replace the set in collisionHandler
+  - replace the set in effectManager
  - create my own list
 
 
index a75e5d8..c11ffc3 100644 (file)
 typedef std::set<Effect*> setEffect;
 setEffect active_Effects;
 
-GravityWell* mouseWell;
+GravityWell* pMouseWell;
 
 /// ***** Initializers/Cleaners *****
 
 void effect::init()
 {
-    mouseWell = new GravityWell(Vector2(0,0));
+    pMouseWell = new GravityWell(Vector2(0,0));
 
     active_Effects.insert(new Screen());
     active_Effects.insert(new Gravity());
@@ -63,15 +63,15 @@ void effect::update(float)
 void effect::handleInput()
 {
     if(cfg::mouseWellFollow())
-        mouseWell->setPosition(input::mousePosition());
+        pMouseWell->setPosition(input::mousePosition());
 
     if(cfg::mouseWellOn())
-        active_Effects.insert(mouseWell);
+        active_Effects.insert(pMouseWell);
     if(cfg::mouseWellOff())
-        active_Effects.erase(mouseWell);
+        active_Effects.erase(pMouseWell);
 }
 
-Vector2 effect::positionDelta(const PhysicsEntity* e, float time_step)
+Vector2 effect::positionDelta(const PhysicsEntity* ppe, float fTimeStep)
 {
     Vector2 acc(0,0);
 
@@ -79,12 +79,12 @@ Vector2 effect::positionDelta(const PhysicsEntity* e, float time_step)
          it != active_Effects.end();
          it++ )
     {
-        acc += (*it)->positionDelta(e, time_step);
+        acc += (*it)->positionDelta(ppe, fTimeStep);
     }
 
     return acc;
 }
-Vector2 effect::velocityDelta(const PhysicsEntity* e, float time_step)
+Vector2 effect::velocityDelta(const PhysicsEntity* ppe, float fTimeStep)
 {
     Vector2 acc(0,0);
 
@@ -92,12 +92,12 @@ Vector2 effect::velocityDelta(const PhysicsEntity* e, float time_step)
          it != active_Effects.end();
          it++ )
     {
-        acc += (*it)->velocityDelta(e, time_step);
+        acc += (*it)->velocityDelta(ppe, fTimeStep);
     }
 
     return acc;
 }
-Vector2 effect::forceDelta(const PhysicsEntity* e, float time_step)
+Vector2 effect::forceDelta(const PhysicsEntity* ppe, float fTimeStep)
 {
     Vector2 acc(0,0);
 
@@ -105,7 +105,7 @@ Vector2 effect::forceDelta(const PhysicsEntity* e, float time_step)
          it != active_Effects.end();
          it++ )
     {
-        acc += (*it)->forceDelta(e, time_step);
+        acc += (*it)->forceDelta(ppe, fTimeStep);
     }
 
     return acc;