Adjusted PySFML to work with the current SFML2 branch.
Note that it's just compatible. A lot of the new functionality is still in the pipeline. git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1308 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
fb7470cbc3
commit
839c80556d
29 changed files with 544 additions and 354 deletions
|
@ -58,19 +58,19 @@ PySfListener_GetPosition(PySfListener *self)
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
PySfListener_SetTarget(PySfListener* self, PyObject *args)
|
||||
PySfListener_SetDirection(PySfListener* self, PyObject *args)
|
||||
{
|
||||
float X, Y, Z;
|
||||
if (!PyArg_ParseTuple(args, "fff:Listener.SetTarget", &X, &Y, &Z))
|
||||
if (!PyArg_ParseTuple(args, "fff:Listener.SetDirection", &X, &Y, &Z))
|
||||
return NULL;
|
||||
sf::Listener::SetTarget(X, Y, Z);
|
||||
sf::Listener::SetDirection(X, Y, Z);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
PySfListener_GetTarget(PySfListener *self)
|
||||
PySfListener_GetDirection(PySfListener *self)
|
||||
{
|
||||
sf::Vector3f Vect = sf::Listener::GetTarget();
|
||||
sf::Vector3f Vect = sf::Listener::GetDirection();
|
||||
return Py_BuildValue("fff", Vect.x, Vect.y, Vect.z);
|
||||
}
|
||||
|
||||
|
@ -79,8 +79,8 @@ static PyMethodDef PySfListener_methods[] = {
|
|||
{"GetGlobalVolume", (PyCFunction)PySfListener_GetGlobalVolume, METH_STATIC | METH_NOARGS, "GetGlobalVolume()\nGet the current value of the global volume of all the sounds."},
|
||||
{"SetPosition", (PyCFunction)PySfListener_SetPosition, METH_STATIC | METH_VARARGS, "SetPosition(X, Y, Z)\nChange the position of the listener."},
|
||||
{"GetPosition", (PyCFunction)PySfListener_GetPosition, METH_STATIC | METH_NOARGS, "GetPosition()\nGet the current position of the listener."},
|
||||
{"SetTarget", (PyCFunction)PySfListener_SetTarget, METH_STATIC | METH_VARARGS, "SetTarget(X, Y, Z)\nChange the orientation of the listener (the point he must look at)"},
|
||||
{"GetTarget", (PyCFunction)PySfListener_GetTarget, METH_STATIC | METH_NOARGS, "GetTarget()\nGet the current orientation of the listener (the point he's looking at)"},
|
||||
{"SetDirection", (PyCFunction)PySfListener_SetDirection, METH_STATIC | METH_VARARGS, "SetDirection(X, Y, Z)\nChange the orientation of the listener (the point he must look at)"},
|
||||
{"GetDirection", (PyCFunction)PySfListener_GetDirection, METH_STATIC | METH_NOARGS, "GetDirection()\nGet the current orientation of the listener (the point he's looking at)"},
|
||||
{NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue