- fix for BGE warnings

- when C++ uses guardedalloc SYS_DeleteSystem was called after MEM_printmemlist(), making it look like there was a leak.
This commit is contained in:
Campbell Barton
2009-08-19 10:26:43 +00:00
parent e611c4756f
commit c3041ae7cd
19 changed files with 62 additions and 68 deletions

View File

@@ -50,6 +50,9 @@
using namespace std; using namespace std;
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
#endif
class STR_String; class STR_String;
@@ -191,6 +194,13 @@ protected:
char *pData; // -> STR_String data char *pData; // -> STR_String data
int Len; // Data length int Len; // Data length
int Max; // Space in data buffer int Max; // Space in data buffer
#ifdef WITH_CXX_GUARDEDALLOC
public:
void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "CXX:STR_String"); }
void operator delete( void *mem ) { MEM_freeN(mem); }
#endif
}; };
inline STR_String operator+(rcSTR_String lhs, rcSTR_String rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs.ReadPtr(), rhs.Length()); } inline STR_String operator+(rcSTR_String lhs, rcSTR_String rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs.ReadPtr(), rhs.Length()); }

View File

@@ -266,6 +266,8 @@ void WM_exit(bContext *C)
CTX_free(C); CTX_free(C);
SYS_DeleteSystem(SYS_GetSystem());
if(MEM_get_memory_blocks_in_use()!=0) { if(MEM_get_memory_blocks_in_use()!=0) {
printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use()); printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use());
MEM_printmemlist(); MEM_printmemlist();
@@ -282,9 +284,6 @@ void WM_exit(bContext *C)
} }
#endif #endif
SYS_DeleteSystem(SYS_GetSystem());
exit(G.afbreek==1); exit(G.afbreek==1);
} }

View File

@@ -54,8 +54,8 @@ BL_ArmatureObject::BL_ArmatureObject(
: KX_GameObject(sgReplicationInfo,callbacks), : KX_GameObject(sgReplicationInfo,callbacks),
m_objArma(armature), m_objArma(armature),
m_scene(scene), // maybe remove later. needed for where_is_pose
m_framePose(NULL), m_framePose(NULL),
m_scene(scene), // maybe remove later. needed for where_is_pose
m_lastframe(0.0), m_lastframe(0.0),
m_activeAct(NULL), m_activeAct(NULL),
m_activePriority(999), m_activePriority(999),

View File

@@ -109,8 +109,8 @@ bool BL_ShapeDeformer::ExecuteShapeDrivers(void)
{ {
if (!m_shapeDrivers.empty() && PoseUpdated()) { if (!m_shapeDrivers.empty() && PoseUpdated()) {
vector<IpoCurve*>::iterator it; vector<IpoCurve*>::iterator it;
void *poin; // void *poin;
int type; // int type;
// the shape drivers use the bone matrix as input. Must // the shape drivers use the bone matrix as input. Must
// update the matrix now // update the matrix now

View File

@@ -62,7 +62,7 @@ BL_InterpolatorList::~BL_InterpolatorList() {
} }
} }
KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(char *rna_path, int array_index) { KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index) {
for(BL_InterpolatorList::iterator i = begin(); (i != end()) ; i++ ) for(BL_InterpolatorList::iterator i = begin(); (i != end()) ; i++ )
{ {
FCurve *fcu= (static_cast<BL_ScalarInterpolator *>(*i))->GetFCurve(); FCurve *fcu= (static_cast<BL_ScalarInterpolator *>(*i))->GetFCurve();

View File

@@ -64,7 +64,7 @@ public:
BL_InterpolatorList(struct AnimData *adt); BL_InterpolatorList(struct AnimData *adt);
~BL_InterpolatorList(); ~BL_InterpolatorList();
KX_IScalarInterpolator *GetScalarInterpolator(char *rna_path, int array_index); KX_IScalarInterpolator *GetScalarInterpolator(const char *rna_path, int array_index);
#ifdef WITH_CXX_GUARDEDALLOC #ifdef WITH_CXX_GUARDEDALLOC

View File

@@ -795,6 +795,7 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
Object* blenderObject = gameObj->GetBlenderObject(); Object* blenderObject = gameObj->GetBlenderObject();
if (blenderObject && blenderObject->ipo) if (blenderObject && blenderObject->ipo)
{ {
#if 0
const MT_Point3& position = gameObj->NodeGetWorldPosition(); const MT_Point3& position = gameObj->NodeGetWorldPosition();
//const MT_Vector3& scale = gameObj->NodeGetWorldScaling(); //const MT_Vector3& scale = gameObj->NodeGetWorldScaling();
const MT_Matrix3x3& orn = gameObj->NodeGetWorldOrientation(); const MT_Matrix3x3& orn = gameObj->NodeGetWorldOrientation();
@@ -804,7 +805,6 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
float tmat[3][3]; float tmat[3][3];
// XXX animato // XXX animato
#if 0
Ipo* ipo = blenderObject->ipo; Ipo* ipo = blenderObject->ipo;
//create the curves, if not existing, set linear if new //create the curves, if not existing, set linear if new

View File

@@ -175,7 +175,7 @@ void BL_ConvertIpos(struct Object* blenderobject,KX_GameObject* gameobj,KX_Blend
KX_ObColorIpoSGController* ipocontr_obcol=NULL; KX_ObColorIpoSGController* ipocontr_obcol=NULL;
for(int i=0; i<4; i++) { for(int i=0; i<4; i++) {
if (interp = adtList->GetScalarInterpolator("color", i)) { if ((interp = adtList->GetScalarInterpolator("color", i))) {
if (!ipocontr_obcol) { if (!ipocontr_obcol) {
ipocontr_obcol = new KX_ObColorIpoSGController(); ipocontr_obcol = new KX_ObColorIpoSGController();
gameobj->GetSGNode()->AddSGController(ipocontr_obcol); gameobj->GetSGNode()->AddSGController(ipocontr_obcol);

View File

@@ -38,9 +38,6 @@
#include "PyObjectPlus.h" #include "PyObjectPlus.h"
STR_String KX_CameraActuator::X_AXIS_STRING = "x";
STR_String KX_CameraActuator::Y_AXIS_STRING = "y";
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
@@ -353,15 +350,6 @@ CValue *KX_CameraActuator::findObject(char *obName)
return NULL; return NULL;
} }
bool KX_CameraActuator::string2axischoice(const char *axisString)
{
bool res = true;
res = !(axisString == Y_AXIS_STRING);
return res;
}
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* Python functions */ /* Python functions */
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */

View File

@@ -464,7 +464,7 @@ void KX_GameObject::AddMeshUser()
double* fl = GetOpenGLMatrixPtr()->getPointer(); double* fl = GetOpenGLMatrixPtr()->getPointer();
SG_QList::iterator<RAS_MeshSlot> mit(m_meshSlots); SG_QList::iterator<RAS_MeshSlot> mit(m_meshSlots);
RAS_MeshSlot* ms; // RAS_MeshSlot* ms;
for(mit.begin(); !mit.end(); ++mit) for(mit.begin(); !mit.end(); ++mit)
{ {
(*mit)->m_OpenGLMatrix = fl; (*mit)->m_OpenGLMatrix = fl;
@@ -1817,10 +1817,10 @@ int KX_GameObject::pyattr_set_visible(void *self_v, const KX_PYATTRIBUTE_DEF *at
PyObject* KX_GameObject::pyattr_get_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) PyObject* KX_GameObject::pyattr_get_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS #ifdef USE_MATHUTILS
return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_GLOBAL); return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_GLOBAL);
#else #else
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetWorldPosition()); return PyObjectFrom(self->NodeGetWorldPosition());
#endif #endif
} }
@@ -1839,10 +1839,10 @@ int KX_GameObject::pyattr_set_worldPosition(void *self_v, const KX_PYATTRIBUTE_D
PyObject* KX_GameObject::pyattr_get_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) PyObject* KX_GameObject::pyattr_get_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS #ifdef USE_MATHUTILS
return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_LOCAL); return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_LOCAL);
#else #else
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetLocalPosition()); return PyObjectFrom(self->NodeGetLocalPosition());
#endif #endif
} }
@@ -1861,10 +1861,10 @@ int KX_GameObject::pyattr_set_localPosition(void *self_v, const KX_PYATTRIBUTE_D
PyObject* KX_GameObject::pyattr_get_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) PyObject* KX_GameObject::pyattr_get_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS #ifdef USE_MATHUTILS
return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_INERTIA_LOCAL); return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_INERTIA_LOCAL);
#else #else
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
if (self->GetPhysicsController()) if (self->GetPhysicsController())
return PyObjectFrom(self->GetPhysicsController()->GetLocalInertia()); return PyObjectFrom(self->GetPhysicsController()->GetLocalInertia());
return Py_BuildValue("fff", 0.0f, 0.0f, 0.0f); return Py_BuildValue("fff", 0.0f, 0.0f, 0.0f);
@@ -1922,20 +1922,20 @@ int KX_GameObject::pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUT
PyObject* KX_GameObject::pyattr_get_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) PyObject* KX_GameObject::pyattr_get_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS #ifdef USE_MATHUTILS
return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_GLOBAL); return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_GLOBAL);
#else #else
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetWorldScaling()); return PyObjectFrom(self->NodeGetWorldScaling());
#endif #endif
} }
PyObject* KX_GameObject::pyattr_get_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) PyObject* KX_GameObject::pyattr_get_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS #ifdef USE_MATHUTILS
return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_LOCAL); return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_LOCAL);
#else #else
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetLocalScaling()); return PyObjectFrom(self->NodeGetLocalScaling());
#endif #endif
} }

View File

@@ -49,13 +49,13 @@
/* Type strings */ /* Type strings */
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
STR_String KX_IpoActuator::S_KX_ACT_IPO_PLAY_STRING = "Play"; const char *KX_IpoActuator::S_KX_ACT_IPO_PLAY_STRING = "Play";
STR_String KX_IpoActuator::S_KX_ACT_IPO_PINGPONG_STRING = "PingPong"; const char *KX_IpoActuator::S_KX_ACT_IPO_PINGPONG_STRING = "PingPong";
STR_String KX_IpoActuator::S_KX_ACT_IPO_FLIPPER_STRING = "Flipper"; const char *KX_IpoActuator::S_KX_ACT_IPO_FLIPPER_STRING = "Flipper";
STR_String KX_IpoActuator::S_KX_ACT_IPO_LOOPSTOP_STRING = "LoopStop"; const char *KX_IpoActuator::S_KX_ACT_IPO_LOOPSTOP_STRING = "LoopStop";
STR_String KX_IpoActuator::S_KX_ACT_IPO_LOOPEND_STRING = "LoopEnd"; const char *KX_IpoActuator::S_KX_ACT_IPO_LOOPEND_STRING = "LoopEnd";
STR_String KX_IpoActuator::S_KX_ACT_IPO_KEY2KEY_STRING = "Key2key"; const char *KX_IpoActuator::S_KX_ACT_IPO_KEY2KEY_STRING = "Key2key";
STR_String KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp"; const char *KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp";
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* Native functions */ /* Native functions */
@@ -385,19 +385,19 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
int KX_IpoActuator::string2mode(char* modename) { int KX_IpoActuator::string2mode(char* modename) {
IpoActType res = KX_ACT_IPO_NODEF; IpoActType res = KX_ACT_IPO_NODEF;
if (modename == S_KX_ACT_IPO_PLAY_STRING) { if (strcmp(modename, S_KX_ACT_IPO_PLAY_STRING)==0) {
res = KX_ACT_IPO_PLAY; res = KX_ACT_IPO_PLAY;
} else if (modename == S_KX_ACT_IPO_PINGPONG_STRING) { } else if (strcmp(modename, S_KX_ACT_IPO_PINGPONG_STRING)==0) {
res = KX_ACT_IPO_PINGPONG; res = KX_ACT_IPO_PINGPONG;
} else if (modename == S_KX_ACT_IPO_FLIPPER_STRING) { } else if (strcmp(modename, S_KX_ACT_IPO_FLIPPER_STRING)==0) {
res = KX_ACT_IPO_FLIPPER; res = KX_ACT_IPO_FLIPPER;
} else if (modename == S_KX_ACT_IPO_LOOPSTOP_STRING) { } else if (strcmp(modename, S_KX_ACT_IPO_LOOPSTOP_STRING)==0) {
res = KX_ACT_IPO_LOOPSTOP; res = KX_ACT_IPO_LOOPSTOP;
} else if (modename == S_KX_ACT_IPO_LOOPEND_STRING) { } else if (strcmp(modename, S_KX_ACT_IPO_LOOPEND_STRING)==0) {
res = KX_ACT_IPO_LOOPEND; res = KX_ACT_IPO_LOOPEND;
} else if (modename == S_KX_ACT_IPO_KEY2KEY_STRING) { } else if (strcmp(modename, S_KX_ACT_IPO_KEY2KEY_STRING)==0) {
res = KX_ACT_IPO_KEY2KEY; res = KX_ACT_IPO_KEY2KEY;
} else if (modename == S_KX_ACT_IPO_FROM_PROP_STRING) { } else if (strcmp(modename, S_KX_ACT_IPO_FROM_PROP_STRING)==0) {
res = KX_ACT_IPO_FROM_PROP; res = KX_ACT_IPO_FROM_PROP;
} }

View File

@@ -100,13 +100,13 @@ public:
KX_ACT_IPO_MAX KX_ACT_IPO_MAX
}; };
static STR_String S_KX_ACT_IPO_PLAY_STRING; static const char *S_KX_ACT_IPO_PLAY_STRING;
static STR_String S_KX_ACT_IPO_PINGPONG_STRING; static const char *S_KX_ACT_IPO_PINGPONG_STRING;
static STR_String S_KX_ACT_IPO_FLIPPER_STRING; static const char *S_KX_ACT_IPO_FLIPPER_STRING;
static STR_String S_KX_ACT_IPO_LOOPSTOP_STRING; static const char *S_KX_ACT_IPO_LOOPSTOP_STRING;
static STR_String S_KX_ACT_IPO_LOOPEND_STRING; static const char *S_KX_ACT_IPO_LOOPEND_STRING;
static STR_String S_KX_ACT_IPO_KEY2KEY_STRING; static const char *S_KX_ACT_IPO_KEY2KEY_STRING;
static STR_String S_KX_ACT_IPO_FROM_PROP_STRING; static const char *S_KX_ACT_IPO_FROM_PROP_STRING;
int string2mode(char* modename); int string2mode(char* modename);

View File

@@ -142,7 +142,7 @@ void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,cons
// List of methods defined in the module // List of methods defined in the module
static PyObject* ErrorObject; static PyObject* ErrorObject;
STR_String gPyGetRandomFloat_doc="getRandomFloat returns a random floating point value in the range [0..1)"; static const char *gPyGetRandomFloat_doc="getRandomFloat returns a random floating point value in the range [0..1]";
static PyObject* gPyGetRandomFloat(PyObject*) static PyObject* gPyGetRandomFloat(PyObject*)
{ {
@@ -346,7 +346,7 @@ static PyObject* gPyGetBlendFileList(PyObject*, PyObject* args)
return list; return list;
} }
static STR_String gPyGetCurrentScene_doc = static const char *gPyGetCurrentScene_doc =
"getCurrentScene()\n" "getCurrentScene()\n"
"Gets a reference to the current scene.\n"; "Gets a reference to the current scene.\n";
static PyObject* gPyGetCurrentScene(PyObject* self) static PyObject* gPyGetCurrentScene(PyObject* self)
@@ -354,7 +354,7 @@ static PyObject* gPyGetCurrentScene(PyObject* self)
return gp_KetsjiScene->GetProxy(); return gp_KetsjiScene->GetProxy();
} }
static STR_String gPyGetSceneList_doc = static const char *gPyGetSceneList_doc =
"getSceneList()\n" "getSceneList()\n"
"Return a list of converted scenes.\n"; "Return a list of converted scenes.\n";
static PyObject* gPyGetSceneList(PyObject* self) static PyObject* gPyGetSceneList(PyObject* self)
@@ -479,15 +479,15 @@ static struct PyMethodDef game_methods[] = {
{"sendMessage", (PyCFunction)gPySendMessage, METH_VARARGS, (const char *)gPySendMessage_doc}, {"sendMessage", (PyCFunction)gPySendMessage, METH_VARARGS, (const char *)gPySendMessage_doc},
{"getCurrentController", {"getCurrentController",
(PyCFunction) SCA_PythonController::sPyGetCurrentController, (PyCFunction) SCA_PythonController::sPyGetCurrentController,
METH_NOARGS, (const char *)SCA_PythonController::sPyGetCurrentController__doc__}, METH_NOARGS, SCA_PythonController::sPyGetCurrentController__doc__},
{"getCurrentScene", (PyCFunction) gPyGetCurrentScene, {"getCurrentScene", (PyCFunction) gPyGetCurrentScene,
METH_NOARGS, (const char *)gPyGetCurrentScene_doc.Ptr()}, METH_NOARGS, gPyGetCurrentScene_doc},
{"getSceneList", (PyCFunction) gPyGetSceneList, {"getSceneList", (PyCFunction) gPyGetSceneList,
METH_NOARGS, (const char *)gPyGetSceneList_doc.Ptr()}, METH_NOARGS, (const char *)gPyGetSceneList_doc},
{"addActiveActuator",(PyCFunction) SCA_PythonController::sPyAddActiveActuator, {"addActiveActuator",(PyCFunction) SCA_PythonController::sPyAddActiveActuator,
METH_VARARGS, (const char *)SCA_PythonController::sPyAddActiveActuator__doc__}, METH_VARARGS, (const char *)SCA_PythonController::sPyAddActiveActuator__doc__},
{"getRandomFloat",(PyCFunction) gPyGetRandomFloat, {"getRandomFloat",(PyCFunction) gPyGetRandomFloat,
METH_NOARGS, (const char *)gPyGetRandomFloat_doc.Ptr()}, METH_NOARGS, (const char *)gPyGetRandomFloat_doc},
{"setGravity",(PyCFunction) gPySetGravity, METH_O, (const char *)"set Gravitation"}, {"setGravity",(PyCFunction) gPySetGravity, METH_O, (const char *)"set Gravitation"},
{"getSpectrum",(PyCFunction) gPyGetSpectrum, METH_NOARGS, (const char *)"get audio spectrum"}, {"getSpectrum",(PyCFunction) gPyGetSpectrum, METH_NOARGS, (const char *)"get audio spectrum"},
{"stopDSP",(PyCFunction) gPyStopDSP, METH_VARARGS, (const char *)"stop using the audio dsp (for performance reasons)"}, {"stopDSP",(PyCFunction) gPyStopDSP, METH_VARARGS, (const char *)"stop using the audio dsp (for performance reasons)"},

View File

@@ -123,9 +123,6 @@ static void PyType_Ready_ADD(PyObject *dict, PyTypeObject *tp, PyAttributeDef *a
memset(attr_getset, 0, sizeof(PyGetSetDef)); memset(attr_getset, 0, sizeof(PyGetSetDef));
} }
} else { } else {
PyObject *item;
PyType_Ready(tp); PyType_Ready(tp);
PyDict_SetItemString(dict, tp->tp_name, reinterpret_cast<PyObject *>(tp)); PyDict_SetItemString(dict, tp->tp_name, reinterpret_cast<PyObject *>(tp));
} }

View File

@@ -375,7 +375,7 @@ PyTypeObject KX_PythonSeq_Type = {
NULL, /* getattrfunc tp_getattr; */ NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */ NULL, /* setattrfunc tp_setattr; */
/* TODO, richcmp */ /* TODO, richcmp */
NULL, /* ( cmpfunc ) KX_PythonSeq_compare, /* cmpfunc tp_compare; */ NULL, /* ( cmpfunc ) KX_PythonSeq_compare, // cmpfunc tp_compare; */
( reprfunc ) KX_PythonSeq_repr, /* reprfunc tp_repr; */ ( reprfunc ) KX_PythonSeq_repr, /* reprfunc tp_repr; */
/* Method suites for standard classes */ /* Method suites for standard classes */

View File

@@ -50,8 +50,8 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
// mesh reference (mesh to replace) // mesh reference (mesh to replace)
RAS_MeshObject* m_mesh; RAS_MeshObject* m_mesh;
SCA_IScene* m_scene; SCA_IScene* m_scene;
bool m_use_phys;
bool m_use_gfx; bool m_use_gfx;
bool m_use_phys;
public: public:
KX_SCA_ReplaceMeshActuator( KX_SCA_ReplaceMeshActuator(

View File

@@ -1829,8 +1829,6 @@ bool CcdShapeConstructionInfo::UpdateMesh(class KX_GameObject* gameobj, class RA
} }
for(mf= mface, i=0; i < numpolys; mf++, i++) { for(mf= mface, i=0; i < numpolys; mf++, i++) {
unsigned int *fv = &mf->v1;
if(mf->v4) { if(mf->v4) {
fv_pt= quad_verts; fv_pt= quad_verts;
*poly_index_pt++ = *poly_index_pt++ = index[i]; *poly_index_pt++ = *poly_index_pt++ = index[i];

View File

@@ -70,7 +70,6 @@ void RAS_IPolyMaterial::Initialize(
RAS_IPolyMaterial::RAS_IPolyMaterial() RAS_IPolyMaterial::RAS_IPolyMaterial()
: m_texturename("__Dummy_Texture_Name__"), : m_texturename("__Dummy_Texture_Name__"),
m_materialname("__Dummy_Material_Name__"), m_materialname("__Dummy_Material_Name__"),
m_materialindex(0),
m_tile(0), m_tile(0),
m_tilexrep(0), m_tilexrep(0),
m_tileyrep(0), m_tileyrep(0),
@@ -78,6 +77,7 @@ RAS_IPolyMaterial::RAS_IPolyMaterial()
m_transp(0), m_transp(0),
m_alpha(false), m_alpha(false),
m_zsort(false), m_zsort(false),
m_materialindex(0),
m_polymatid(0), m_polymatid(0),
m_flag(0), m_flag(0),
m_multimode(0) m_multimode(0)
@@ -100,7 +100,6 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname,
bool zsort) bool zsort)
: m_texturename(texname), : m_texturename(texname),
m_materialname(matname), m_materialname(matname),
m_materialindex(materialindex),
m_tile(tile), m_tile(tile),
m_tilexrep(tilexrep), m_tilexrep(tilexrep),
m_tileyrep(tileyrep), m_tileyrep(tileyrep),
@@ -108,6 +107,7 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname,
m_transp(transp), m_transp(transp),
m_alpha(alpha), m_alpha(alpha),
m_zsort(zsort), m_zsort(zsort),
m_materialindex(materialindex),
m_polymatid(m_newpolymatid++), m_polymatid(m_newpolymatid++),
m_flag(0), m_flag(0),
m_multimode(0) m_multimode(0)

View File

@@ -219,15 +219,17 @@ bool ImageBase::checkSourceSizes (void)
// get size of current source // get size of current source
short * curSize = (*it)->getSize(); short * curSize = (*it)->getSize();
// if size is available and is not empty // if size is available and is not empty
if (curSize[0] != 0 && curSize[1] != 0) if (curSize[0] != 0 && curSize[1] != 0) {
// if reference size is not set // if reference size is not set
if (refSize == NULL) if (refSize == NULL) {
// set current size as reference // set current size as reference
refSize = curSize; refSize = curSize;
// otherwise check with current size // otherwise check with current size
else if (curSize[0] != refSize[0] || curSize[1] != refSize[1]) } else if (curSize[0] != refSize[0] || curSize[1] != refSize[1]) {
// if they don't match, report it // if they don't match, report it
return false; return false;
}
}
} }
// all sizes match // all sizes match
return true; return true;