diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 04:22:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 04:22:55 +0400 |
commit | beac985ab7b8c1fb62e102dee74d68fa7f3c192d (patch) | |
tree | c930c02676d6c4064def616977363a7573c24670 /source/gameengine/VideoTexture | |
parent | 2d6839ce65589a91f183de1304bd900d2278c8b1 (diff) |
code cleanup: make local game engine functions static
Diffstat (limited to 'source/gameengine/VideoTexture')
-rw-r--r-- | source/gameengine/VideoTexture/ImageBase.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/ImageMix.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/ImageRender.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/Texture.cpp | 18 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/VideoFFmpeg.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/blendVideoTex.cpp | 2 |
6 files changed, 21 insertions, 21 deletions
diff --git a/source/gameengine/VideoTexture/ImageBase.cpp b/source/gameengine/VideoTexture/ImageBase.cpp index 54c1939ce6b..9333e0184ec 100644 --- a/source/gameengine/VideoTexture/ImageBase.cpp +++ b/source/gameengine/VideoTexture/ImageBase.cpp @@ -644,7 +644,7 @@ PyObject * Image_valid(PyImage * self, void * closure) } } -int Image_getbuffer(PyImage *self, Py_buffer *view, int flags) +static int Image_getbuffer(PyImage *self, Py_buffer *view, int flags) { unsigned int * image; int ret; @@ -691,7 +691,7 @@ error: } -void Image_releaseBuffer(PyImage *self, Py_buffer *buffer) +static void Image_releaseBuffer(PyImage *self, Py_buffer *buffer) { self->m_image->m_exports--; } diff --git a/source/gameengine/VideoTexture/ImageMix.cpp b/source/gameengine/VideoTexture/ImageMix.cpp index cd8c6683a7f..3907e6c6883 100644 --- a/source/gameengine/VideoTexture/ImageMix.cpp +++ b/source/gameengine/VideoTexture/ImageMix.cpp @@ -108,7 +108,7 @@ inline ImageMix * getImageMix (PyImage * self) // python methods // get source weight -PyObject * getWeight (PyImage * self, PyObject * args) +static PyObject *getWeight (PyImage * self, PyObject * args) { // weight short weight = 0; @@ -125,7 +125,7 @@ PyObject * getWeight (PyImage * self, PyObject * args) // set source weight -PyObject * setWeight (PyImage * self, PyObject * args) +static PyObject *setWeight (PyImage *self, PyObject *args) { // get arguments char * id; diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp index c8763671dd1..6d6cb770afa 100644 --- a/source/gameengine/VideoTexture/ImageRender.cpp +++ b/source/gameengine/VideoTexture/ImageRender.cpp @@ -333,7 +333,7 @@ static int ImageRender_init (PyObject * pySelf, PyObject * args, PyObject * kwds // get background color -PyObject * getBackground (PyImage * self, void * closure) +static PyObject *getBackground (PyImage *self, void *closure) { return Py_BuildValue("[BBBB]", getImageRender(self)->getBackground(0), @@ -510,7 +510,7 @@ static int ImageMirror_init (PyObject * pySelf, PyObject * args, PyObject * kwds } // get background color -PyObject * getClip (PyImage * self, void * closure) +static PyObject *getClip (PyImage *self, void *closure) { return PyFloat_FromDouble(getImageRender(self)->getClip()); } diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp index a21300018eb..a189f5f9aaf 100644 --- a/source/gameengine/VideoTexture/Texture.cpp +++ b/source/gameengine/VideoTexture/Texture.cpp @@ -108,7 +108,7 @@ RAS_IPolyMaterial * getMaterial (PyObject *obj, short matID) } // get pointer to a lamp -KX_LightObject * getLamp(PyObject *obj) +static KX_LightObject *getLamp(PyObject *obj) { // if object is available if (obj == NULL) return NULL; @@ -147,7 +147,7 @@ short getMaterialID(PyObject * obj, const char *name) // Texture object allocation -PyObject * Texture_new (PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *Texture_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { // allocate object Texture * self = reinterpret_cast<Texture*>(type->tp_alloc(type, 0)); @@ -172,7 +172,7 @@ int Texture_setSource (Texture * self, PyObject * value, void * closure); // Texture object deallocation -void Texture_dealloc (Texture * self) +static void Texture_dealloc(Texture *self) { // release renderer Py_XDECREF(self->m_source); @@ -190,7 +190,7 @@ ExceptionID MaterialNotAvail; ExpDesc MaterialNotAvailDesc (MaterialNotAvail, "Texture material is not available"); // Texture object initialization -int Texture_init (Texture *self, PyObject *args, PyObject *kwds) +static int Texture_init(Texture *self, PyObject *args, PyObject *kwds) { // parameters - game object with video texture PyObject * obj = NULL; @@ -298,7 +298,7 @@ PyObject * Texture_close(Texture * self) // refresh texture -PyObject * Texture_refresh (Texture * self, PyObject * args) +static PyObject *Texture_refresh(Texture *self, PyObject *args) { // get parameter - refresh source PyObject * param; @@ -390,14 +390,14 @@ PyObject * Texture_refresh (Texture * self, PyObject * args) } // get OpenGL Bind Id -PyObject * Texture_getBindId (Texture * self, void * closure) +static PyObject *Texture_getBindId(Texture *self, void *closure) { unsigned int id = self->m_actTex; return Py_BuildValue("h", id); } // get mipmap value -PyObject * Texture_getMipmap (Texture * self, void * closure) +static PyObject *Texture_getMipmap(Texture *self, void *closure) { // return true if flag is set, otherwise false if (self->m_mipmap) Py_RETURN_TRUE; @@ -405,7 +405,7 @@ PyObject * Texture_getMipmap (Texture * self, void * closure) } // set mipmap value -int Texture_setMipmap (Texture * self, PyObject * value, void * closure) +static int Texture_setMipmap(Texture *self, PyObject *value, void *closure) { // check parameter, report failure if (value == NULL || !PyBool_Check(value)) @@ -421,7 +421,7 @@ int Texture_setMipmap (Texture * self, PyObject * value, void * closure) // get source object -PyObject * Texture_getSource (Texture * self, PyObject * value, void * closure) +static PyObject *Texture_getSource(Texture *self, PyObject *value, void *closure) { // if source exists if (self->m_source != NULL) diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp index 1ba944aa955..f1c92f2feb3 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp +++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp @@ -1123,13 +1123,13 @@ static int VideoFFmpeg_init (PyObject * pySelf, PyObject * args, PyObject * kwds return 0; } -PyObject * VideoFFmpeg_getPreseek (PyImage *self, void * closure) +static PyObject *VideoFFmpeg_getPreseek(PyImage *self, void *closure) { return Py_BuildValue("h", getFFmpeg(self)->getPreseek()); } // set range -int VideoFFmpeg_setPreseek (PyImage * self, PyObject * value, void * closure) +static int VideoFFmpeg_setPreseek(PyImage *self, PyObject *value, void *closure) { // check validity of parameter if (value == NULL || !PyLong_Check(value)) @@ -1144,7 +1144,7 @@ int VideoFFmpeg_setPreseek (PyImage * self, PyObject * value, void * closure) } // get deinterlace -PyObject * VideoFFmpeg_getDeinterlace (PyImage * self, void * closure) +static PyObject *VideoFFmpeg_getDeinterlace(PyImage *self, void *closure) { if (getFFmpeg(self)->getDeinterlace()) Py_RETURN_TRUE; @@ -1153,7 +1153,7 @@ PyObject * VideoFFmpeg_getDeinterlace (PyImage * self, void * closure) } // set flip -int VideoFFmpeg_setDeinterlace (PyImage * self, PyObject * value, void * closure) +static int VideoFFmpeg_setDeinterlace(PyImage *self, PyObject *value, void *closure) { // check parameter, report failure if (value == NULL || !PyBool_Check(value)) @@ -1269,7 +1269,7 @@ static int ImageFFmpeg_init (PyObject * pySelf, PyObject * args, PyObject * kwds return 0; } -PyObject * Image_reload (PyImage * self, PyObject *args) +static PyObject *Image_reload(PyImage *self, PyObject *args) { char * newname = NULL; if (!PyArg_ParseTuple(args, "|s:reload", &newname)) diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp index 627da57baac..b05675c880a 100644 --- a/source/gameengine/VideoTexture/blendVideoTex.cpp +++ b/source/gameengine/VideoTexture/blendVideoTex.cpp @@ -168,7 +168,7 @@ static struct PyModuleDef VideoTexture_module_def = { 0, /* m_free */ }; -PyObject* initVideoTexture(void) +static PyObject *initVideoTexture(void) { PyObject * m; |