code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo...
[blender-staging.git] / source / gameengine / GameLogic / SCA_RandomSensor.h
index 764692600c3c567662dea8476fd8881c4a8d534d..628562b77e6c4fca7b948f96e852914bd99341db 100644 (file)
@@ -1,8 +1,4 @@
-/**
- * Generate random pulses
- *
- * $Id$
- *
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -17,7 +13,7 @@
  *
  * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
  * All rights reserved.
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifndef __KX_RANDOMSENSOR
-#define __KX_RANDOMSENSOR
+/** \file SCA_RandomSensor.h
+ *  \ingroup gamelogic
+ *  \brief Generate random pulses
+ */
+
+#ifndef __SCA_RANDOMSENSOR_H__
+#define __SCA_RANDOMSENSOR_H__
 
 #include "SCA_ISensor.h"
 #include "BoolValue.h"
@@ -38,7 +39,7 @@
 
 class SCA_RandomSensor : public SCA_ISensor
 {
-       Py_Header;
+       Py_Header
 
        unsigned int m_currentDraw;
        int m_iteration;
@@ -48,32 +49,23 @@ class SCA_RandomSensor : public SCA_ISensor
 public:
        SCA_RandomSensor(class SCA_EventManager* rndmgr,
                                        SCA_IObject* gameobj,
-                                       int startseed,
-                                       PyTypeObject* T=&Type);
+                                       int startseed);
        virtual ~SCA_RandomSensor();
        virtual CValue* GetReplica();
-       virtual bool Evaluate(CValue* event);
+       virtual void ProcessReplica();
+       virtual bool Evaluate();
        virtual bool IsPositiveTrigger();
        virtual void Init();
 
+#ifdef WITH_PYTHON
+
        /* --------------------------------------------------------------------- */
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
-
-       virtual PyObject* py_getattro(PyObject *attr);
-       virtual int py_setattro(PyObject *attr, PyObject *value);
-
-       /* 1. setSeed                                                            */
-       KX_PYMETHOD_DOC_VARARGS(SCA_RandomSensor,SetSeed);
-       /* 2. getSeed                                                            */
-       KX_PYMETHOD_DOC_NOARGS(SCA_RandomSensor,GetSeed);
-       /* 3. getLastDraw                                                        */
-       KX_PYMETHOD_DOC_NOARGS(SCA_RandomSensor,GetLastDraw);
        
        static PyObject*        pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
        static int                      pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
-
+#endif
 };
 
-#endif //__KX_RANDOMSENSOR
-
+#endif  /* __SCA_RANDOMSENSOR_H__ */