BGE: renamed sensor type enum to avoid conflict with mingw (NEAR was causing the...
authorBenoit Bolsee <benoit.bolsee@online.be>
Sun, 24 May 2009 12:53:49 +0000 (12:53 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Sun, 24 May 2009 12:53:49 +0000 (12:53 +0000)
source/gameengine/GameLogic/SCA_ISensor.h
source/gameengine/Ketsji/KX_NearSensor.h
source/gameengine/Ketsji/KX_RadarSensor.h
source/gameengine/Ketsji/KX_TouchEventManager.cpp
source/gameengine/Ketsji/KX_TouchSensor.h

index ad8865299d69809bce9e4d3d39c360ae601f53ce..9bbd6ed41e42d139d75d31a5080f149e29f5da81 100644 (file)
@@ -93,10 +93,10 @@ protected:
 public:
 
        enum sensortype {
-               NONE = 0,
-               TOUCH,
-               NEAR,
-               RADAR,
+               ST_NONE = 0,
+               ST_TOUCH,
+               ST_NEAR,
+               ST_RADAR,
                // to be updated as needed
        };
 
@@ -147,7 +147,7 @@ public:
 
        virtual double GetNumber();
 
-       virtual sensortype GetSensorType() { return NONE; }
+       virtual sensortype GetSensorType() { return ST_NONE; }
 
        /** Stop sensing for a while. */
        void Suspend();
index d98b464a4438cea313d599908a3d01fd0e843c79..63099e181a0691cbbc8f2e90bcd9c3a2a9f91a36 100644 (file)
@@ -78,7 +78,7 @@ public:
                                                 const PHY_CollData * coll_data); 
        virtual bool    BroadPhaseFilterCollision(void*obj1,void*obj2);
        virtual bool    BroadPhaseSensorFilterCollision(void*obj1,void*obj2) { return false; };
-       virtual sensortype GetSensorType() { return NEAR; }
+       virtual sensortype GetSensorType() { return ST_NEAR; }
 
        /* --------------------------------------------------------------------- */
        /* Python interface ---------------------------------------------------- */
index 6779a9edffe7fb0be77f9db30a4c9ba80bc91caa..2e5a0e68bedcb5cfa2a67447491749f030712659 100644 (file)
@@ -92,7 +92,7 @@ public:
        virtual PyObject* py_getattro(PyObject *attr);
        virtual PyObject* py_getattro_dict();
        virtual int py_setattro(PyObject *attr, PyObject* value);
-       virtual sensortype GetSensorType() { return RADAR; }
+       virtual sensortype GetSensorType() { return ST_RADAR; }
 
        //Deprecated ----->
        KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeOrigin);
index 46927541099dcd523ef25b741a1b6d6a19830f38..9603410c3ac3b336df3387ce286579d766a48734 100644 (file)
@@ -105,7 +105,7 @@ bool         KX_TouchEventManager::newBroadphaseResponse(void *client_data,
                        it != info->m_sensors.end();
                        ++it)
                {
-                       if ((*it)->GetSensorType() == SCA_ISensor::TOUCH) 
+                       if ((*it)->GetSensorType() == SCA_ISensor::ST_TOUCH) 
                        {
                                KX_TouchSensor* touchsensor = static_cast<KX_TouchSensor*>(*it);
                                if (touchsensor->BroadPhaseSensorFilterCollision(object1, object2))
index b62ec6eaf4dab58bad3e471b77746714e76fa430..476c63e89dbc064f0b84bf866d244d5112dc05f3 100644 (file)
@@ -104,7 +104,7 @@ public:
        // return value = true if collision should be checked on pair of object
        virtual bool    BroadPhaseFilterCollision(void*obj1,void*obj2) { return true; }
        virtual bool    BroadPhaseSensorFilterCollision(void*obj1,void*obj2);
-       virtual sensortype GetSensorType() { return TOUCH; }
+       virtual sensortype GetSensorType() { return ST_TOUCH; }
   
 
        virtual bool IsPositiveTrigger() {