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/Ketsji/KX_CDActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_CDActuator.cpp47
1 files changed, 11 insertions, 36 deletions
diff --git a/source/gameengine/Ketsji/KX_CDActuator.cpp b/source/gameengine/Ketsji/KX_CDActuator.cpp
index 8511526fd5f..bfca81f45d9 100644
--- a/source/gameengine/Ketsji/KX_CDActuator.cpp
+++ b/source/gameengine/Ketsji/KX_CDActuator.cpp
@@ -48,9 +48,8 @@ KX_CDActuator::KX_CDActuator(SCA_IObject* gameobject,
KX_CDACT_TYPE type,
int track,
short start,
- short end,
- PyTypeObject* T)
- : SCA_IActuator(gameobject,T)
+ short end)
+ : SCA_IActuator(gameobject)
{
m_soundscene = soundscene;
m_type = type;
@@ -171,25 +170,17 @@ PyTypeObject KX_CDActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject KX_CDActuator::Parents[] = {
- &KX_CDActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_CDActuator::Methods[] = {
// Deprecated ----->
{"setGain",(PyCFunction) KX_CDActuator::sPySetGain,METH_VARARGS,NULL},
@@ -217,22 +208,6 @@ int KX_CDActuator::pyattr_setGain(void *self, const struct KX_PYATTRIBUTE_DEF *a
return PY_SET_ATTR_SUCCESS;
}
-PyObject* KX_CDActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_CDActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_CDActuator::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
-
-
KX_PYMETHODDEF_DOC_NOARGS(KX_CDActuator, startCD,
"startCD()\n"
"\tStarts the CD playing.\n")
@@ -273,8 +248,8 @@ KX_PYMETHODDEF_DOC_O(KX_CDActuator, playTrack,
"playTrack(trackNumber)\n"
"\tPlays the track selected.\n")
{
- if (PyInt_Check(value)) {
- int track = PyInt_AsLong(value);
+ if (PyLong_Check(value)) {
+ int track = PyLong_AsSsize_t(value);
SND_CDObject::Instance()->SetPlaymode(SND_CD_TRACK);
SND_CDObject::Instance()->SetTrack(track);
SND_CDObject::Instance()->SetPlaystate(SND_MUST_PLAY);