diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 08:58:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 08:58:18 +0400 |
commit | 2fb82920059257fd7ac8e33bfe53de13e7ed53bd (patch) | |
tree | cb8de3a839cb9878d0869d4e436a235346109c16 /source/gameengine/GameLogic | |
parent | c2a1dcf6218cbd56126a5deb1aeaf212d67e54cb (diff) |
style cleanup
Diffstat (limited to 'source/gameengine/GameLogic')
26 files changed, 108 insertions, 107 deletions
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h index 685cc3fcc48..912484a2fe5 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h @@ -65,7 +65,7 @@ class SCA_Joystick /** *support for JOYHAT_MAX hats (each is a direction) */ - int m_hat_array[JOYHAT_MAX]; + int m_hat_array[JOYHAT_MAX]; /** * Precision or range of the axes diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp index 3fda542410a..6d76f122163 100644 --- a/source/gameengine/GameLogic/SCA_IController.cpp +++ b/source/gameengine/GameLogic/SCA_IController.cpp @@ -238,19 +238,19 @@ PyAttributeDef SCA_IController::Attributes[] = { { NULL } //Sentinel }; -PyObject* SCA_IController::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_IController::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_IController* self= static_cast<SCA_IController*>(self_v); return PyLong_FromSsize_t(self->m_statemask); } -PyObject* SCA_IController::pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_IController::pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - return KX_PythonSeq_CreatePyObject((static_cast<SCA_IController*>(self_v))->m_proxy, KX_PYGENSEQ_CONT_TYPE_SENSORS); + return KX_PythonSeq_CreatePyObject((static_cast<SCA_IController*>(self_v))->m_proxy, KX_PYGENSEQ_CONT_TYPE_SENSORS); } -PyObject* SCA_IController::pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_IController::pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - return KX_PythonSeq_CreatePyObject((static_cast<SCA_IController*>(self_v))->m_proxy, KX_PYGENSEQ_CONT_TYPE_ACTUATORS); + return KX_PythonSeq_CreatePyObject((static_cast<SCA_IController*>(self_v))->m_proxy, KX_PYGENSEQ_CONT_TYPE_ACTUATORS); } #endif // WITH_PYTHON diff --git a/source/gameengine/GameLogic/SCA_IInputDevice.cpp b/source/gameengine/GameLogic/SCA_IInputDevice.cpp index 16626b05526..f4fce034c87 100644 --- a/source/gameengine/GameLogic/SCA_IInputDevice.cpp +++ b/source/gameengine/GameLogic/SCA_IInputDevice.cpp @@ -45,7 +45,7 @@ SCA_IInputDevice::SCA_IInputDevice() SCA_IInputDevice::~SCA_IInputDevice() { -} +} void SCA_IInputDevice::HookEscape() { @@ -134,6 +134,6 @@ void SCA_IInputDevice::NextFrame() break; default: ; /* error */ - } + } } } diff --git a/source/gameengine/GameLogic/SCA_IInputDevice.h b/source/gameengine/GameLogic/SCA_IInputDevice.h index 0382a2efd21..66a1209751d 100644 --- a/source/gameengine/GameLogic/SCA_IInputDevice.h +++ b/source/gameengine/GameLogic/SCA_IInputDevice.h @@ -69,7 +69,7 @@ class SCA_IInputDevice public: SCA_IInputDevice(); - virtual ~SCA_IInputDevice(); + virtual ~SCA_IInputDevice(); enum KX_EnumInputs { @@ -120,17 +120,17 @@ public: KX_RETKEY = 13, KX_SPACEKEY = 32, KX_PADASTERKEY = 42, - KX_COMMAKEY = 44, - KX_MINUSKEY = 45, + KX_COMMAKEY = 44, + KX_MINUSKEY = 45, KX_PERIODKEY = 46, KX_ZEROKEY = 48, KX_ONEKEY, // =49 - KX_TWOKEY, + KX_TWOKEY, KX_THREEKEY, - KX_FOURKEY, - KX_FIVEKEY, - KX_SIXKEY, + KX_FOURKEY, + KX_FIVEKEY, + KX_SIXKEY, KX_SEVENKEY, KX_EIGHTKEY, KX_NINEKEY, // = 57 @@ -170,14 +170,14 @@ public: KX_LEFTALTKEY, KX_RIGHTALTKEY, KX_RIGHTCTRLKEY, - KX_RIGHTSHIFTKEY, + KX_RIGHTSHIFTKEY, KX_LEFTSHIFTKEY,// 129 KX_ESCKEY, // 130 KX_TABKEY, //131 - KX_LINEFEEDKEY, // 132 + KX_LINEFEEDKEY, // 132 KX_BACKSPACEKEY, KX_DELKEY, KX_SEMICOLONKEY, // 135 @@ -188,13 +188,13 @@ public: KX_SLASHKEY, //138 KX_BACKSLASHKEY, - KX_EQUALKEY, - KX_LEFTBRACKETKEY, + KX_EQUALKEY, + KX_LEFTBRACKETKEY, KX_RIGHTBRACKETKEY, // 142 KX_LEFTARROWKEY, // 145 KX_DOWNARROWKEY, - KX_RIGHTARROWKEY, + KX_RIGHTARROWKEY, KX_UPARROWKEY, // 148 KX_PAD2 , diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp index 018a939f68d..cfbdc1e750f 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp @@ -231,7 +231,7 @@ int SCA_ILogicBrick::CheckProperty(void *self, const PyAttributeDef *attrdef) } /*Attribute functions */ -PyObject* SCA_ILogicBrick::pyattr_get_owner(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_ILogicBrick::pyattr_get_owner(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_ILogicBrick* self= static_cast<SCA_ILogicBrick*>(self_v); CValue* parent = self->GetParent(); @@ -254,9 +254,9 @@ bool SCA_ILogicBrick::PyArgToBool(int boolArg) } } -PyObject* SCA_ILogicBrick::BoolToPyArg(bool boolarg) +PyObject *SCA_ILogicBrick::BoolToPyArg(bool boolarg) { - return PyLong_FromSsize_t(boolarg? KX_TRUE: KX_FALSE); + return PyLong_FromSsize_t(boolarg? KX_TRUE: KX_FALSE); } #endif // WITH_PYTHON diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h index b505353c7cd..c5fa9399ab7 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.h +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h @@ -157,7 +157,7 @@ protected: bool PyArgToBool(int boolArg); /** Convert a a c++ value to KX_TRUE, KX_FALSE in Python. */ - PyObject* BoolToPyArg(bool); + PyObject *BoolToPyArg(bool); #endif // WITH_PYTHON diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp index b90952b2092..ab9e2781001 100644 --- a/source/gameengine/GameLogic/SCA_IObject.cpp +++ b/source/gameengine/GameLogic/SCA_IObject.cpp @@ -224,7 +224,7 @@ SCA_IController* SCA_IObject::FindController(const STR_String& controllername) { foundcontroller = (*itc); break; - } + } } return foundcontroller; } diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h index 0e657794195..a850d23babf 100644 --- a/source/gameengine/GameLogic/SCA_IObject.h +++ b/source/gameengine/GameLogic/SCA_IObject.h @@ -43,7 +43,7 @@ class SCA_IController; class SCA_IActuator; #ifdef WITH_PYTHON -template<class T> T PyVecTo(PyObject*); +template<class T> T PyVecTo(PyObject *); #endif typedef std::vector<SCA_ISensor *> SCA_SensorList; @@ -213,7 +213,7 @@ public: */ unsigned int GetState(void) { return m_state; } -// const class MT_Point3& ConvertPythonPylist(PyObject* pylist); +// const class MT_Point3& ConvertPythonPylist(PyObject *pylist); virtual int GetGameObjectType() {return -1;} diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index 76b9a8df00f..7cf0b18c3b5 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -248,7 +248,7 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr) if (result) { // the sensor triggered this frame if (m_state || !m_tap) { - ActivateControllers(logicmgr); + ActivateControllers(logicmgr); // reset these counters so that pulse are synchronized with transition m_pos_ticks = 0; m_neg_ticks = 0; @@ -380,7 +380,7 @@ PyAttributeDef SCA_ISensor::Attributes[] = { }; -PyObject* SCA_ISensor::pyattr_get_triggered(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_ISensor::pyattr_get_triggered(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_ISensor* self= static_cast<SCA_ISensor*>(self_v); int retval = 0; @@ -389,13 +389,13 @@ PyObject* SCA_ISensor::pyattr_get_triggered(void *self_v, const KX_PYATTRIBUTE_D return PyLong_FromSsize_t(retval); } -PyObject* SCA_ISensor::pyattr_get_positive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_ISensor::pyattr_get_positive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_ISensor* self= static_cast<SCA_ISensor*>(self_v); return PyLong_FromSsize_t(self->GetState()); } -PyObject* SCA_ISensor::pyattr_get_status(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_ISensor::pyattr_get_status(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_ISensor* self= static_cast<SCA_ISensor*>(self_v); int status = 0; @@ -417,13 +417,13 @@ PyObject* SCA_ISensor::pyattr_get_status(void *self_v, const KX_PYATTRIBUTE_DEF return PyLong_FromSsize_t(status); } -PyObject* SCA_ISensor::pyattr_get_posTicks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_ISensor::pyattr_get_posTicks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_ISensor* self= static_cast<SCA_ISensor*>(self_v); return PyLong_FromLong(self->GetPosTicks()); } -PyObject* SCA_ISensor::pyattr_get_negTicks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_ISensor::pyattr_get_negTicks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_ISensor* self= static_cast<SCA_ISensor*>(self_v); return PyLong_FromLong(self->GetNegTicks()); diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index 2c6beb79fd3..7e9a4bc903c 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -60,7 +60,7 @@ SCA_JoystickSensor::SCA_JoystickSensor(class SCA_JoystickManager* eventmgr, m_joymode(joymode), m_joyindex(joyindex), m_bAllEvents(allevents) -{ +{ /* std::cout << " axis " << m_axis << std::endl; std::cout << " axis flag " << m_axisf << std::endl; @@ -308,7 +308,7 @@ PyAttributeDef SCA_JoystickSensor::Attributes[] = { const char SCA_JoystickSensor::GetButtonActiveList_doc[] = "getButtonActiveList\n" "\tReturns a list containing the indices of the button currently pressed.\n"; -PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) +PyObject *SCA_JoystickSensor::PyGetButtonActiveList( ) { SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex); PyObject *ls = PyList_New(0); @@ -331,7 +331,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) 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* args ) +PyObject *SCA_JoystickSensor::PyGetButtonStatus( PyObject *args ) { SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex); int index; @@ -345,7 +345,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) return PyBool_FromLong(0); } -PyObject* SCA_JoystickSensor::pyattr_get_axis_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_JoystickSensor::pyattr_get_axis_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v); SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); @@ -360,7 +360,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_axis_values(void *self_v, const KX_PYAT return list; } -PyObject* SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v); SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); @@ -373,7 +373,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYAT return PyLong_FromSsize_t(joy->GetAxisPosition(self->m_axis-1)); } -PyObject* SCA_JoystickSensor::pyattr_get_hat_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_JoystickSensor::pyattr_get_hat_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v); SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); @@ -388,7 +388,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_hat_values(void *self_v, const KX_PYATT return list; } -PyObject* SCA_JoystickSensor::pyattr_get_hat_single(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +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 = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); @@ -396,28 +396,28 @@ PyObject* SCA_JoystickSensor::pyattr_get_hat_single(void *self_v, const KX_PYATT 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) +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 = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); return PyLong_FromSsize_t( joy ? joy->GetNumberOfAxes() : 0 ); } -PyObject* SCA_JoystickSensor::pyattr_get_num_buttons(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +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 = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); return PyLong_FromSsize_t( joy ? joy->GetNumberOfButtons() : 0 ); } -PyObject* SCA_JoystickSensor::pyattr_get_num_hats(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +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 = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); return PyLong_FromSsize_t( joy ? joy->GetNumberOfHats() : 0 ); } -PyObject* SCA_JoystickSensor::pyattr_get_connected(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_JoystickSensor::pyattr_get_connected(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v); SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex); diff --git a/source/gameengine/GameLogic/SCA_KeyboardManager.h b/source/gameengine/GameLogic/SCA_KeyboardManager.h index 2d9ad45833f..fd3c0706fa7 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardManager.h +++ b/source/gameengine/GameLogic/SCA_KeyboardManager.h @@ -54,7 +54,7 @@ public: bool IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode); - virtual void NextFrame(); + virtual void NextFrame(); SCA_IInputDevice* GetInputDevice(); diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index 5208252ceae..9a2dd9bdd57 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -351,12 +351,12 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex) CStringValue * newstringprop = new CStringValue(newprop, m_targetprop); GetParent()->SetProperty(m_targetprop, newstringprop); newstringprop->Release(); - } + } } else { /* append */ char pchar = ToCharacter(keyIndex, IsShifted()); STR_String newprop = tprop->GetText() + pchar; - CStringValue * newstringprop = new CStringValue(newprop, m_targetprop); + CStringValue * newstringprop = new CStringValue(newprop, m_targetprop); GetParent()->SetProperty(m_targetprop, newstringprop); newstringprop->Release(); } @@ -365,7 +365,7 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex) /* Make a new property. Deletes can be ignored. */ char pchar = ToCharacter(keyIndex, IsShifted()); STR_String newprop = pchar; - CStringValue * newstringprop = new CStringValue(newprop, m_targetprop); + CStringValue * newstringprop = new CStringValue(newprop, m_targetprop); GetParent()->SetProperty(m_targetprop, newstringprop); newstringprop->Release(); } @@ -376,7 +376,7 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex) /** * Tests whether shift is pressed - */ + */ bool SCA_KeyboardSensor::IsShifted(void) { SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)m_eventmgr)->GetInputDevice(); @@ -391,9 +391,10 @@ bool SCA_KeyboardSensor::IsShifted(void) == SCA_InputEvent::KX_JUSTACTIVATED) ) { return true; - } else { + } + else { return false; - } + } } void SCA_KeyboardSensor::LogKeystrokes(void) @@ -494,25 +495,25 @@ PyAttributeDef SCA_KeyboardSensor::Attributes[] = { }; -PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_KeyboardSensor* self= static_cast<SCA_KeyboardSensor*>(self_v); SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)self->m_eventmgr)->GetInputDevice(); - PyObject* resultlist = PyList_New(0); + PyObject *resultlist = PyList_New(0); for (int i=SCA_IInputDevice::KX_BEGINKEY ; i<= SCA_IInputDevice::KX_ENDKEY;i++) { const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) i); if (inevent.m_status != SCA_InputEvent::KX_NO_INPUTSTATUS) { - PyObject* keypair = PyList_New(2); + PyObject *keypair = PyList_New(2); PyList_SET_ITEM(keypair,0,PyLong_FromSsize_t(i)); PyList_SET_ITEM(keypair,1,PyLong_FromSsize_t(inevent.m_status)); PyList_Append(resultlist,keypair); } - } + } return resultlist; } @@ -655,7 +656,7 @@ bool IsPrintable(int keyIndex) /** * Tests whether this is a delete key. - */ + */ bool IsDelete(int keyIndex) { if ( (keyIndex == SCA_IInputDevice::KX_DELKEY) diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h index c059aba305b..caa141e48f2 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h @@ -134,7 +134,7 @@ bool IsPrintable(int keyIndex); /** * Tests whether this is a delete key. - */ + */ bool IsDelete(int keyIndex); diff --git a/source/gameengine/GameLogic/SCA_MouseManager.h b/source/gameengine/GameLogic/SCA_MouseManager.h index 60edb2816cb..02c28807566 100644 --- a/source/gameengine/GameLogic/SCA_MouseManager.h +++ b/source/gameengine/GameLogic/SCA_MouseManager.h @@ -63,7 +63,7 @@ public: * mouse related events. Can also flag mouse movement. */ bool IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode); - virtual void NextFrame(); + virtual void NextFrame(); SCA_IInputDevice* GetInputDevice(); diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp index f4ee54c56a6..51e0bc6550b 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp +++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp @@ -156,7 +156,7 @@ bool SCA_MouseSensor::Evaluate() case KX_MOUSESENSORMODE_WHEELDOWN: { const SCA_InputEvent& mevent = mousedev->GetEventValue(m_hotkey); - switch (mevent.m_status) { + switch (mevent.m_status) { case SCA_InputEvent::KX_JUSTACTIVATED: m_val = 1; result = true; @@ -189,15 +189,15 @@ bool SCA_MouseSensor::Evaluate() const SCA_InputEvent& eventY = mousedev->GetEventValue(SCA_IInputDevice::KX_MOUSEY); if (eventX.m_status == SCA_InputEvent::KX_JUSTACTIVATED || - eventY.m_status == SCA_InputEvent::KX_JUSTACTIVATED || - eventX.m_status == SCA_InputEvent::KX_ACTIVE || - eventY.m_status == SCA_InputEvent::KX_ACTIVE) + eventY.m_status == SCA_InputEvent::KX_JUSTACTIVATED || + eventX.m_status == SCA_InputEvent::KX_ACTIVE || + eventY.m_status == SCA_InputEvent::KX_ACTIVE) { m_val = 1; result = true; } else if (eventX.m_status == SCA_InputEvent::KX_JUSTRELEASED || - eventY.m_status == SCA_InputEvent::KX_JUSTRELEASED ) + eventY.m_status == SCA_InputEvent::KX_JUSTRELEASED ) { m_val = 0; result = true; diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp index 31f988fe4b9..0eab6187d07 100644 --- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp +++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp @@ -173,7 +173,7 @@ isValid( SCA_PropertyActuator::KX_ACT_PROP_MODE mode ) { - bool res = false; + bool res = false; res = ((mode > KX_ACT_PROP_NODEF) && (mode < KX_ACT_PROP_MAX)); return res; } diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index ab7f57a5454..7dbbbb2a0d9 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -179,7 +179,7 @@ int SCA_PythonController::IsTriggered(class SCA_ISensor* sensor) #ifdef WITH_PYTHON /* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */ -PyObject* SCA_PythonController::sPyGetCurrentController(PyObject *self) +PyObject *SCA_PythonController::sPyGetCurrentController(PyObject *self) { if (m_sCurrentController==NULL) { @@ -271,7 +271,7 @@ void SCA_PythonController::ErrorPrint(const char *error_msg) } bool SCA_PythonController::Compile() -{ +{ //printf("py script modified '%s'\n", m_scriptName.Ptr()); m_bModified= false; @@ -374,7 +374,7 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr) m_sCurrentLogicManager = logicmgr; PyObject *excdict= NULL; - PyObject* resultobj= NULL; + PyObject *resultobj= NULL; switch(m_mode) { case SCA_PYEXEC_SCRIPT: @@ -447,13 +447,13 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr) // This doesn't appear to be needed anymore //PyDict_Clear(excdict); Py_DECREF(excdict); - } + } m_triggeredSensors.clear(); m_sCurrentController = NULL; } -PyObject* SCA_PythonController::PyActivate(PyObject *value) +PyObject *SCA_PythonController::PyActivate(PyObject *value) { if (m_sCurrentController != this) { PyErr_SetString(PyExc_SystemError, "Cannot add an actuator from a non-active controller"); @@ -468,7 +468,7 @@ PyObject* SCA_PythonController::PyActivate(PyObject *value) Py_RETURN_NONE; } -PyObject* SCA_PythonController::PyDeActivate(PyObject *value) +PyObject *SCA_PythonController::PyDeActivate(PyObject *value) { if (m_sCurrentController != this) { PyErr_SetString(PyExc_SystemError, "Cannot add an actuator from a non-active controller"); @@ -483,7 +483,7 @@ PyObject* SCA_PythonController::PyDeActivate(PyObject *value) Py_RETURN_NONE; } -PyObject* SCA_PythonController::pyattr_get_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_PythonController::pyattr_get_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { //SCA_PythonController* self= static_cast<SCA_PythonController*>(static_cast<SCA_IController*>(static_cast<SCA_ILogicBrick*>(static_cast<CValue*>(static_cast<PyObjectPlus*>(self_v))))); // static_cast<void *>(dynamic_cast<Derived *>(obj)) - static_cast<void *>(obj) diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h index ccdb82aa722..8a72ce6bad9 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.h +++ b/source/gameengine/GameLogic/SCA_PythonController.h @@ -74,7 +74,7 @@ class SCA_PythonController : public SCA_IController //for debugging //virtual CValue* AddRef(); - //virtual int Release(); // Release a reference to this value (when reference count reaches 0, the value is removed from the heap) + //virtual int Release(); // Release a reference to this value (when reference count reaches 0, the value is removed from the heap) SCA_PythonController(SCA_IObject* gameobj, int mode); virtual ~SCA_PythonController(); @@ -96,11 +96,11 @@ class SCA_PythonController : public SCA_IController void ErrorPrint(const char *error_msg); #ifdef WITH_PYTHON - static const char* sPyGetCurrentController__doc__; - static PyObject* sPyGetCurrentController(PyObject* self); - static const char* sPyAddActiveActuator__doc__; - static PyObject* sPyAddActiveActuator(PyObject* self, - PyObject* args); + static const char *sPyGetCurrentController__doc__; + static PyObject *sPyGetCurrentController(PyObject *self); + static const char *sPyAddActiveActuator__doc__; + static PyObject *sPyAddActiveActuator(PyObject *self, + PyObject *args); static SCA_IActuator* LinkedActuatorFromPy(PyObject *value); diff --git a/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp b/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp index f83b23f510c..42cda9433b8 100644 --- a/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp +++ b/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp @@ -58,13 +58,13 @@ SCA_PythonKeyboard::~SCA_PythonKeyboard() /* ------------------------------------------------------------------------- */ /* clipboard */ -static PyObject* gPyGetClipboard(PyObject* args, PyObject* kwds) +static PyObject *gPyGetClipboard(PyObject *args, PyObject *kwds) { char *buf = (char *)GHOST_getClipboard(0); return PyUnicode_FromString(buf?buf:""); } -static PyObject* gPySetClipboard(PyObject* args, PyObject* value) +static PyObject *gPySetClipboard(PyObject *args, PyObject *value) { char* buf; if (!PyArg_ParseTuple(value,"s:setClipboard",&buf)) @@ -109,7 +109,7 @@ PyAttributeDef SCA_PythonKeyboard::Attributes[] = { { NULL } //Sentinel }; -PyObject* SCA_PythonKeyboard::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_PythonKeyboard::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_PythonKeyboard* self = static_cast<SCA_PythonKeyboard*>(self_v); @@ -123,7 +123,7 @@ PyObject* SCA_PythonKeyboard::pyattr_get_events(void *self_v, const KX_PYATTRIBU return self->m_event_dict; } -PyObject* SCA_PythonKeyboard::pyattr_get_active_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_PythonKeyboard::pyattr_get_active_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_PythonKeyboard* self = static_cast<SCA_PythonKeyboard*>(self_v); diff --git a/source/gameengine/GameLogic/SCA_PythonKeyboard.h b/source/gameengine/GameLogic/SCA_PythonKeyboard.h index df5e46f8c28..aab49bcb83b 100644 --- a/source/gameengine/GameLogic/SCA_PythonKeyboard.h +++ b/source/gameengine/GameLogic/SCA_PythonKeyboard.h @@ -35,7 +35,7 @@ class SCA_PythonKeyboard : public PyObjectPlus private: class SCA_IInputDevice *m_keyboard; #ifdef WITH_PYTHON - PyObject* m_event_dict; + PyObject *m_event_dict; #endif public: SCA_PythonKeyboard(class SCA_IInputDevice* keyboard); diff --git a/source/gameengine/GameLogic/SCA_PythonMouse.cpp b/source/gameengine/GameLogic/SCA_PythonMouse.cpp index cdbeaba2235..0806bda072b 100644 --- a/source/gameengine/GameLogic/SCA_PythonMouse.cpp +++ b/source/gameengine/GameLogic/SCA_PythonMouse.cpp @@ -90,9 +90,9 @@ PyAttributeDef SCA_PythonMouse::Attributes[] = { KX_PYATTRIBUTE_RW_FUNCTION("position", SCA_PythonMouse, pyattr_get_position, pyattr_set_position), KX_PYATTRIBUTE_RW_FUNCTION("visible", SCA_PythonMouse, pyattr_get_visible, pyattr_set_visible), { NULL } //Sentinel -}; +}; -PyObject* SCA_PythonMouse::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_PythonMouse::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_PythonMouse* self = static_cast<SCA_PythonMouse*>(self_v); @@ -106,7 +106,7 @@ PyObject* SCA_PythonMouse::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_ return self->m_event_dict; } -PyObject* SCA_PythonMouse::pyattr_get_active_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_PythonMouse::pyattr_get_active_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_PythonMouse* self = static_cast<SCA_PythonMouse*>(self_v); @@ -123,7 +123,7 @@ PyObject* SCA_PythonMouse::pyattr_get_active_events(void *self_v, const KX_PYATT return self->m_event_dict; } -PyObject* SCA_PythonMouse::pyattr_get_position(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_PythonMouse::pyattr_get_position(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_PythonMouse* self = static_cast<SCA_PythonMouse*>(self_v); const SCA_InputEvent & xevent = self->m_mouse->GetEventValue(SCA_IInputDevice::KX_MOUSEX); @@ -134,7 +134,7 @@ PyObject* SCA_PythonMouse::pyattr_get_position(void *self_v, const KX_PYATTRIBUT x_coord = self->m_canvas->GetMouseNormalizedX(xevent.m_eventval); y_coord = self->m_canvas->GetMouseNormalizedY(yevent.m_eventval); - PyObject* ret = PyTuple_New(2); + PyObject *ret = PyTuple_New(2); PyTuple_SET_ITEM(ret, 0, PyFloat_FromDouble(x_coord)); PyTuple_SET_ITEM(ret, 1, PyFloat_FromDouble(y_coord)); @@ -158,7 +158,7 @@ int SCA_PythonMouse::pyattr_set_position(void *self_v, const KX_PYATTRIBUTE_DEF return PY_SET_ATTR_SUCCESS; } -PyObject* SCA_PythonMouse::pyattr_get_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_PythonMouse::pyattr_get_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_PythonMouse* self = static_cast<SCA_PythonMouse*>(self_v); diff --git a/source/gameengine/GameLogic/SCA_PythonMouse.h b/source/gameengine/GameLogic/SCA_PythonMouse.h index 1313d55005f..f770a54d6e6 100644 --- a/source/gameengine/GameLogic/SCA_PythonMouse.h +++ b/source/gameengine/GameLogic/SCA_PythonMouse.h @@ -36,7 +36,7 @@ private: class SCA_IInputDevice *m_mouse; class RAS_ICanvas *m_canvas; #ifdef WITH_PYTHON - PyObject* m_event_dict; + PyObject *m_event_dict; #endif public: SCA_PythonMouse(class SCA_IInputDevice* mouse, class RAS_ICanvas* canvas); @@ -47,12 +47,12 @@ public: #ifdef WITH_PYTHON KX_PYMETHOD_DOC(SCA_PythonMouse, show); - static PyObject* pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); - static PyObject* pyattr_get_active_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); - static PyObject* pyattr_get_position(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); - static int pyattr_set_position(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject* value); - static PyObject* pyattr_get_visible(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); - static int pyattr_set_visible(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject* value); + static PyObject *pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject *pyattr_get_active_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject *pyattr_get_position(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static int pyattr_set_position(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); + static PyObject *pyattr_get_visible(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static int pyattr_set_visible(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); #endif }; diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp index c727eebd015..9a54c76ed4e 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp +++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp @@ -161,7 +161,7 @@ bool SCA_RandomActuator::Update() while (b >= a) { b = b * m_base->DrawFloat(); res++; - }; + }; tmpval = new CIntValue(res); } break; @@ -361,9 +361,9 @@ PyAttributeDef SCA_RandomActuator::Attributes[] = { KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,MAX_PROP_NAME,false,SCA_RandomActuator,m_propname,CheckProperty), KX_PYATTRIBUTE_RW_FUNCTION("seed",SCA_RandomActuator,pyattr_get_seed,pyattr_set_seed), { NULL } //Sentinel -}; +}; -PyObject* SCA_RandomActuator::pyattr_get_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_RandomActuator::pyattr_get_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef) { SCA_RandomActuator* act = static_cast<SCA_RandomActuator*>(self); return PyLong_FromSsize_t(act->m_base->GetSeed()); @@ -420,7 +420,7 @@ KX_PYMETHODDEF_DOC_VARARGS(SCA_RandomActuator, setBoolBernouilli, } m_distribution = KX_RANDOMACT_BOOL_BERNOUILLI; - m_parameter1 = paraArg; + m_parameter1 = paraArg; enforceConstraints(); Py_RETURN_NONE; } @@ -473,7 +473,7 @@ KX_PYMETHODDEF_DOC_VARARGS(SCA_RandomActuator, setIntPoisson, } m_distribution = KX_RANDOMACT_INT_POISSON; - m_parameter1 = paraArg; + m_parameter1 = paraArg; enforceConstraints(); Py_RETURN_NONE; } @@ -489,7 +489,7 @@ KX_PYMETHODDEF_DOC_VARARGS(SCA_RandomActuator, setFloatConst, } m_distribution = KX_RANDOMACT_FLOAT_CONST; - m_parameter1 = paraArg; + m_parameter1 = paraArg; enforceConstraints(); Py_RETURN_NONE; } @@ -544,7 +544,7 @@ KX_PYMETHODDEF_DOC_VARARGS(SCA_RandomActuator, setFloatNegativeExponential, } m_distribution = KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL; - m_parameter1 = paraArg; + m_parameter1 = paraArg; enforceConstraints(); Py_RETURN_NONE; } diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.h b/source/gameengine/GameLogic/SCA_RandomActuator.h index 522663651e0..f61de24c0cc 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.h +++ b/source/gameengine/GameLogic/SCA_RandomActuator.h @@ -67,10 +67,10 @@ class SCA_RandomActuator : public SCA_IActuator KX_RANDOMACT_NODEF, KX_RANDOMACT_BOOL_CONST, KX_RANDOMACT_BOOL_UNIFORM, - KX_RANDOMACT_BOOL_BERNOUILLI, + KX_RANDOMACT_BOOL_BERNOUILLI, KX_RANDOMACT_INT_CONST, KX_RANDOMACT_INT_UNIFORM, - KX_RANDOMACT_INT_POISSON, + KX_RANDOMACT_INT_POISSON, KX_RANDOMACT_FLOAT_CONST, KX_RANDOMACT_FLOAT_UNIFORM, KX_RANDOMACT_FLOAT_NORMAL, @@ -98,7 +98,7 @@ class SCA_RandomActuator : public SCA_IActuator /* Python interface ---------------------------------------------------- */ /* --------------------------------------------------------------------- */ - static PyObject* pyattr_get_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); + static PyObject *pyattr_get_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setBoolConst); diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp index 3b37507dcf3..17784755421 100644 --- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp +++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp @@ -165,7 +165,7 @@ PyAttributeDef SCA_RandomSensor::Attributes[] = { {NULL} //Sentinel }; -PyObject* SCA_RandomSensor::pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *SCA_RandomSensor::pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { SCA_RandomSensor* self= static_cast<SCA_RandomSensor*>(self_v); return PyLong_FromSsize_t(self->m_basegenerator->GetSeed()); diff --git a/source/gameengine/GameLogic/SCA_TimeEventManager.cpp b/source/gameengine/GameLogic/SCA_TimeEventManager.cpp index e28f00abba2..e8a6289a98e 100644 --- a/source/gameengine/GameLogic/SCA_TimeEventManager.cpp +++ b/source/gameengine/GameLogic/SCA_TimeEventManager.cpp @@ -54,7 +54,7 @@ SCA_TimeEventManager::~SCA_TimeEventManager() !(it == m_timevalues.end()); ++it) { (*it)->Release(); - } + } } |