Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.h2
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.cpp12
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.h6
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.cpp8
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.h2
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.cpp24
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.h10
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp38
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.cpp26
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.h16
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.cpp8
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.h4
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyActuator.cpp8
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp20
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.h12
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp29
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp29
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.h14
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.cpp10
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.h8
21 files changed, 143 insertions, 147 deletions
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
index c51555a02b4..acd906ef9dd 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
@@ -185,7 +185,7 @@ int SCA_ActuatorSensor::CheckActuator(void *self, const PyAttributeDef*)
const char SCA_ActuatorSensor::GetActuator_doc[] =
"getActuator()\n"
"\tReturn the Actuator with which the sensor operates.\n";
-PyObject* SCA_ActuatorSensor::PyGetActuator(PyObject* self)
+PyObject* SCA_ActuatorSensor::PyGetActuator()
{
ShowDeprecationWarning("getActuator()", "the actuator property");
return PyString_FromString(m_checkactname);
@@ -197,7 +197,7 @@ const char SCA_ActuatorSensor::SetActuator_doc[] =
"\t- name: string\n"
"\tSets the Actuator with which to operate. If there is no Actuator\n"
"\tof this name, the call is ignored.\n";
-PyObject* SCA_ActuatorSensor::PySetActuator(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_ActuatorSensor::PySetActuator(PyObject* args)
{
ShowDeprecationWarning("setActuator()", "the actuator property");
/* We should query whether the name exists. Or should we create a prop */
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
index 9bc873e4ee1..21960993497 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.h
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
@@ -65,7 +65,7 @@ public:
virtual int py_setattro(PyObject *attr, PyObject *value);
/* 3. setProperty */
- KX_PYMETHOD_DOC(SCA_ActuatorSensor,SetActuator);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ActuatorSensor,SetActuator);
/* 4. getProperty */
KX_PYMETHOD_DOC_NOARGS(SCA_ActuatorSensor,GetActuator);
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.cpp b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
index dad85a435c8..44a0175d916 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
@@ -192,7 +192,7 @@ const char SCA_DelaySensor::SetDelay_doc[] =
"\t- delay: length of the initial OFF period as number of frame\n"
"\t 0 for immediate trigger\n"
"\tSet the initial delay before the positive trigger\n";
-PyObject* SCA_DelaySensor::PySetDelay(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_DelaySensor::PySetDelay(PyObject* args)
{
ShowDeprecationWarning("setDelay()", "the delay property");
int delay;
@@ -214,7 +214,7 @@ const char SCA_DelaySensor::SetDuration_doc[] =
"\t 0 for no ON period\n"
"\tSet the duration of the ON pulse after initial delay.\n"
"\tIf > 0, a negative trigger is fired at the end of the ON pulse.\n";
-PyObject* SCA_DelaySensor::PySetDuration(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_DelaySensor::PySetDuration(PyObject* args)
{
ShowDeprecationWarning("setDuration()", "the duration property");
int duration;
@@ -235,7 +235,7 @@ const char SCA_DelaySensor::SetRepeat_doc[] =
"\t- repeat: 1 if the initial OFF-ON cycle should be repeated indefinately\n"
"\t 0 if the initial OFF-ON cycle should run only once\n"
"\tSet the sensor repeat mode\n";
-PyObject* SCA_DelaySensor::PySetRepeat(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_DelaySensor::PySetRepeat(PyObject* args)
{
ShowDeprecationWarning("setRepeat()", "the repeat property");
int repeat;
@@ -250,7 +250,7 @@ PyObject* SCA_DelaySensor::PySetRepeat(PyObject* self, PyObject* args, PyObject*
const char SCA_DelaySensor::GetDelay_doc[] =
"getDelay()\n"
"\tReturn the delay parameter value\n";
-PyObject* SCA_DelaySensor::PyGetDelay(PyObject* self)
+PyObject* SCA_DelaySensor::PyGetDelay()
{
ShowDeprecationWarning("getDelay()", "the delay property");
return PyInt_FromLong(m_delay);
@@ -259,7 +259,7 @@ PyObject* SCA_DelaySensor::PyGetDelay(PyObject* self)
const char SCA_DelaySensor::GetDuration_doc[] =
"getDuration()\n"
"\tReturn the duration parameter value\n";
-PyObject* SCA_DelaySensor::PyGetDuration(PyObject* self)
+PyObject* SCA_DelaySensor::PyGetDuration()
{
ShowDeprecationWarning("getDuration()", "the duration property");
return PyInt_FromLong(m_duration);
@@ -268,7 +268,7 @@ PyObject* SCA_DelaySensor::PyGetDuration(PyObject* self)
const char SCA_DelaySensor::GetRepeat_doc[] =
"getRepeat()\n"
"\tReturn the repeat parameter value\n";
-PyObject* SCA_DelaySensor::PyGetRepeat(PyObject* self)
+PyObject* SCA_DelaySensor::PyGetRepeat()
{
ShowDeprecationWarning("getRepeat()", "the repeat property");
return BoolToPyArg(m_repeat);
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.h b/source/gameengine/GameLogic/SCA_DelaySensor.h
index f9e3d619198..8da76ff7189 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.h
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.h
@@ -64,9 +64,9 @@ public:
virtual int py_setattro(PyObject *attr, PyObject *value);
/* setProperty */
- KX_PYMETHOD_DOC(SCA_DelaySensor,SetDelay);
- KX_PYMETHOD_DOC(SCA_DelaySensor,SetDuration);
- KX_PYMETHOD_DOC(SCA_DelaySensor,SetRepeat);
+ KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetDelay);
+ KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetDuration);
+ KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetRepeat);
/* getProperty */
KX_PYMETHOD_DOC_NOARGS(SCA_DelaySensor,GetDelay);
KX_PYMETHOD_DOC_NOARGS(SCA_DelaySensor,GetDuration);
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
index 1ae78321959..b3045402c2c 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
@@ -289,7 +289,7 @@ int SCA_ILogicBrick::py_setattro(PyObject *attr, PyObject *value)
}
-PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self)
+PyObject* SCA_ILogicBrick::PyGetOwner()
{
CValue* parent = GetParent();
if (parent)
@@ -303,9 +303,7 @@ PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self)
-PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* self,
- PyObject* args,
- PyObject* kwds)
+PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* args)
{
ShowDeprecationWarning("setExecutePriority()", "the executePriority property");
@@ -322,7 +320,7 @@ PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* self,
-PyObject* SCA_ILogicBrick::PyGetExecutePriority(PyObject* self)
+PyObject* SCA_ILogicBrick::PyGetExecutePriority()
{
ShowDeprecationWarning("getExecutePriority()", "the executePriority property");
return PyInt_FromLong(m_Execute_Ueber_Priority);
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h
index 20fa3c2d687..c0ff0fd633f 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.h
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h
@@ -88,7 +88,7 @@ public:
// python methods
KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetOwner);
- KX_PYMETHOD(SCA_ILogicBrick,SetExecutePriority);
+ KX_PYMETHOD_VARARGS(SCA_ILogicBrick,SetExecutePriority);
KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetExecutePriority);
// check that attribute is a property
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp
index 269038db4f9..68f5653d53a 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ISensor.cpp
@@ -218,7 +218,7 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr, CValue* event)
const char SCA_ISensor::IsPositive_doc[] =
"isPositive()\n"
"\tReturns whether the sensor is in an active state.\n";
-PyObject* SCA_ISensor::PyIsPositive(PyObject* self)
+PyObject* SCA_ISensor::PyIsPositive()
{
ShowDeprecationWarning("isPositive()", "the read-only positive property");
int retval = IsPositiveTrigger();
@@ -228,7 +228,7 @@ PyObject* SCA_ISensor::PyIsPositive(PyObject* self)
const char SCA_ISensor::IsTriggered_doc[] =
"isTriggered()\n"
"\tReturns whether the sensor has triggered the current controller.\n";
-PyObject* SCA_ISensor::PyIsTriggered(PyObject* self)
+PyObject* SCA_ISensor::PyIsTriggered()
{
ShowDeprecationWarning("isTriggered()", "the read-only triggered property");
// check with the current controller
@@ -244,7 +244,7 @@ PyObject* SCA_ISensor::PyIsTriggered(PyObject* self)
const char SCA_ISensor::GetUsePosPulseMode_doc[] =
"getUsePosPulseMode()\n"
"\tReturns whether positive pulse mode is active.\n";
-PyObject* SCA_ISensor::PyGetUsePosPulseMode(PyObject* self)
+PyObject* SCA_ISensor::PyGetUsePosPulseMode()
{
ShowDeprecationWarning("getUsePosPulseMode()", "the usePosPulseMode property");
return BoolToPyArg(m_pos_pulsemode);
@@ -258,7 +258,7 @@ const char SCA_ISensor::SetUsePosPulseMode_doc[] =
"\t - pulse? : Pulse when a positive event occurs?\n"
"\t (KX_TRUE, KX_FALSE)\n"
"\tSet whether to do pulsing when positive pulses occur.\n";
-PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* args)
{
ShowDeprecationWarning("setUsePosPulseMode()", "the usePosPulseMode property");
int pyarg = 0;
@@ -273,7 +273,7 @@ PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* self, PyObject* args, PyOb
const char SCA_ISensor::GetFrequency_doc[] =
"getFrequency()\n"
"\tReturns the frequency of the updates in pulse mode.\n" ;
-PyObject* SCA_ISensor::PyGetFrequency(PyObject* self)
+PyObject* SCA_ISensor::PyGetFrequency()
{
ShowDeprecationWarning("getFrequency()", "the frequency property");
return PyInt_FromLong(m_pulse_frequency);
@@ -287,7 +287,7 @@ const char SCA_ISensor::SetFrequency_doc[] =
"\t- pulse_frequency: The frequency of the updates in pulse mode (integer)"
"\tSet the frequency of the updates in pulse mode.\n"
"\tIf the frequency is negative, it is set to 0.\n" ;
-PyObject* SCA_ISensor::PySetFrequency(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_ISensor::PySetFrequency(PyObject* args)
{
ShowDeprecationWarning("setFrequency()", "the frequency property");
int pulse_frequencyArg = 0;
@@ -310,7 +310,7 @@ PyObject* SCA_ISensor::PySetFrequency(PyObject* self, PyObject* args, PyObject*
const char SCA_ISensor::GetInvert_doc[] =
"getInvert()\n"
"\tReturns whether or not pulses from this sensor are inverted.\n" ;
-PyObject* SCA_ISensor::PyGetInvert(PyObject* self)
+PyObject* SCA_ISensor::PyGetInvert()
{
ShowDeprecationWarning("getInvert()", "the invert property");
return BoolToPyArg(m_invert);
@@ -320,7 +320,7 @@ const char SCA_ISensor::SetInvert_doc[] =
"setInvert(invert?)\n"
"\t- invert?: Invert the event-values? (KX_TRUE, KX_FALSE)\n"
"\tSet whether to invert pulses.\n";
-PyObject* SCA_ISensor::PySetInvert(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_ISensor::PySetInvert(PyObject* args)
{
ShowDeprecationWarning("setInvert()", "the invert property");
int pyarg = 0;
@@ -336,7 +336,7 @@ const char SCA_ISensor::GetLevel_doc[] =
"\tA level detector will immediately generate a pulse, negative or positive\n"
"\tdepending on the sensor condition, as soon as the state is activated.\n"
"\tA edge detector will wait for a state change before generating a pulse.\n";
-PyObject* SCA_ISensor::PyGetLevel(PyObject* self)
+PyObject* SCA_ISensor::PyGetLevel()
{
ShowDeprecationWarning("getLevel()", "the level property");
return BoolToPyArg(m_level);
@@ -346,7 +346,7 @@ const char SCA_ISensor::SetLevel_doc[] =
"setLevel(level?)\n"
"\t- level?: Detect level instead of edge? (KX_TRUE, KX_FALSE)\n"
"\tSet whether to detect level or edge transition when entering a state.\n";
-PyObject* SCA_ISensor::PySetLevel(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_ISensor::PySetLevel(PyObject* args)
{
ShowDeprecationWarning("setLevel()", "the level property");
int pyarg = 0;
@@ -358,7 +358,7 @@ PyObject* SCA_ISensor::PySetLevel(PyObject* self, PyObject* args, PyObject* kwds
const char SCA_ISensor::GetUseNegPulseMode_doc[] =
"getUseNegPulseMode()\n"
"\tReturns whether negative pulse mode is active.\n";
-PyObject* SCA_ISensor::PyGetUseNegPulseMode(PyObject* self)
+PyObject* SCA_ISensor::PyGetUseNegPulseMode()
{
ShowDeprecationWarning("getUseNegPulseMode()", "the useNegPulseMode property");
return BoolToPyArg(m_neg_pulsemode);
@@ -369,7 +369,7 @@ const char SCA_ISensor::SetUseNegPulseMode_doc[] =
"\t - pulse? : Pulse when a negative event occurs?\n"
"\t (KX_TRUE, KX_FALSE)\n"
"\tSet whether to do pulsing when negative pulses occur.\n";
-PyObject* SCA_ISensor::PySetUseNegPulseMode(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_ISensor::PySetUseNegPulseMode(PyObject* args)
{
ShowDeprecationWarning("setUseNegPulseMode()", "the useNegPulseMode property");
int pyarg = 0;
diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h
index 18d630fce0e..6b1c8cca104 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.h
+++ b/source/gameengine/GameLogic/SCA_ISensor.h
@@ -143,15 +143,15 @@ public:
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,IsPositive);
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,IsTriggered);
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetUsePosPulseMode);
- KX_PYMETHOD_DOC(SCA_ISensor,SetUsePosPulseMode);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetUsePosPulseMode);
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetFrequency);
- KX_PYMETHOD_DOC(SCA_ISensor,SetFrequency);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetFrequency);
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetUseNegPulseMode);
- KX_PYMETHOD_DOC(SCA_ISensor,SetUseNegPulseMode);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetUseNegPulseMode);
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetInvert);
- KX_PYMETHOD_DOC(SCA_ISensor,SetInvert);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetInvert);
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetLevel);
- KX_PYMETHOD_DOC(SCA_ISensor,SetLevel);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetLevel);
//<------
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,reset);
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index 087fb036fae..28ff1c82924 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -349,7 +349,7 @@ int SCA_JoystickSensor::py_setattro(PyObject *attr, PyObject *value)
const char SCA_JoystickSensor::GetIndex_doc[] =
"getIndex\n"
"\tReturns the joystick index to use.\n";
-PyObject* SCA_JoystickSensor::PyGetIndex( PyObject* self ) {
+PyObject* SCA_JoystickSensor::PyGetIndex( ) {
ShowDeprecationWarning("getIndex()", "the index property");
return PyInt_FromLong(m_joyindex);
}
@@ -359,7 +359,7 @@ PyObject* SCA_JoystickSensor::PyGetIndex( PyObject* self ) {
const char SCA_JoystickSensor::SetIndex_doc[] =
"setIndex\n"
"\tSets the joystick index to use.\n";
-PyObject* SCA_JoystickSensor::PySetIndex( PyObject* self, PyObject* value ) {
+PyObject* SCA_JoystickSensor::PySetIndex( PyObject* value ) {
ShowDeprecationWarning("setIndex()", "the index property");
int index = PyInt_AsLong( value ); /* -1 on error, will raise an error in this case */
if (index < 0 || index >= JOYINDEX_MAX) {
@@ -375,7 +375,7 @@ PyObject* SCA_JoystickSensor::PySetIndex( PyObject* self, PyObject* value ) {
const char SCA_JoystickSensor::GetAxis_doc[] =
"getAxis\n"
"\tReturns the current axis this sensor reacts to.\n";
-PyObject* SCA_JoystickSensor::PyGetAxis( PyObject* self) {
+PyObject* SCA_JoystickSensor::PyGetAxis( ) {
ShowDeprecationWarning("getAxis()", "the axis property");
return Py_BuildValue("[ii]",m_axis, m_axisf);
}
@@ -385,7 +385,7 @@ PyObject* SCA_JoystickSensor::PyGetAxis( PyObject* self) {
const char SCA_JoystickSensor::SetAxis_doc[] =
"setAxis\n"
"\tSets the current axis this sensor reacts to.\n";
-PyObject* SCA_JoystickSensor::PySetAxis( PyObject* self, PyObject* args ) {
+PyObject* SCA_JoystickSensor::PySetAxis( PyObject* args ) {
ShowDeprecationWarning("setAxis()", "the axis property");
int axis,axisflag;
@@ -402,7 +402,7 @@ PyObject* SCA_JoystickSensor::PySetAxis( PyObject* self, PyObject* args ) {
const char SCA_JoystickSensor::GetAxisValue_doc[] =
"getAxisValue\n"
"\tReturns a list of the values for the current state of each axis.\n";
-PyObject* SCA_JoystickSensor::PyGetAxisValue( PyObject* self) {
+PyObject* SCA_JoystickSensor::PyGetAxisValue( ) {
ShowDeprecationWarning("getAxisValue()", "the axisPosition property");
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
@@ -421,7 +421,7 @@ PyObject* SCA_JoystickSensor::PyGetAxisValue( PyObject* self) {
const char SCA_JoystickSensor::GetThreshold_doc[] =
"getThreshold\n"
"\tReturns the threshold of the axis.\n";
-PyObject* SCA_JoystickSensor::PyGetThreshold( PyObject* self) {
+PyObject* SCA_JoystickSensor::PyGetThreshold( ) {
ShowDeprecationWarning("getThreshold()", "the threshold property");
return PyInt_FromLong(m_precision);
}
@@ -431,7 +431,7 @@ PyObject* SCA_JoystickSensor::PyGetThreshold( PyObject* self) {
const char SCA_JoystickSensor::SetThreshold_doc[] =
"setThreshold\n"
"\tSets the threshold of the axis.\n";
-PyObject* SCA_JoystickSensor::PySetThreshold( PyObject* self, PyObject* args ) {
+PyObject* SCA_JoystickSensor::PySetThreshold( PyObject* args ) {
ShowDeprecationWarning("setThreshold()", "the threshold property");
int thresh;
if(!PyArg_ParseTuple(args, "i:setThreshold", &thresh)){
@@ -445,7 +445,7 @@ PyObject* SCA_JoystickSensor::PySetThreshold( PyObject* self, PyObject* args ) {
const char SCA_JoystickSensor::GetButton_doc[] =
"getButton\n"
"\tReturns the current button this sensor is checking.\n";
-PyObject* SCA_JoystickSensor::PyGetButton( PyObject* self) {
+PyObject* SCA_JoystickSensor::PyGetButton( ) {
ShowDeprecationWarning("getButton()", "the button property");
return PyInt_FromLong(m_button);
}
@@ -454,7 +454,7 @@ PyObject* SCA_JoystickSensor::PyGetButton( PyObject* self) {
const char SCA_JoystickSensor::SetButton_doc[] =
"setButton\n"
"\tSets the button the sensor reacts to.\n";
-PyObject* SCA_JoystickSensor::PySetButton( PyObject* self, PyObject* value ) {
+PyObject* SCA_JoystickSensor::PySetButton( PyObject* value ) {
ShowDeprecationWarning("setButton()", "the button property");
int button = PyInt_AsLong(value);
if(button==-1 && PyErr_Occurred()) {
@@ -469,16 +469,16 @@ PyObject* SCA_JoystickSensor::PySetButton( PyObject* self, PyObject* value ) {
const char SCA_JoystickSensor::GetButtonValue_doc[] =
"getButtonValue\n"
"\tReturns a list containing the indicies of the current pressed state of each button.\n";
-PyObject* SCA_JoystickSensor::PyGetButtonValue( PyObject* self) {
+PyObject* SCA_JoystickSensor::PyGetButtonValue( ) {
ShowDeprecationWarning("getButtonValue()", "getButtonActiveList");
- return PyGetButtonActiveList(self);
+ return PyGetButtonActiveList( );
}
/* get button active list -------------------------------------------------- */
const char SCA_JoystickSensor::GetButtonActiveList_doc[] =
"getButtonActiveList\n"
"\tReturns a list containing the indicies of the button currently pressed.\n";
-PyObject* SCA_JoystickSensor::PyGetButtonActiveList( PyObject* self) {
+PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) {
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
PyObject *ls = PyList_New(0);
PyObject *value;
@@ -500,7 +500,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonActiveList( PyObject* self) {
const char SCA_JoystickSensor::GetButtonStatus_doc[] =
"getButtonStatus(buttonIndex)\n"
"\tReturns a bool of the current pressed state of the specified button.\n";
-PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* self, PyObject* args ) {
+PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) {
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
int index;
@@ -517,7 +517,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* self, PyObject* args
const char SCA_JoystickSensor::GetHat_doc[] =
"getHat\n"
"\tReturns the current direction of the hat.\n";
-PyObject* SCA_JoystickSensor::PyGetHat( PyObject* self ) {
+PyObject* SCA_JoystickSensor::PyGetHat( ) {
ShowDeprecationWarning("getHat()", "the hat property");
return Py_BuildValue("[ii]",m_hat, m_hatf);
}
@@ -527,7 +527,7 @@ PyObject* SCA_JoystickSensor::PyGetHat( PyObject* self ) {
const char SCA_JoystickSensor::SetHat_doc[] =
"setHat\n"
"\tSets the hat the sensor reacts to.\n";
-PyObject* SCA_JoystickSensor::PySetHat( PyObject* self, PyObject* args ) {
+PyObject* SCA_JoystickSensor::PySetHat( PyObject* args ) {
ShowDeprecationWarning("setHat()", "the hat property");
int hat,hatflag;
if(!PyArg_ParseTuple(args, "ii:setHat", &hat, &hatflag)){
@@ -543,7 +543,7 @@ PyObject* SCA_JoystickSensor::PySetHat( PyObject* self, PyObject* args ) {
const char SCA_JoystickSensor::NumberOfAxes_doc[] =
"getNumAxes\n"
"\tReturns the number of axes .\n";
-PyObject* SCA_JoystickSensor::PyNumberOfAxes( PyObject* self ) {
+PyObject* SCA_JoystickSensor::PyNumberOfAxes( ) {
ShowDeprecationWarning("getNumAxes()", "the numAxis property");
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
// when the joystick is null their is 0 exis still. dumb but scripters should use isConnected()
@@ -554,7 +554,7 @@ PyObject* SCA_JoystickSensor::PyNumberOfAxes( PyObject* self ) {
const char SCA_JoystickSensor::NumberOfButtons_doc[] =
"getNumButtons\n"
"\tReturns the number of buttons .\n";
-PyObject* SCA_JoystickSensor::PyNumberOfButtons( PyObject* self ) {
+PyObject* SCA_JoystickSensor::PyNumberOfButtons( ) {
ShowDeprecationWarning("getNumButtons()", "the numButtons property");
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
return PyInt_FromLong( joy ? joy->GetNumberOfButtons() : 0 );
@@ -564,7 +564,7 @@ PyObject* SCA_JoystickSensor::PyNumberOfButtons( PyObject* self ) {
const char SCA_JoystickSensor::NumberOfHats_doc[] =
"getNumHats\n"
"\tReturns the number of hats .\n";
-PyObject* SCA_JoystickSensor::PyNumberOfHats( PyObject* self ) {
+PyObject* SCA_JoystickSensor::PyNumberOfHats( ) {
ShowDeprecationWarning("getNumHats()", "the numHats property");
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
return PyInt_FromLong( joy ? joy->GetNumberOfHats() : 0 );
@@ -573,7 +573,7 @@ PyObject* SCA_JoystickSensor::PyNumberOfHats( PyObject* self ) {
const char SCA_JoystickSensor::Connected_doc[] =
"getConnected\n"
"\tReturns True if a joystick is connected at this joysticks index.\n";
-PyObject* SCA_JoystickSensor::PyConnected( PyObject* self ) {
+PyObject* SCA_JoystickSensor::PyConnected( ) {
ShowDeprecationWarning("getConnected()", "the connected property");
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
return PyBool_FromLong( joy ? joy->Connected() : 0 );
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
index 3e19c880c4d..d56e5fe29dc 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
@@ -412,7 +412,7 @@ void SCA_KeyboardSensor::LogKeystrokes(void)
const char SCA_KeyboardSensor::GetKey_doc[] =
"getKey()\n"
"\tReturn the code of the key this sensor is listening to.\n" ;
-PyObject* SCA_KeyboardSensor::PyGetKey(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PyGetKey()
{
ShowDeprecationWarning("getKey()", "the key property");
return PyInt_FromLong(m_hotkey);
@@ -423,7 +423,7 @@ const char SCA_KeyboardSensor::SetKey_doc[] =
"setKey(keycode)\n"
"\t- keycode: any code from GameKeys\n"
"\tSet the key this sensor should listen to.\n" ;
-PyObject* SCA_KeyboardSensor::PySetKey(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PySetKey(PyObject* args)
{
ShowDeprecationWarning("setKey()", "the key property");
int keyCode;
@@ -444,7 +444,7 @@ const char SCA_KeyboardSensor::GetHold1_doc[] =
"getHold1()\n"
"\tReturn the code of the first key modifier to the key this \n"
"\tsensor is listening to.\n" ;
-PyObject* SCA_KeyboardSensor::PyGetHold1(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PyGetHold1()
{
ShowDeprecationWarning("getHold1()", "the hold1 property");
return PyInt_FromLong(m_qual);
@@ -455,7 +455,7 @@ const char SCA_KeyboardSensor::SetHold1_doc[] =
"setHold1(keycode)\n"
"\t- keycode: any code from GameKeys\n"
"\tSet the first modifier to the key this sensor should listen to.\n" ;
-PyObject* SCA_KeyboardSensor::PySetHold1(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PySetHold1(PyObject* args)
{
ShowDeprecationWarning("setHold1()", "the hold1 property");
int keyCode;
@@ -476,7 +476,7 @@ const char SCA_KeyboardSensor::GetHold2_doc[] =
"getHold2()\n"
"\tReturn the code of the second key modifier to the key this \n"
"\tsensor is listening to.\n" ;
-PyObject* SCA_KeyboardSensor::PyGetHold2(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PyGetHold2()
{
ShowDeprecationWarning("getHold2()", "the hold2 property");
return PyInt_FromLong(m_qual2);
@@ -487,7 +487,7 @@ const char SCA_KeyboardSensor::SetHold2_doc[] =
"setHold2(keycode)\n"
"\t- keycode: any code from GameKeys\n"
"\tSet the first modifier to the key this sensor should listen to.\n" ;
-PyObject* SCA_KeyboardSensor::PySetHold2(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PySetHold2(PyObject* args)
{
ShowDeprecationWarning("setHold2()", "the hold2 property");
int keyCode;
@@ -508,7 +508,7 @@ const char SCA_KeyboardSensor::GetPressedKeys_doc[] =
"getPressedKeys()\n"
"\tGet a list of pressed keys that have either been pressed, or just released this frame.\n" ;
-PyObject* SCA_KeyboardSensor::PyGetPressedKeys(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PyGetPressedKeys()
{
ShowDeprecationWarning("getPressedKeys()", "events");
@@ -549,7 +549,7 @@ const char SCA_KeyboardSensor::GetCurrentlyPressedKeys_doc[] =
"getCurrentlyPressedKeys()\n"
"\tGet a list of keys that are currently pressed.\n" ;
-PyObject* SCA_KeyboardSensor::PyGetCurrentlyPressedKeys(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_KeyboardSensor::PyGetCurrentlyPressedKeys()
{
ShowDeprecationWarning("getCurrentlyPressedKeys()", "events");
@@ -640,14 +640,14 @@ PyParentObject SCA_KeyboardSensor::Parents[] = {
PyMethodDef SCA_KeyboardSensor::Methods[] = {
//Deprecated functions ------>
- {"getKey", (PyCFunction) SCA_KeyboardSensor::sPyGetKey, METH_VARARGS, (PY_METHODCHAR)GetKey_doc},
+ {"getKey", (PyCFunction) SCA_KeyboardSensor::sPyGetKey, METH_NOARGS, (PY_METHODCHAR)GetKey_doc},
{"setKey", (PyCFunction) SCA_KeyboardSensor::sPySetKey, METH_VARARGS, (PY_METHODCHAR)SetKey_doc},
- {"getHold1", (PyCFunction) SCA_KeyboardSensor::sPyGetHold1, METH_VARARGS, (PY_METHODCHAR)GetHold1_doc},
+ {"getHold1", (PyCFunction) SCA_KeyboardSensor::sPyGetHold1, METH_NOARGS, (PY_METHODCHAR)GetHold1_doc},
{"setHold1", (PyCFunction) SCA_KeyboardSensor::sPySetHold1, METH_VARARGS, (PY_METHODCHAR)SetHold1_doc},
- {"getHold2", (PyCFunction) SCA_KeyboardSensor::sPyGetHold2, METH_VARARGS, (PY_METHODCHAR)GetHold2_doc},
+ {"getHold2", (PyCFunction) SCA_KeyboardSensor::sPyGetHold2, METH_NOARGS, (PY_METHODCHAR)GetHold2_doc},
{"setHold2", (PyCFunction) SCA_KeyboardSensor::sPySetHold2, METH_VARARGS, (PY_METHODCHAR)SetHold2_doc},
- {"getPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetPressedKeys, METH_VARARGS, (PY_METHODCHAR)GetPressedKeys_doc},
- {"getCurrentlyPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetCurrentlyPressedKeys, METH_VARARGS, (PY_METHODCHAR)GetCurrentlyPressedKeys_doc},
+ {"getPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetPressedKeys, METH_NOARGS, (PY_METHODCHAR)GetPressedKeys_doc},
+ {"getCurrentlyPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetCurrentlyPressedKeys, METH_NOARGS, (PY_METHODCHAR)GetCurrentlyPressedKeys_doc},
//<----- Deprecated
KX_PYMETHODTABLE_O(SCA_KeyboardSensor, getKeyStatus),
{NULL,NULL} //Sentinel
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
index eb26afc96ff..073b3e6dbe0 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
@@ -115,21 +115,21 @@ public:
//Deprecated functions ----->
/** 1. GetKey : check which key this sensor looks at */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetKey);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetKey);
/** 2. SetKey: change the key to look at */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetKey);
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetKey);
/** 3. GetHold1 : set the first bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetHold1);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold1);
/** 4. SetHold1: change the first bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetHold1);
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold1);
/** 5. GetHold2 : set the second bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetHold2);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold2);
/** 6. SetHold2: change the second bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetHold2);
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold2);
/** 9. GetPressedKeys: */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetPressedKeys);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetPressedKeys);
/** 9. GetCurrrentlyPressedKeys: */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetCurrentlyPressedKeys);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetCurrentlyPressedKeys);
// <------
// KeyEvents:
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
index 0c30f503068..8f41e799b01 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
@@ -252,9 +252,7 @@ const char SCA_MouseSensor::GetXPosition_doc[] =
"\tReturns the x-coordinate of the mouse sensor, in frame coordinates.\n"
"\tThe lower-left corner is the origin. The coordinate is given in\n"
"\tpixels\n";
-PyObject* SCA_MouseSensor::PyGetXPosition(PyObject* self,
- PyObject* args,
- PyObject* kwds) {
+PyObject* SCA_MouseSensor::PyGetXPosition() {
ShowDeprecationWarning("getXPosition()", "the position property");
return PyInt_FromLong(m_x);
}
@@ -265,9 +263,7 @@ const char SCA_MouseSensor::GetYPosition_doc[] =
"\tReturns the y-coordinate of the mouse sensor, in frame coordinates.\n"
"\tThe lower-left corner is the origin. The coordinate is given in\n"
"\tpixels\n";
-PyObject* SCA_MouseSensor::PyGetYPosition(PyObject* self,
- PyObject* args,
- PyObject* kwds) {
+PyObject* SCA_MouseSensor::PyGetYPosition() {
ShowDeprecationWarning("getYPosition()", "the position property");
return PyInt_FromLong(m_y);
}
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.h b/source/gameengine/GameLogic/SCA_MouseSensor.h
index 73410569cc2..2d1c496029d 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.h
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.h
@@ -114,9 +114,9 @@ class SCA_MouseSensor : public SCA_ISensor
//Deprecated functions ----->
/* read x-coordinate */
- KX_PYMETHOD_DOC(SCA_MouseSensor,GetXPosition);
+ KX_PYMETHOD_DOC_NOARGS(SCA_MouseSensor,GetXPosition);
/* read y-coordinate */
- KX_PYMETHOD_DOC(SCA_MouseSensor,GetYPosition);
+ KX_PYMETHOD_DOC_NOARGS(SCA_MouseSensor,GetYPosition);
//<----- deprecated
// get button status
diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
index 4bcb59d0812..c4db723ee89 100644
--- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
@@ -289,7 +289,7 @@ const char SCA_PropertyActuator::SetProperty_doc[] =
"\t- name: string\n"
"\tSet the property on which to operate. If there is no property\n"
"\tof this name, the call is ignored.\n";
-PyObject* SCA_PropertyActuator::PySetProperty(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertyActuator::PySetProperty(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("setProperty()", "the 'property' property");
/* Check whether the name exists first ! */
@@ -314,7 +314,7 @@ PyObject* SCA_PropertyActuator::PySetProperty(PyObject* self, PyObject* args, Py
const char SCA_PropertyActuator::GetProperty_doc[] =
"getProperty(name)\n"
"\tReturn the property on which the actuator operates.\n";
-PyObject* SCA_PropertyActuator::PyGetProperty(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertyActuator::PyGetProperty(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("getProperty()", "the 'property' property");
return PyString_FromString(m_propname);
@@ -327,7 +327,7 @@ const char SCA_PropertyActuator::SetValue_doc[] =
"\tSet the value with which the actuator operates. If the value\n"
"\tis not compatible with the type of the property, the subsequent\n"
"\t action is ignored.\n";
-PyObject* SCA_PropertyActuator::PySetValue(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertyActuator::PySetValue(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("setValue()", "the value property");
char *valArg;
@@ -344,7 +344,7 @@ PyObject* SCA_PropertyActuator::PySetValue(PyObject* self, PyObject* args, PyObj
const char SCA_PropertyActuator::GetValue_doc[] =
"getValue()\n"
"\tReturns the value with which the actuator operates.\n";
-PyObject* SCA_PropertyActuator::PyGetValue(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertyActuator::PyGetValue(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("getValue()", "the value property");
return PyString_FromString(m_exprtxt);
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index 5c8a14db563..de8a9fcf03e 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -334,11 +334,11 @@ PyParentObject SCA_PropertySensor::Parents[] = {
PyMethodDef SCA_PropertySensor::Methods[] = {
//Deprecated functions ------>
- {"getType", (PyCFunction) SCA_PropertySensor::sPyGetType, METH_VARARGS, (PY_METHODCHAR)GetType_doc},
+ {"getType", (PyCFunction) SCA_PropertySensor::sPyGetType, METH_NOARGS, (PY_METHODCHAR)GetType_doc},
{"setType", (PyCFunction) SCA_PropertySensor::sPySetType, METH_VARARGS, (PY_METHODCHAR)SetType_doc},
- {"getProperty", (PyCFunction) SCA_PropertySensor::sPyGetProperty, METH_VARARGS, (PY_METHODCHAR)GetProperty_doc},
+ {"getProperty", (PyCFunction) SCA_PropertySensor::sPyGetProperty, METH_NOARGS, (PY_METHODCHAR)GetProperty_doc},
{"setProperty", (PyCFunction) SCA_PropertySensor::sPySetProperty, METH_VARARGS, (PY_METHODCHAR)SetProperty_doc},
- {"getValue", (PyCFunction) SCA_PropertySensor::sPyGetValue, METH_VARARGS, (PY_METHODCHAR)GetValue_doc},
+ {"getValue", (PyCFunction) SCA_PropertySensor::sPyGetValue, METH_NOARGS, (PY_METHODCHAR)GetValue_doc},
{"setValue", (PyCFunction) SCA_PropertySensor::sPySetValue, METH_VARARGS, (PY_METHODCHAR)SetValue_doc},
//<----- Deprecated
{NULL,NULL} //Sentinel
@@ -364,7 +364,7 @@ int SCA_PropertySensor::py_setattro(PyObject *attr, PyObject *value) {
const char SCA_PropertySensor::GetType_doc[] =
"getType()\n"
"\tReturns the type of check this sensor performs.\n";
-PyObject* SCA_PropertySensor::PyGetType(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertySensor::PyGetType()
{
ShowDeprecationWarning("getType()", "the type property");
return PyInt_FromLong(m_checktype);
@@ -377,7 +377,7 @@ const char SCA_PropertySensor::SetType_doc[] =
"\t KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED,\n"
"\t or KX_PROPSENSOR_EXPRESSION.\n"
"\tSet the type of check to perform.\n";
-PyObject* SCA_PropertySensor::PySetType(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertySensor::PySetType(PyObject* args)
{
ShowDeprecationWarning("setType()", "the type property");
int typeArg;
@@ -398,7 +398,7 @@ PyObject* SCA_PropertySensor::PySetType(PyObject* self, PyObject* args, PyObject
const char SCA_PropertySensor::GetProperty_doc[] =
"getProperty()\n"
"\tReturn the property with which the sensor operates.\n";
-PyObject* SCA_PropertySensor::PyGetProperty(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertySensor::PyGetProperty()
{
ShowDeprecationWarning("getProperty()", "the 'property' property");
return PyString_FromString(m_checkpropname);
@@ -410,7 +410,7 @@ const char SCA_PropertySensor::SetProperty_doc[] =
"\t- name: string\n"
"\tSets the property with which to operate. If there is no property\n"
"\tof this name, the call is ignored.\n";
-PyObject* SCA_PropertySensor::PySetProperty(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertySensor::PySetProperty(PyObject* args)
{
ShowDeprecationWarning("setProperty()", "the 'property' property");
/* We should query whether the name exists. Or should we create a prop */
@@ -435,7 +435,7 @@ PyObject* SCA_PropertySensor::PySetProperty(PyObject* self, PyObject* args, PyOb
const char SCA_PropertySensor::GetValue_doc[] =
"getValue()\n"
"\tReturns the value with which the sensor operates.\n";
-PyObject* SCA_PropertySensor::PyGetValue(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertySensor::PyGetValue()
{
ShowDeprecationWarning("getValue()", "the value property");
return PyString_FromString(m_checkpropval);
@@ -448,7 +448,7 @@ const char SCA_PropertySensor::SetValue_doc[] =
"\tSet the value with which the sensor operates. If the value\n"
"\tis not compatible with the type of the property, the subsequent\n"
"\t action is ignored.\n";
-PyObject* SCA_PropertySensor::PySetValue(PyObject* self, PyObject* args, PyObject* kwds)
+PyObject* SCA_PropertySensor::PySetValue(PyObject* args)
{
ShowDeprecationWarning("setValue()", "the value property");
/* Here, we need to check whether the value is 'valid' for this property.*/
@@ -460,7 +460,7 @@ PyObject* SCA_PropertySensor::PySetValue(PyObject* self, PyObject* args, PyObjec
}
STR_String oldval = m_checkpropval;
m_checkpropval = propValArg;
- if (validValueForProperty(self, NULL)) {
+ if (validValueForProperty(m_proxy, NULL)) {
m_checkpropval = oldval;
return NULL;
}
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.h b/source/gameengine/GameLogic/SCA_PropertySensor.h
index 076c1ae51ec..e1e378a973c 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.h
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.h
@@ -93,17 +93,17 @@ public:
virtual int py_setattro(PyObject *attr, PyObject *value);
/* 1. getType */
- KX_PYMETHOD_DOC(SCA_PropertySensor,GetType);
+ KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetType);
/* 2. setType */
- KX_PYMETHOD_DOC(SCA_PropertySensor,SetType);
+ KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetType);
/* 3. setProperty */
- KX_PYMETHOD_DOC(SCA_PropertySensor,SetProperty);
+ KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetProperty);
/* 4. getProperty */
- KX_PYMETHOD_DOC(SCA_PropertySensor,GetProperty);
+ KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetProperty);
/* 5. getValue */
- KX_PYMETHOD_DOC(SCA_PropertySensor,GetValue);
+ KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetValue);
/* 6. setValue */
- KX_PYMETHOD_DOC(SCA_PropertySensor,SetValue);
+ KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetValue);
/**
* Test whether this is a sensible value (type check)
*/
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index 0d096385fa9..121f868a281 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -154,8 +154,8 @@ int SCA_PythonController::IsTriggered(class SCA_ISensor* sensor)
static const char* sPyGetCurrentController__doc__;
#endif
-
-PyObject* SCA_PythonController::sPyGetCurrentController(PyObject* self)
+/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */
+PyObject* SCA_PythonController::sPyGetCurrentController(PyObject *self)
{
return m_sCurrentController->GetProxy();
}
@@ -197,12 +197,9 @@ SCA_IActuator* SCA_PythonController::LinkedActuatorFromPy(PyObject *value)
static const char* sPyAddActiveActuator__doc__;
#endif
-PyObject* SCA_PythonController::sPyAddActiveActuator(
-
- PyObject* self,
- PyObject* args)
+/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */
+PyObject* SCA_PythonController::sPyAddActiveActuator(PyObject* self, PyObject* args)
{
-
PyObject* ob1;
int activate;
if (!PyArg_ParseTuple(args, "Oi:addActiveActuator", &ob1,&activate))
@@ -384,7 +381,7 @@ int SCA_PythonController::py_setattro(PyObject *attr, PyObject *value)
py_setattro_up(SCA_IController);
}
-PyObject* SCA_PythonController::PyActivate(PyObject* self, PyObject *value)
+PyObject* SCA_PythonController::PyActivate(PyObject *value)
{
SCA_IActuator* actu = LinkedActuatorFromPy(value);
if(actu==NULL)
@@ -396,7 +393,7 @@ PyObject* SCA_PythonController::PyActivate(PyObject* self, PyObject *value)
Py_RETURN_NONE;
}
-PyObject* SCA_PythonController::PyDeActivate(PyObject* self, PyObject *value)
+PyObject* SCA_PythonController::PyDeActivate(PyObject *value)
{
SCA_IActuator* actu = LinkedActuatorFromPy(value);
if(actu==NULL)
@@ -408,7 +405,7 @@ PyObject* SCA_PythonController::PyDeActivate(PyObject* self, PyObject *value)
Py_RETURN_NONE;
}
-PyObject* SCA_PythonController::PyGetActuators(PyObject* self)
+PyObject* SCA_PythonController::PyGetActuators()
{
PyObject* resultlist = PyList_New(m_linkedactuators.size());
for (unsigned int index=0;index<m_linkedactuators.size();index++)
@@ -422,7 +419,7 @@ PyObject* SCA_PythonController::PyGetActuators(PyObject* self)
const char SCA_PythonController::GetSensor_doc[] =
"GetSensor (char sensorname) return linked sensor that is named [sensorname]\n";
PyObject*
-SCA_PythonController::PyGetSensor(PyObject* self, PyObject* value)
+SCA_PythonController::PyGetSensor(PyObject* value)
{
char *scriptArg = PyString_AsString(value);
@@ -450,7 +447,7 @@ SCA_PythonController::PyGetSensor(PyObject* self, PyObject* value)
const char SCA_PythonController::GetActuator_doc[] =
"GetActuator (char sensorname) return linked actuator that is named [actuatorname]\n";
PyObject*
-SCA_PythonController::PyGetActuator(PyObject* self, PyObject* value)
+SCA_PythonController::PyGetActuator(PyObject* value)
{
char *scriptArg = PyString_AsString(value);
@@ -475,7 +472,7 @@ SCA_PythonController::PyGetActuator(PyObject* self, PyObject* value)
const char SCA_PythonController::GetSensors_doc[] = "getSensors returns a list of all attached sensors";
PyObject*
-SCA_PythonController::PyGetSensors(PyObject* self)
+SCA_PythonController::PyGetSensors()
{
PyObject* resultlist = PyList_New(m_linkedsensors.size());
for (unsigned int index=0;index<m_linkedsensors.size();index++)
@@ -487,14 +484,14 @@ SCA_PythonController::PyGetSensors(PyObject* self)
}
/* 1. getScript */
-PyObject* SCA_PythonController::PyGetScript(PyObject* self)
+PyObject* SCA_PythonController::PyGetScript()
{
ShowDeprecationWarning("getScript()", "the script property");
return PyString_FromString(m_scriptText);
}
/* 2. setScript */
-PyObject* SCA_PythonController::PySetScript(PyObject* self, PyObject* value)
+PyObject* SCA_PythonController::PySetScript(PyObject* value)
{
char *scriptArg = PyString_AsString(value);
@@ -514,7 +511,7 @@ PyObject* SCA_PythonController::PySetScript(PyObject* self, PyObject* value)
}
/* 1. getScript */
-PyObject* SCA_PythonController::PyGetState(PyObject* self)
+PyObject* SCA_PythonController::PyGetState()
{
ShowDeprecationWarning("getState()", "the state property");
return PyInt_FromLong(m_statemask);
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index 7a3fdc862f6..6fb10faaf8c 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -341,12 +341,12 @@ PyParentObject SCA_RandomActuator::Parents[] = {
PyMethodDef SCA_RandomActuator::Methods[] = {
//Deprecated functions ------>
{"setSeed", (PyCFunction) SCA_RandomActuator::sPySetSeed, METH_VARARGS, (PY_METHODCHAR)SetSeed_doc},
- {"getSeed", (PyCFunction) SCA_RandomActuator::sPyGetSeed, METH_VARARGS, (PY_METHODCHAR)GetSeed_doc},
- {"getPara1", (PyCFunction) SCA_RandomActuator::sPyGetPara1, METH_VARARGS, (PY_METHODCHAR)GetPara1_doc},
- {"getPara2", (PyCFunction) SCA_RandomActuator::sPyGetPara2, METH_VARARGS, (PY_METHODCHAR)GetPara2_doc},
- {"getDistribution", (PyCFunction) SCA_RandomActuator::sPyGetDistribution, METH_VARARGS, (PY_METHODCHAR)GetDistribution_doc},
+ {"getSeed", (PyCFunction) SCA_RandomActuator::sPyGetSeed, METH_NOARGS, (PY_METHODCHAR)GetSeed_doc},
+ {"getPara1", (PyCFunction) SCA_RandomActuator::sPyGetPara1, METH_NOARGS, (PY_METHODCHAR)GetPara1_doc},
+ {"getPara2", (PyCFunction) SCA_RandomActuator::sPyGetPara2, METH_NOARGS, (PY_METHODCHAR)GetPara2_doc},
+ {"getDistribution", (PyCFunction) SCA_RandomActuator::sPyGetDistribution, METH_NOARGS, (PY_METHODCHAR)GetDistribution_doc},
{"setProperty", (PyCFunction) SCA_RandomActuator::sPySetProperty, METH_VARARGS, (PY_METHODCHAR)SetProperty_doc},
- {"getProperty", (PyCFunction) SCA_RandomActuator::sPyGetProperty, METH_VARARGS, (PY_METHODCHAR)GetProperty_doc},
+ {"getProperty", (PyCFunction) SCA_RandomActuator::sPyGetProperty, METH_NOARGS, (PY_METHODCHAR)GetProperty_doc},
//<----- Deprecated
KX_PYMETHODTABLE(SCA_RandomActuator, setBoolConst),
KX_PYMETHODTABLE_NOARGS(SCA_RandomActuator, setBoolUniform),
@@ -407,7 +407,7 @@ const char SCA_RandomActuator::SetSeed_doc[] =
"\tSet the initial seed of the generator. Equal seeds produce\n"
"\tequal series. If the seed is 0, the generator will produce\n"
"\tthe same value on every call.\n";
-PyObject* SCA_RandomActuator::PySetSeed(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomActuator::PySetSeed(PyObject* args) {
ShowDeprecationWarning("setSeed()", "the seed property");
long seedArg;
if(!PyArg_ParseTuple(args, "i:setSeed", &seedArg)) {
@@ -423,7 +423,8 @@ const char SCA_RandomActuator::GetSeed_doc[] =
"getSeed()\n"
"\tReturns the initial seed of the generator. Equal seeds produce\n"
"\tequal series.\n";
-PyObject* SCA_RandomActuator::PyGetSeed(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomActuator::PyGetSeed()
+{
ShowDeprecationWarning("getSeed()", "the seed property");
return PyInt_FromLong(m_base->GetSeed());
}
@@ -434,7 +435,8 @@ const char SCA_RandomActuator::GetPara1_doc[] =
"\tReturns the first parameter of the active distribution. Refer\n"
"\tto the documentation of the generator types for the meaning\n"
"\tof this value.";
-PyObject* SCA_RandomActuator::PyGetPara1(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomActuator::PyGetPara1()
+{
ShowDeprecationWarning("getPara1()", "the para1 property");
return PyFloat_FromDouble(m_parameter1);
}
@@ -445,7 +447,8 @@ const char SCA_RandomActuator::GetPara2_doc[] =
"\tReturns the first parameter of the active distribution. Refer\n"
"\tto the documentation of the generator types for the meaning\n"
"\tof this value.";
-PyObject* SCA_RandomActuator::PyGetPara2(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomActuator::PyGetPara2()
+{
ShowDeprecationWarning("getPara2()", "the para2 property");
return PyFloat_FromDouble(m_parameter2);
}
@@ -454,7 +457,8 @@ PyObject* SCA_RandomActuator::PyGetPara2(PyObject* self, PyObject* args, PyObjec
const char SCA_RandomActuator::GetDistribution_doc[] =
"getDistribution()\n"
"\tReturns the type of the active distribution.\n";
-PyObject* SCA_RandomActuator::PyGetDistribution(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomActuator::PyGetDistribution()
+{
ShowDeprecationWarning("getDistribution()", "the distribution property");
return PyInt_FromLong(m_distribution);
}
@@ -465,7 +469,7 @@ const char SCA_RandomActuator::SetProperty_doc[] =
"\t- name: string\n"
"\tSet the property to which the random value is assigned. If the \n"
"\tgenerator and property types do not match, the assignment is ignored.\n";
-PyObject* SCA_RandomActuator::PySetProperty(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomActuator::PySetProperty(PyObject* args) {
ShowDeprecationWarning("setProperty()", "the 'property' property");
char *nameArg;
if (!PyArg_ParseTuple(args, "s:setProperty", &nameArg)) {
@@ -488,7 +492,8 @@ const char SCA_RandomActuator::GetProperty_doc[] =
"getProperty(name)\n"
"\tReturn the property to which the random value is assigned. If the \n"
"\tgenerator and property types do not match, the assignment is ignored.\n";
-PyObject* SCA_RandomActuator::PyGetProperty(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomActuator::PyGetProperty()
+{
ShowDeprecationWarning("getProperty()", "the 'property' property");
return PyString_FromString(m_propname);
}
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.h b/source/gameengine/GameLogic/SCA_RandomActuator.h
index fbafbb69c01..8f58ed0dcec 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.h
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.h
@@ -103,13 +103,13 @@ class SCA_RandomActuator : public SCA_IActuator
static int pyattr_set_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
// Deprecated methods ----->
- KX_PYMETHOD_DOC(SCA_RandomActuator,SetSeed);
- KX_PYMETHOD_DOC(SCA_RandomActuator,GetSeed);
- KX_PYMETHOD_DOC(SCA_RandomActuator,GetPara1);
- KX_PYMETHOD_DOC(SCA_RandomActuator,GetPara2);
- KX_PYMETHOD_DOC(SCA_RandomActuator,GetDistribution);
- KX_PYMETHOD_DOC(SCA_RandomActuator,SetProperty);
- KX_PYMETHOD_DOC(SCA_RandomActuator,GetProperty);
+ KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator,SetSeed);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetSeed);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetPara1);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetPara2);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetDistribution);
+ KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator,SetProperty);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetProperty);
// <-----
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setBoolConst);
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
index b0bc518825b..e04d2a8ab90 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
@@ -155,8 +155,8 @@ PyParentObject SCA_RandomSensor::Parents[] = {
PyMethodDef SCA_RandomSensor::Methods[] = {
{"setSeed", (PyCFunction) SCA_RandomSensor::sPySetSeed, METH_VARARGS, (PY_METHODCHAR)SetSeed_doc},
- {"getSeed", (PyCFunction) SCA_RandomSensor::sPyGetSeed, METH_VARARGS, (PY_METHODCHAR)GetSeed_doc},
- {"getLastDraw", (PyCFunction) SCA_RandomSensor::sPyGetLastDraw, METH_VARARGS, (PY_METHODCHAR)GetLastDraw_doc},
+ {"getSeed", (PyCFunction) SCA_RandomSensor::sPyGetSeed, METH_NOARGS, (PY_METHODCHAR)GetSeed_doc},
+ {"getLastDraw", (PyCFunction) SCA_RandomSensor::sPyGetLastDraw, METH_NOARGS, (PY_METHODCHAR)GetLastDraw_doc},
{NULL,NULL} //Sentinel
};
@@ -182,7 +182,7 @@ const char SCA_RandomSensor::SetSeed_doc[] =
"\tSet the initial seed of the generator. Equal seeds produce\n"
"\tequal series. If the seed is 0, the generator will produce\n"
"\tthe same value on every call.\n";
-PyObject* SCA_RandomSensor::PySetSeed(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomSensor::PySetSeed(PyObject* args) {
ShowDeprecationWarning("setSeed()", "the seed property");
long seedArg;
if(!PyArg_ParseTuple(args, "i:setSeed", &seedArg)) {
@@ -199,7 +199,7 @@ const char SCA_RandomSensor::GetSeed_doc[] =
"getSeed()\n"
"\tReturns the initial seed of the generator. Equal seeds produce\n"
"\tequal series.\n";
-PyObject* SCA_RandomSensor::PyGetSeed(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomSensor::PyGetSeed() {
ShowDeprecationWarning("getSeed()", "the seed property");
return PyInt_FromLong(m_basegenerator->GetSeed());
}
@@ -208,7 +208,7 @@ PyObject* SCA_RandomSensor::PyGetSeed(PyObject* self, PyObject* args, PyObject*
const char SCA_RandomSensor::GetLastDraw_doc[] =
"getLastDraw()\n"
"\tReturn the last value that was drawn.\n";
-PyObject* SCA_RandomSensor::PyGetLastDraw(PyObject* self, PyObject* args, PyObject* kwds) {
+PyObject* SCA_RandomSensor::PyGetLastDraw() {
ShowDeprecationWarning("getLastDraw()", "the lastDraw property");
return PyInt_FromLong(m_lastdraw);
}
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.h b/source/gameengine/GameLogic/SCA_RandomSensor.h
index 844552f0b64..764692600c3 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.h
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.h
@@ -64,11 +64,11 @@ public:
virtual int py_setattro(PyObject *attr, PyObject *value);
/* 1. setSeed */
- KX_PYMETHOD_DOC(SCA_RandomSensor,SetSeed);
+ KX_PYMETHOD_DOC_VARARGS(SCA_RandomSensor,SetSeed);
/* 2. getSeed */
- KX_PYMETHOD_DOC(SCA_RandomSensor,GetSeed);
- /* 3. getSeed */
- KX_PYMETHOD_DOC(SCA_RandomSensor,GetLastDraw);
+ 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);