svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22668:22701
authorCampbell Barton <ideasman42@gmail.com>
Sat, 22 Aug 2009 10:57:07 +0000 (10:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 22 Aug 2009 10:57:07 +0000 (10:57 +0000)
1  2 
config/linux2-config.py
source/blender/blenkernel/intern/softbody.c
source/gameengine/GameLogic/SCA_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.h
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_MouseSensor.h
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_TouchSensor.h

Simple merge
@@@ -46,9 -46,9 +46,8 @@@ SCA_JoystickSensor::SCA_JoystickSensor(
                                                                           short int joymode,
                                                                           int axis, int axisf,int prec,
                                                                           int button,
 -                                                                         int hat, int hatf, bool allevents,
 -                                                                         PyTypeObject* T )
 -                                                                         :SCA_ISensor(gameobj,eventmgr,T),
 +                                                                         int hat, int hatf, bool allevents)
 +                                                                         :SCA_ISensor(gameobj,eventmgr),
-                                                                          m_pJoystickMgr(eventmgr),
                                                                           m_axis(axis),
                                                                           m_axisf(axisf),
                                                                           m_button(button),
@@@ -520,9 -546,9 +519,9 @@@ const char SCA_JoystickSensor::NumberOf
  "\tReturns the number of axes .\n";
  PyObject* SCA_JoystickSensor::PyNumberOfAxes( ) {
        ShowDeprecationWarning("getNumAxes()", "the numAxis property");
-       SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+       SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
        // when the joystick is null their is 0 exis still. dumb but scripters should use isConnected()
 -      return PyInt_FromLong( joy ? joy->GetNumberOfAxes() : 0 );
 +      return PyLong_FromSsize_t( joy ? joy->GetNumberOfAxes() : 0 );
  }
  
  
@@@ -531,8 -557,8 +530,8 @@@ const char SCA_JoystickSensor::NumberOf
  "\tReturns the number of buttons .\n";
  PyObject* SCA_JoystickSensor::PyNumberOfButtons( ) {
        ShowDeprecationWarning("getNumButtons()", "the numButtons property");
-       SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+       SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
 -      return PyInt_FromLong( joy ? joy->GetNumberOfButtons() : 0 );
 +      return PyLong_FromSsize_t( joy ? joy->GetNumberOfButtons() : 0 );
  }
  
  
@@@ -541,8 -567,8 +540,8 @@@ const char SCA_JoystickSensor::NumberOf
  "\tReturns the number of hats .\n";
  PyObject* SCA_JoystickSensor::PyNumberOfHats( ) {
        ShowDeprecationWarning("getNumHats()", "the numHats property");
-       SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+       SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
 -      return PyInt_FromLong( joy ? joy->GetNumberOfHats() : 0 );
 +      return PyLong_FromSsize_t( joy ? joy->GetNumberOfHats() : 0 );
  }
  
  const char SCA_JoystickSensor::Connected_doc[] = 
@@@ -601,30 -627,30 +600,30 @@@ PyObject* SCA_JoystickSensor::pyattr_ge
  PyObject* SCA_JoystickSensor::pyattr_get_hat_single(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
  {
        SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
-       SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
+       SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
        
 -      return PyInt_FromLong(joy->GetHat(self->m_hat-1));
 +      return PyLong_FromSsize_t(joy->GetHat(self->m_hat-1));
  }
  
  PyObject* SCA_JoystickSensor::pyattr_get_num_axis(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
  {
        SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
-       SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
+       SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
 -      return PyInt_FromLong( joy ? joy->GetNumberOfAxes() : 0 );
 +      return PyLong_FromSsize_t( joy ? joy->GetNumberOfAxes() : 0 );
  }
  
  PyObject* SCA_JoystickSensor::pyattr_get_num_buttons(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
  {
        SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
-       SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
+       SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
 -      return PyInt_FromLong( joy ? joy->GetNumberOfButtons() : 0 );
 +      return PyLong_FromSsize_t( joy ? joy->GetNumberOfButtons() : 0 );
  }
  
  PyObject* SCA_JoystickSensor::pyattr_get_num_hats(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
  {
        SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
-       SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
+       SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
 -      return PyInt_FromLong( joy ? joy->GetNumberOfHats() : 0 );
 +      return PyLong_FromSsize_t( joy ? joy->GetNumberOfHats() : 0 );
  }
  
  PyObject* SCA_JoystickSensor::pyattr_get_connected(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
@@@ -49,9 -49,9 +49,8 @@@
  SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr, 
                                                                 int startx,int starty,
                                                                 short int mousemode,
 -                                                               SCA_IObject* gameobj, 
 -                                                               PyTypeObject* T)
 -    : SCA_ISensor(gameobj,eventmgr, T),
 +                                                               SCA_IObject* gameobj)
 +    : SCA_ISensor(gameobj,eventmgr),
-       m_pMouseMgr(eventmgr),
        m_x(startx),
        m_y(starty)
  {
@@@ -282,9 -282,9 +281,9 @@@ KX_PYMETHODDEF_DOC_O(SCA_MouseSensor, g
                        return NULL;
                }
                
-               SCA_IInputDevice* mousedev = m_pMouseMgr->GetInputDevice();
+               SCA_IInputDevice* mousedev = ((SCA_MouseManager *)m_eventmgr)->GetInputDevice();
                const SCA_InputEvent& event = mousedev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) button);
 -              return PyInt_FromLong(event.m_status);
 +              return PyLong_FromSsize_t(event.m_status);
        }
        
        Py_RETURN_NONE;
@@@ -50,10 -50,10 +50,9 @@@ KX_NetworkMessageSensor::KX_NetworkMess
        class KX_NetworkEventManager* eventmgr, // our eventmanager
        class NG_NetworkScene *NetworkScene,    // our scene
        SCA_IObject* gameobj,                                   // the sensor controlling object
 -      const STR_String &subject,
 -      PyTypeObject* T
 +      const STR_String &subject
  ) :
 -    SCA_ISensor(gameobj,eventmgr,T),
 +    SCA_ISensor(gameobj,eventmgr),
-     m_Networkeventmgr(eventmgr),
      m_NetworkScene(NetworkScene),
      m_subject(subject),
      m_frame_message_count (0),
@@@ -97,12 -97,11 +97,11 @@@ bool KX_TouchSensor::Evaluate(
        return result;
  }
  
 -KX_TouchSensor::KX_TouchSensor(SCA_EventManager* eventmgr,KX_GameObject* gameobj,bool bFindMaterial,bool bTouchPulse,const STR_String& touchedpropname,PyTypeObject* T)
 -:SCA_ISensor(gameobj,eventmgr,T),
 +KX_TouchSensor::KX_TouchSensor(SCA_EventManager* eventmgr,KX_GameObject* gameobj,bool bFindMaterial,bool bTouchPulse,const STR_String& touchedpropname)
 +:SCA_ISensor(gameobj,eventmgr),
  m_touchedpropname(touchedpropname),
  m_bFindMaterial(bFindMaterial),
- m_bTouchPulse(bTouchPulse),
- m_eventmgr(eventmgr)
+ m_bTouchPulse(bTouchPulse)
  /*m_sumoObj(sumoObj),*/
  {
  //    KX_TouchEventManager* touchmgr = (KX_TouchEventManager*) eventmgr;