Merge of itasc branch. Project files, scons and cmake should be working. Makefile...
[blender.git] / source / gameengine / GameLogic / SCA_BasicEventManager.cpp
@@ -1,7 +1,6 @@
-/*
- * SND_IdObject.cpp
- *
- * Object for storing runtime data, like id's, soundobjects etc
+/**
+ * Manager for 'always' events. Since always sensors can operate in pulse
+ * mode, they need to be activated.
  *
  * $Id$
  *
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#include "SND_IdObject.h"
+#include "SCA_BasicEventManager.h"
+#include "SCA_LogicManager.h"
+#include <vector>
+#include "SCA_ISensor.h"
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-SND_IdObject::SND_IdObject()
-{
-}
-
-
-
-SND_IdObject::~SND_IdObject()
-{
-}
-
+using namespace std;
 
-
-SND_SoundObject* SND_IdObject::GetSoundObject()
+SCA_BasicEventManager::SCA_BasicEventManager(class SCA_LogicManager* logicmgr)
+       : SCA_EventManager(BASIC_EVENTMGR),
+       m_logicmgr(logicmgr)
 {
-       return m_soundObject;
 }
 
-
-
-void SND_IdObject::SetSoundObject(SND_SoundObject* pObject)
+SCA_BasicEventManager::~SCA_BasicEventManager()
 {
-       m_soundObject = pObject;
 }
 
-
-
-int SND_IdObject::GetId()
+void SCA_BasicEventManager::NextFrame()
 {
-       return m_id;
+       SG_DList::iterator<SCA_ISensor> it(m_sensors);
+       for (it.begin();!it.end();++it)
+       {
+               (*it)->Activate(m_logicmgr);
+       }
 }
 
-
-
-void SND_IdObject::SetId(int id)
-{
-       m_id = id;
-}