Skip to content

Commit

Permalink
UPBGE: Replace KX_SCA_ prefix by KX_.
Browse files Browse the repository at this point in the history
  • Loading branch information
panzergame committed Oct 17, 2017
1 parent fd26767 commit b0272cb
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 142 deletions.
18 changes: 9 additions & 9 deletions source/gameengine/Converter/BL_ConvertActuators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
#include "KX_GameActuator.h"
#include "KX_StateActuator.h"
#include "KX_VisibilityActuator.h"
#include "KX_SCA_AddObjectActuator.h"
#include "KX_SCA_EndObjectActuator.h"
#include "KX_SCA_ReplaceMeshActuator.h"
#include "KX_AddObjectActuator.h"
#include "KX_EndObjectActuator.h"
#include "KX_ReplaceMeshActuator.h"
#include "KX_ParentActuator.h"
#include "KX_SCA_DynamicActuator.h"
#include "KX_DynamicActuator.h"
#include "KX_SteeringActuator.h"
#include "KX_MouseActuator.h"

Expand Down Expand Up @@ -439,7 +439,7 @@ void BL_ConvertActuators(const char* maggiename,
}
}

KX_SCA_AddObjectActuator* tmpaddact = new KX_SCA_AddObjectActuator(
KX_AddObjectActuator* tmpaddact = new KX_AddObjectActuator(
gameobj,
originalval,
editobact->time,
Expand All @@ -455,8 +455,8 @@ void BL_ConvertActuators(const char* maggiename,
break;
case ACT_EDOB_END_OBJECT:
{
KX_SCA_EndObjectActuator* tmpendact
= new KX_SCA_EndObjectActuator(gameobj,scene);
KX_EndObjectActuator* tmpendact
= new KX_EndObjectActuator(gameobj,scene);
baseact = tmpendact;
}
break;
Expand All @@ -469,7 +469,7 @@ void BL_ConvertActuators(const char* maggiename,
<< "\" uses a mesh not owned by an object in scene \"" << scene->GetName() << "\".");
}

KX_SCA_ReplaceMeshActuator* tmpreplaceact = new KX_SCA_ReplaceMeshActuator(
KX_ReplaceMeshActuator* tmpreplaceact = new KX_ReplaceMeshActuator(
gameobj,
tmpmesh,
scene,
Expand Down Expand Up @@ -497,7 +497,7 @@ void BL_ConvertActuators(const char* maggiename,
}
case ACT_EDOB_DYNAMICS:
{
KX_SCA_DynamicActuator* tmpdynact = new KX_SCA_DynamicActuator(
KX_DynamicActuator* tmpdynact = new KX_DynamicActuator(
gameobj,
editobact->dyn_operation,
editobact->mass);
Expand Down
16 changes: 8 additions & 8 deletions source/gameengine/Ketsji/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ set(SRC
KX_RadarSensor.cpp
KX_RayCast.cpp
KX_RaySensor.cpp
KX_SCA_AddObjectActuator.cpp
KX_SCA_DynamicActuator.cpp
KX_SCA_EndObjectActuator.cpp
KX_SCA_ReplaceMeshActuator.cpp
KX_AddObjectActuator.cpp
KX_DynamicActuator.cpp
KX_EndObjectActuator.cpp
KX_ReplaceMeshActuator.cpp
KX_BoneParentNodeRelationship.cpp
KX_NodeRelationships.cpp
KX_ScalarInterpolator.cpp
Expand Down Expand Up @@ -217,10 +217,10 @@ set(SRC
KX_RadarSensor.h
KX_RayCast.h
KX_RaySensor.h
KX_SCA_AddObjectActuator.h
KX_SCA_DynamicActuator.h
KX_SCA_EndObjectActuator.h
KX_SCA_ReplaceMeshActuator.h
KX_AddObjectActuator.h
KX_DynamicActuator.h
KX_EndObjectActuator.h
KX_ReplaceMeshActuator.h
KX_BoneParentNodeRelationship.h
KX_NodeRelationships.h
KX_ScalarInterpolator.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/

/** \file gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
/** \file gameengine/Ketsji/KX_AddObjectActuator.cpp
* \ingroup ketsji
*
* Add an object when this actuator is triggered
Expand All @@ -35,15 +35,15 @@
* \source\gameengine\GameLogic\SCA_AddObjectActuator.cpp
* Please look here for revision history. */

#include "KX_SCA_AddObjectActuator.h"
#include "KX_AddObjectActuator.h"
#include "KX_Scene.h"
#include "KX_GameObject.h"

/* ------------------------------------------------------------------------- */
/* Native functions */
/* ------------------------------------------------------------------------- */

KX_SCA_AddObjectActuator::KX_SCA_AddObjectActuator(KX_GameObject *gameobj,
KX_AddObjectActuator::KX_AddObjectActuator(KX_GameObject *gameobj,
KX_GameObject *original,
float time,
KX_Scene *scene,
Expand Down Expand Up @@ -75,7 +75,7 @@ KX_SCA_AddObjectActuator::KX_SCA_AddObjectActuator(KX_GameObject *gameobj,



KX_SCA_AddObjectActuator::~KX_SCA_AddObjectActuator()
KX_AddObjectActuator::~KX_AddObjectActuator()
{
if (m_OriginalObject)
m_OriginalObject->UnregisterActuator(this);
Expand All @@ -85,7 +85,7 @@ KX_SCA_AddObjectActuator::~KX_SCA_AddObjectActuator()



bool KX_SCA_AddObjectActuator::Update()
bool KX_AddObjectActuator::Update()
{
//bool result = false; /*unused*/
bool bNegativeEvent = IsNegativeEvent();
Expand All @@ -102,16 +102,16 @@ bool KX_SCA_AddObjectActuator::Update()



KX_GameObject *KX_SCA_AddObjectActuator::GetLastCreatedObject() const
KX_GameObject *KX_AddObjectActuator::GetLastCreatedObject() const
{
return m_lastCreatedObject;
}



EXP_Value* KX_SCA_AddObjectActuator::GetReplica()
EXP_Value* KX_AddObjectActuator::GetReplica()
{
KX_SCA_AddObjectActuator* replica = new KX_SCA_AddObjectActuator(*this);
KX_AddObjectActuator* replica = new KX_AddObjectActuator(*this);

if (replica == nullptr)
return nullptr;
Expand All @@ -122,20 +122,20 @@ EXP_Value* KX_SCA_AddObjectActuator::GetReplica()
return replica;
}

void KX_SCA_AddObjectActuator::ProcessReplica()
void KX_AddObjectActuator::ProcessReplica()
{
if (m_OriginalObject)
m_OriginalObject->RegisterActuator(this);
m_lastCreatedObject=nullptr;
SCA_IActuator::ProcessReplica();
}

void KX_SCA_AddObjectActuator::Replace_IScene(SCA_IScene *val)
void KX_AddObjectActuator::Replace_IScene(SCA_IScene *val)
{
m_scene = static_cast<KX_Scene *>(val);
}

bool KX_SCA_AddObjectActuator::UnlinkObject(SCA_IObject* clientobj)
bool KX_AddObjectActuator::UnlinkObject(SCA_IObject* clientobj)
{
if (clientobj == m_OriginalObject)
{
Expand All @@ -152,7 +152,7 @@ bool KX_SCA_AddObjectActuator::UnlinkObject(SCA_IObject* clientobj)
return false;
}

void KX_SCA_AddObjectActuator::Relink(std::map<SCA_IObject *, SCA_IObject *>& obj_map)
void KX_AddObjectActuator::Relink(std::map<SCA_IObject *, SCA_IObject *>& obj_map)
{
SCA_IObject *obj = obj_map[m_OriginalObject];
if (obj) {
Expand All @@ -170,9 +170,9 @@ void KX_SCA_AddObjectActuator::Relink(std::map<SCA_IObject *, SCA_IObject *>& ob
/* ------------------------------------------------------------------------- */

/* Integration hooks ------------------------------------------------------- */
PyTypeObject KX_SCA_AddObjectActuator::Type = {
PyTypeObject KX_AddObjectActuator::Type = {
PyVarObject_HEAD_INIT(nullptr, 0)
"KX_SCA_AddObjectActuator",
"KX_AddObjectActuator",
sizeof(EXP_PyObjectPlus_Proxy),
0,
py_base_dealloc,
Expand All @@ -192,35 +192,35 @@ PyTypeObject KX_SCA_AddObjectActuator::Type = {
py_base_new
};

PyMethodDef KX_SCA_AddObjectActuator::Methods[] = {
{"instantAddObject", (PyCFunction) KX_SCA_AddObjectActuator::sPyInstantAddObject, METH_NOARGS, nullptr},
PyMethodDef KX_AddObjectActuator::Methods[] = {
{"instantAddObject", (PyCFunction) KX_AddObjectActuator::sPyInstantAddObject, METH_NOARGS, nullptr},
{nullptr,nullptr} //Sentinel
};

PyAttributeDef KX_SCA_AddObjectActuator::Attributes[] = {
EXP_PYATTRIBUTE_RW_FUNCTION("object",KX_SCA_AddObjectActuator,pyattr_get_object,pyattr_set_object),
EXP_PYATTRIBUTE_RO_FUNCTION("objectLastCreated",KX_SCA_AddObjectActuator,pyattr_get_objectLastCreated),
EXP_PYATTRIBUTE_FLOAT_RW("time", 0.0f, FLT_MAX, KX_SCA_AddObjectActuator, m_timeProp),
EXP_PYATTRIBUTE_FLOAT_ARRAY_RW("linearVelocity",-FLT_MAX,FLT_MAX,KX_SCA_AddObjectActuator,m_linear_velocity,3),
EXP_PYATTRIBUTE_FLOAT_ARRAY_RW("angularVelocity",-FLT_MAX,FLT_MAX,KX_SCA_AddObjectActuator,m_angular_velocity,3),
PyAttributeDef KX_AddObjectActuator::Attributes[] = {
EXP_PYATTRIBUTE_RW_FUNCTION("object",KX_AddObjectActuator,pyattr_get_object,pyattr_set_object),
EXP_PYATTRIBUTE_RO_FUNCTION("objectLastCreated",KX_AddObjectActuator,pyattr_get_objectLastCreated),
EXP_PYATTRIBUTE_FLOAT_RW("time", 0.0f, FLT_MAX, KX_AddObjectActuator, m_timeProp),
EXP_PYATTRIBUTE_FLOAT_ARRAY_RW("linearVelocity",-FLT_MAX,FLT_MAX,KX_AddObjectActuator,m_linear_velocity,3),
EXP_PYATTRIBUTE_FLOAT_ARRAY_RW("angularVelocity",-FLT_MAX,FLT_MAX,KX_AddObjectActuator,m_angular_velocity,3),
EXP_PYATTRIBUTE_NULL //Sentinel
};

PyObject *KX_SCA_AddObjectActuator::pyattr_get_object(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef)
PyObject *KX_AddObjectActuator::pyattr_get_object(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef)
{
KX_SCA_AddObjectActuator* actuator = static_cast<KX_SCA_AddObjectActuator*>(self);
KX_AddObjectActuator* actuator = static_cast<KX_AddObjectActuator*>(self);
if (!actuator->m_OriginalObject)
Py_RETURN_NONE;
else
return actuator->m_OriginalObject->GetProxy();
}

int KX_SCA_AddObjectActuator::pyattr_set_object(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef, PyObject *value)
int KX_AddObjectActuator::pyattr_set_object(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
KX_SCA_AddObjectActuator* actuator = static_cast<KX_SCA_AddObjectActuator*>(self);
KX_AddObjectActuator* actuator = static_cast<KX_AddObjectActuator*>(self);
KX_GameObject *gameobj;

if (!ConvertPythonToGameObject(actuator->GetLogicManager(), value, &gameobj, true, "actuator.object = value: KX_SCA_AddObjectActuator"))
if (!ConvertPythonToGameObject(actuator->GetLogicManager(), value, &gameobj, true, "actuator.object = value: KX_AddObjectActuator"))
return PY_SET_ATTR_FAIL; // ConvertPythonToGameObject sets the error

if (actuator->m_OriginalObject != nullptr)
Expand All @@ -234,16 +234,16 @@ int KX_SCA_AddObjectActuator::pyattr_set_object(EXP_PyObjectPlus *self, const st
return PY_SET_ATTR_SUCCESS;
}

PyObject *KX_SCA_AddObjectActuator::pyattr_get_objectLastCreated(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef)
PyObject *KX_AddObjectActuator::pyattr_get_objectLastCreated(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef)
{
KX_SCA_AddObjectActuator* actuator = static_cast<KX_SCA_AddObjectActuator*>(self);
KX_AddObjectActuator* actuator = static_cast<KX_AddObjectActuator*>(self);
if (!actuator->m_lastCreatedObject)
Py_RETURN_NONE;
else
return actuator->m_lastCreatedObject->GetProxy();
}

PyObject *KX_SCA_AddObjectActuator::PyInstantAddObject()
PyObject *KX_AddObjectActuator::PyInstantAddObject()
{
InstantAddObject();

Expand All @@ -252,7 +252,7 @@ PyObject *KX_SCA_AddObjectActuator::PyInstantAddObject()

#endif // WITH_PYTHON

void KX_SCA_AddObjectActuator::InstantAddObject()
void KX_AddObjectActuator::InstantAddObject()
{
if (m_OriginalObject)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
* ***** END GPL LICENSE BLOCK *****
*/

/** \file KX_SCA_AddObjectActuator.h
/** \file KX_AddObjectActuator.h
* \ingroup ketsji
* \attention Previously existed as: source/gameengine/GameLogic/SCA_AddObjectActuator.h
* Please look here for revision history.
*/

#ifndef __KX_SCA_ADDOBJECTACTUATOR_H__
#define __KX_SCA_ADDOBJECTACTUATOR_H__
#ifndef __KX_ADDOBJECTACTUATOR_H__
#define __KX_ADDOBJECTACTUATOR_H__

/* Actuator tree */
#include "SCA_IActuator.h"
Expand All @@ -43,7 +43,7 @@
class KX_Scene;
class KX_GameObject;

class KX_SCA_AddObjectActuator : public SCA_IActuator
class KX_AddObjectActuator : public SCA_IActuator
{
Py_Header

Expand Down Expand Up @@ -75,7 +75,7 @@ class KX_SCA_AddObjectActuator : public SCA_IActuator
* available. Use with care!
*/

KX_SCA_AddObjectActuator(
KX_AddObjectActuator(
KX_GameObject *gameobj,
KX_GameObject *original,
float time,
Expand All @@ -86,7 +86,7 @@ class KX_SCA_AddObjectActuator : public SCA_IActuator
bool angv_local
);

~KX_SCA_AddObjectActuator(void);
~KX_AddObjectActuator(void);

EXP_Value*
GetReplica(
Expand Down Expand Up @@ -114,14 +114,14 @@ class KX_SCA_AddObjectActuator : public SCA_IActuator

#ifdef WITH_PYTHON

EXP_PYMETHOD_DOC_NOARGS(KX_SCA_AddObjectActuator,InstantAddObject);
EXP_PYMETHOD_DOC_NOARGS(KX_AddObjectActuator,InstantAddObject);

static PyObject *pyattr_get_object(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject *pyattr_get_objectLastCreated(EXP_PyObjectPlus *self, const struct EXP_PYATTRIBUTE_DEF *attrdef);

#endif /* WITH_PYTHON */

}; /* end of class KX_SCA_AddObjectActuator : public KX_EditObjectActuator */
}; /* end of class KX_AddObjectActuator : public KX_EditObjectActuator */

#endif /* __KX_SCA_ADDOBJECTACTUATOR_H__ */
#endif /* __KX_ADDOBJECTACTUATOR_H__ */
Loading

0 comments on commit b0272cb

Please sign in to comment.