code cleanup: bge warnings
This commit is contained in:
@@ -182,7 +182,7 @@ static int BL_KetsjiNextFrame(KX_KetsjiEngine *ketsjiengine, bContext *C, wmWind
|
||||
return exitrequested;
|
||||
}
|
||||
|
||||
struct BL_KetsjiNextFrameState {
|
||||
static struct BL_KetsjiNextFrameState {
|
||||
class KX_KetsjiEngine* ketsjiengine;
|
||||
struct bContext *C;
|
||||
struct wmWindow* win;
|
||||
|
||||
@@ -293,7 +293,7 @@ static PyObject *listvalue_buffer_item(PyObject *self, Py_ssize_t index)
|
||||
CValue *cval;
|
||||
|
||||
if (list==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val = CList[i], "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val = CList[i], " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ static PyObject *listvalue_mapping_subscript(PyObject *self, PyObject *key)
|
||||
{
|
||||
CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
|
||||
if (list==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "value = CList[i], "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "value = CList[i], " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
|
||||
Py_ssize_t i, numitems, numitems_orig;
|
||||
|
||||
if (listval==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "CList+other, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "CList+other, " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
|
||||
CListValue* otherval = static_cast<CListValue *>(BGE_PROXY_REF(other));
|
||||
if (otherval==NULL) {
|
||||
listval_new->Release();
|
||||
PyErr_SetString(PyExc_SystemError, "CList+other, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "CList+other, " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ static int listvalue_buffer_contains(PyObject *self_v, PyObject *value)
|
||||
CListValue *self = static_cast<CListValue *>(BGE_PROXY_REF(self_v));
|
||||
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val in CList, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val in CList, " BGE_PROXY_ERROR_MSG);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1572,7 +1572,7 @@ static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype,
|
||||
return mathutils_kxgameob_vector_set(bmo, subtype);
|
||||
}
|
||||
|
||||
Mathutils_Callback mathutils_kxgameob_vector_cb = {
|
||||
static Mathutils_Callback mathutils_kxgameob_vector_cb = {
|
||||
mathutils_kxgameob_generic_check,
|
||||
mathutils_kxgameob_vector_get,
|
||||
mathutils_kxgameob_vector_set,
|
||||
@@ -1628,7 +1628,7 @@ static int mathutils_kxgameob_matrix_set(BaseMathObject *bmo, int subtype)
|
||||
return 0;
|
||||
}
|
||||
|
||||
Mathutils_Callback mathutils_kxgameob_matrix_cb = {
|
||||
static Mathutils_Callback mathutils_kxgameob_matrix_cb = {
|
||||
mathutils_kxgameob_generic_check,
|
||||
mathutils_kxgameob_matrix_get,
|
||||
mathutils_kxgameob_matrix_set,
|
||||
@@ -1800,7 +1800,7 @@ static PyObject *Map_GetItem(PyObject *self_v, PyObject *item)
|
||||
PyObject *pyconvert;
|
||||
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val = gameOb[key]: KX_GameObject, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val = gameOb[key]: KX_GameObject, " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1834,7 +1834,7 @@ static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
|
||||
PyErr_Clear();
|
||||
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "gameOb[key] = value: KX_GameObject, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "gameOb[key] = value: KX_GameObject, " BGE_PROXY_ERROR_MSG);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1919,7 +1919,7 @@ static int Seq_Contains(PyObject *self_v, PyObject *value)
|
||||
KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
|
||||
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val in gameOb: KX_GameObject, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val in gameOb: KX_GameObject, " BGE_PROXY_ERROR_MSG);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ static int mathutils_obactu_vector_set_index(BaseMathObject *bmo, int subtype, i
|
||||
return mathutils_obactu_vector_set(bmo, subtype);
|
||||
}
|
||||
|
||||
Mathutils_Callback mathutils_obactu_vector_cb = {
|
||||
static Mathutils_Callback mathutils_obactu_vector_cb = {
|
||||
mathutils_obactu_generic_check,
|
||||
mathutils_obactu_vector_get,
|
||||
mathutils_obactu_vector_set,
|
||||
|
||||
@@ -103,7 +103,7 @@ KX_PolyProxy::~KX_PolyProxy()
|
||||
// stuff for cvalue related things
|
||||
CValue* KX_PolyProxy::Calc(VALUE_OPERATOR, CValue *) { return NULL;}
|
||||
CValue* KX_PolyProxy::CalcFinal(VALUE_DATA_TYPE, VALUE_OPERATOR, CValue *) { return NULL;}
|
||||
STR_String sPolyName="polygone";
|
||||
static STR_String sPolyName = "polygone";
|
||||
const STR_String & KX_PolyProxy::GetText() {return sPolyName;};
|
||||
double KX_PolyProxy::GetNumber() { return -1;}
|
||||
STR_String& KX_PolyProxy::GetName() { return sPolyName;}
|
||||
|
||||
@@ -74,7 +74,7 @@ static Py_ssize_t KX_PythonSeq_len( PyObject *self )
|
||||
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
|
||||
|
||||
if (self_plus==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "len(seq): "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "len(seq): " BGE_PROXY_ERROR_MSG);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ static PyObject *KX_PythonSeq_getIndex(PyObject *self, Py_ssize_t index)
|
||||
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
|
||||
|
||||
if (self_plus==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val = seq[i]: "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val = seq[i]: " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ static PyObject *KX_PythonSeq_subscript(PyObject *self, PyObject *key)
|
||||
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
|
||||
|
||||
if (self_plus==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val = seq[key], KX_PythonSeq: "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val = seq[key], KX_PythonSeq: " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ static int KX_PythonSeq_contains(PyObject *self, PyObject *key)
|
||||
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
|
||||
|
||||
if (self_plus==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "key in seq, KX_PythonSeq: "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "key in seq, KX_PythonSeq: " BGE_PROXY_ERROR_MSG);
|
||||
return -1;
|
||||
}
|
||||
if (!PyUnicode_Check(key)) {
|
||||
@@ -362,7 +362,7 @@ PyMethodDef KX_PythonSeq_methods[] = {
|
||||
static PyObject *KX_PythonSeq_getIter(KX_PythonSeq *self)
|
||||
{
|
||||
if (BGE_PROXY_REF(self->base)==NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "for i in seq: "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "for i in seq: " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -2064,7 +2064,7 @@ static PyObject *Map_GetItem(PyObject *self_v, PyObject *item)
|
||||
PyObject *pyconvert;
|
||||
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val = scene[key]: KX_Scene, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val = scene[key]: KX_Scene, " BGE_PROXY_ERROR_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2094,7 +2094,7 @@ static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
|
||||
PyErr_Clear();
|
||||
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "scene[key] = value: KX_Scene, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "scene[key] = value: KX_Scene, " BGE_PROXY_ERROR_MSG);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2141,7 +2141,7 @@ static int Seq_Contains(PyObject *self_v, PyObject *value)
|
||||
KX_Scene* self = static_cast<KX_Scene*>BGE_PROXY_REF(self_v);
|
||||
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PyExc_SystemError, "val in scene: KX_Scene, "BGE_PROXY_ERROR_MSG);
|
||||
PyErr_SetString(PyExc_SystemError, "val in scene: KX_Scene, " BGE_PROXY_ERROR_MSG);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
* \ingroup bgerast
|
||||
*/
|
||||
|
||||
|
||||
#define STRINGIFY(A) #A
|
||||
|
||||
#include "RAS_OpenGLFilters/RAS_Blur2DFilter.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_BLUR2DFILTER_H__
|
||||
#define __RAS_BLUR2DFILTER_H__
|
||||
|
||||
const char * BlurFragmentShader=STRINGIFY(
|
||||
static const char *BlurFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_DILATION2DFILTER_H__
|
||||
#define __RAS_DILATION2DFILTER_H__
|
||||
|
||||
const char * DilationFragmentShader=STRINGIFY(
|
||||
static const char *DilationFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#ifndef __RAS_EROSION2DFILTER_H__
|
||||
#define __RAS_EROSION2DFILTER_H__
|
||||
|
||||
const char * ErosionFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
static const char *ErosionFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_GRAYSCALE2DFILTER_H__
|
||||
#define __RAS_GRAYSCALE2DFILTER_H__
|
||||
|
||||
const char * GrayScaleFragmentShader=STRINGIFY(
|
||||
static const char *GrayScaleFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
|
||||
void main(void)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_INVERT2DFILTER_H__
|
||||
#define __RAS_INVERT2DFILTER_H__
|
||||
|
||||
const char * InvertFragmentShader=STRINGIFY(
|
||||
static const char *InvertFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
|
||||
void main(void)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_LAPLACIAN2DFILTER_H__
|
||||
#define __RAS_LAPLACIAN2DFILTER_H__
|
||||
|
||||
const char * LaplacionFragmentShader=STRINGIFY(
|
||||
static const char *LaplacionFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_PREWITT2DFILTER_H__
|
||||
#define __RAS_PREWITT2DFILTER_H__
|
||||
|
||||
const char * PrewittFragmentShader=STRINGIFY(
|
||||
static const char *PrewittFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_SEPIA2DFILTER_H__
|
||||
#define __RAS_SEPIA2DFILTER_H__
|
||||
|
||||
const char * SepiaFragmentShader=STRINGIFY(
|
||||
static const char *SepiaFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
|
||||
void main(void)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_SHARPEN2DFILTER_H__
|
||||
#define __RAS_SHARPEN2DFILTER_H__
|
||||
|
||||
const char * SharpenFragmentShader=STRINGIFY(
|
||||
static const char *SharpenFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
|
||||
@@ -53,4 +53,3 @@ void main(void)
|
||||
}
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __RAS_SOBEL2DFILTER_H__
|
||||
#define __RAS_SOBEL2DFILTER_H__
|
||||
|
||||
const char * SobelFragmentShader=STRINGIFY(
|
||||
static const char *SobelFragmentShader = STRINGIFY(
|
||||
uniform sampler2D bgl_RenderedTexture;
|
||||
uniform vec2 bgl_TextureCoordinateOffset[9];
|
||||
|
||||
|
||||
@@ -288,9 +288,9 @@ inline ImageRender * getImageRender (PyImage *self)
|
||||
// python methods
|
||||
|
||||
// Blender Scene type
|
||||
BlendType<KX_Scene> sceneType ("KX_Scene");
|
||||
static BlendType<KX_Scene> sceneType ("KX_Scene");
|
||||
// Blender Camera type
|
||||
BlendType<KX_Camera> cameraType ("KX_Camera");
|
||||
static BlendType<KX_Camera> cameraType ("KX_Camera");
|
||||
|
||||
|
||||
// object initialization
|
||||
@@ -398,8 +398,7 @@ static PyGetSetDef imageRenderGetSets[] =
|
||||
|
||||
|
||||
// define python type
|
||||
PyTypeObject ImageRenderType =
|
||||
{
|
||||
static PyTypeObject ImageRenderType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"VideoTexture.ImageRender", /*tp_name*/
|
||||
sizeof(PyImage), /*tp_basicsize*/
|
||||
@@ -733,8 +732,7 @@ ImageRender::ImageRender (KX_Scene *scene, KX_GameObject *observer, KX_GameObjec
|
||||
|
||||
|
||||
// define python type
|
||||
PyTypeObject ImageMirrorType =
|
||||
{
|
||||
static PyTypeObject ImageMirrorType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"VideoTexture.ImageMirror", /*tp_name*/
|
||||
sizeof(PyImage), /*tp_basicsize*/
|
||||
|
||||
@@ -358,8 +358,7 @@ static PyGetSetDef imageViewportGetSets[] =
|
||||
|
||||
|
||||
// define python type
|
||||
PyTypeObject ImageViewportType =
|
||||
{
|
||||
static PyTypeObject ImageViewportType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"VideoTexture.ImageViewport", /*tp_name*/
|
||||
sizeof(PyImage), /*tp_basicsize*/
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
|
||||
|
||||
// Blender GameObject type
|
||||
BlendType<KX_GameObject> gameObjectType ("KX_GameObject");
|
||||
BlendType<KX_LightObject> lightObjectType ("KX_LightObject");
|
||||
static BlendType<KX_GameObject> gameObjectType ("KX_GameObject");
|
||||
static BlendType<KX_LightObject> lightObjectType ("KX_LightObject");
|
||||
|
||||
|
||||
// load texture
|
||||
|
||||
@@ -94,7 +94,4 @@ short getMaterialID(PyObject *obj, const char *name);
|
||||
// Exceptions
|
||||
extern ExceptionID MaterialNotAvail;
|
||||
|
||||
// object type
|
||||
extern BlendType<KX_GameObject> gameObjectType;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user