code cleanup: remove unused var for windows and style edit (remove spaces between 'var[num]')
This commit is contained in:
@@ -94,12 +94,12 @@ typedef struct Cloth
|
|||||||
typedef struct ClothVertex
|
typedef struct ClothVertex
|
||||||
{
|
{
|
||||||
int flags; /* General flags per vertex. */
|
int flags; /* General flags per vertex. */
|
||||||
float v [3]; /* The velocity of the point. */
|
float v[3]; /* The velocity of the point. */
|
||||||
float xconst [3]; /* constrained position */
|
float xconst[3]; /* constrained position */
|
||||||
float x [3]; /* The current position of this vertex. */
|
float x[3]; /* The current position of this vertex. */
|
||||||
float xold [3]; /* The previous position of this vertex.*/
|
float xold[3]; /* The previous position of this vertex.*/
|
||||||
float tx [3]; /* temporary position */
|
float tx[3]; /* temporary position */
|
||||||
float txold [3]; /* temporary old position */
|
float txold[3]; /* temporary old position */
|
||||||
float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */
|
float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */
|
||||||
float mass; /* mass / weight of the vertex */
|
float mass; /* mass / weight of the vertex */
|
||||||
float goal; /* goal, from SB */
|
float goal; /* goal, from SB */
|
||||||
|
@@ -114,9 +114,9 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm );
|
|||||||
void cloth_init ( ClothModifierData *clmd )
|
void cloth_init ( ClothModifierData *clmd )
|
||||||
{
|
{
|
||||||
/* Initialize our new data structure to reasonable values. */
|
/* Initialize our new data structure to reasonable values. */
|
||||||
clmd->sim_parms->gravity [0] = 0.0;
|
clmd->sim_parms->gravity[0] = 0.0;
|
||||||
clmd->sim_parms->gravity [1] = 0.0;
|
clmd->sim_parms->gravity[1] = 0.0;
|
||||||
clmd->sim_parms->gravity [2] = -9.81;
|
clmd->sim_parms->gravity[2] = -9.81;
|
||||||
clmd->sim_parms->structural = 15.0;
|
clmd->sim_parms->structural = 15.0;
|
||||||
clmd->sim_parms->shear = 15.0;
|
clmd->sim_parms->shear = 15.0;
|
||||||
clmd->sim_parms->bending = 0.5;
|
clmd->sim_parms->bending = 0.5;
|
||||||
|
@@ -599,13 +599,13 @@ static void verify_tree(BVHTree *tree)
|
|||||||
//This code can be easily reduced (basicly this is only method to calculate pow(k, n) in O(1).. and stuff like that)
|
//This code can be easily reduced (basicly this is only method to calculate pow(k, n) in O(1).. and stuff like that)
|
||||||
typedef struct BVHBuildHelper
|
typedef struct BVHBuildHelper
|
||||||
{
|
{
|
||||||
int tree_type; //
|
int tree_type; /* */
|
||||||
int totleafs; //
|
int totleafs; /* */
|
||||||
|
|
||||||
int leafs_per_child [32]; //Min number of leafs that are archievable from a node at depth N
|
int leafs_per_child[32]; /* Min number of leafs that are archievable from a node at depth N */
|
||||||
int branches_on_level[32]; //Number of nodes at depth N (tree_type^N)
|
int branches_on_level[32]; /* Number of nodes at depth N (tree_type^N) */
|
||||||
|
|
||||||
int remain_leafs; //Number of leafs that are placed on the level that is not 100% filled
|
int remain_leafs; /* Number of leafs that are placed on the level that is not 100% filled */
|
||||||
|
|
||||||
} BVHBuildHelper;
|
} BVHBuildHelper;
|
||||||
|
|
||||||
|
@@ -202,7 +202,7 @@ int BLI_file_touch(const char *file)
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
static char str[MAXPATHLEN+12];
|
static char str[MAXPATHLEN + 12];
|
||||||
|
|
||||||
FILE *BLI_fopen(const char *filename, const char *mode)
|
FILE *BLI_fopen(const char *filename, const char *mode)
|
||||||
{
|
{
|
||||||
@@ -212,33 +212,32 @@ FILE *BLI_fopen(const char *filename, const char *mode)
|
|||||||
gzFile BLI_gzopen(const char *filename, const char *mode)
|
gzFile BLI_gzopen(const char *filename, const char *mode)
|
||||||
{
|
{
|
||||||
gzFile gzfile;
|
gzFile gzfile;
|
||||||
int fi;
|
|
||||||
|
|
||||||
if (!filename || !mode) {return 0;}
|
if (!filename || !mode) {
|
||||||
else
|
return 0;
|
||||||
|
}
|
||||||
{
|
else {
|
||||||
|
wchar_t short_name_16[256];
|
||||||
wchar_t short_name_16 [256];
|
char short_name[256];
|
||||||
char short_name [256];
|
int i = 0;
|
||||||
int i=0;
|
|
||||||
|
|
||||||
/* xxx Creates file before transcribing the path */
|
/* xxx Creates file before transcribing the path */
|
||||||
if(mode[0]=='w')
|
if(mode[0] == 'w')
|
||||||
fclose(ufopen(filename,"a"));
|
fclose(ufopen(filename,"a"));
|
||||||
|
|
||||||
UTF16_ENCODE(filename);
|
UTF16_ENCODE(filename);
|
||||||
|
|
||||||
GetShortPathNameW(filename_16,short_name_16,256);
|
GetShortPathNameW(filename_16,short_name_16, 256);
|
||||||
|
|
||||||
for (i=0;i<256;i++) {short_name[i]=short_name_16[i];};
|
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++) {
|
||||||
|
short_name[i] = short_name_16[i];
|
||||||
|
}
|
||||||
|
|
||||||
gzfile = gzopen(short_name,mode);
|
gzfile = gzopen(short_name,mode);
|
||||||
|
|
||||||
UTF16_UN_ENCODE(filename);
|
UTF16_UN_ENCODE(filename);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return gzfile;
|
return gzfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -307,7 +307,7 @@ int BL_ArmatureChannel::py_attr_set_joint_rotation(void *self_v, const struct KX
|
|||||||
float quat[4];
|
float quat[4];
|
||||||
|
|
||||||
if (!PySequence_Check(value) || PySequence_Size(value) != 3) {
|
if (!PySequence_Check(value) || PySequence_Size(value) != 3) {
|
||||||
PyErr_SetString(PyExc_AttributeError, "expected a sequence of [3] floats");
|
PyErr_SetString(PyExc_AttributeError, "expected a sequence of 3 floats");
|
||||||
return PY_SET_ATTR_FAIL;
|
return PY_SET_ATTR_FAIL;
|
||||||
}
|
}
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
@@ -315,7 +315,7 @@ int BL_ArmatureChannel::py_attr_set_joint_rotation(void *self_v, const struct KX
|
|||||||
joints[i] = PyFloat_AsDouble(item);
|
joints[i] = PyFloat_AsDouble(item);
|
||||||
Py_DECREF(item);
|
Py_DECREF(item);
|
||||||
if (joints[i] == -1.0f && PyErr_Occurred()) {
|
if (joints[i] == -1.0f && PyErr_Occurred()) {
|
||||||
PyErr_SetString(PyExc_AttributeError, "expected a sequence of [3] floats");
|
PyErr_SetString(PyExc_AttributeError, "expected a sequence of 3 floats");
|
||||||
return PY_SET_ATTR_FAIL;
|
return PY_SET_ATTR_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -174,7 +174,7 @@ protected:
|
|||||||
|
|
||||||
MT_Matrix4x4 m_projmat;
|
MT_Matrix4x4 m_projmat;
|
||||||
|
|
||||||
MT_Matrix3x3 m_locRot [6];// the rotation matrix
|
MT_Matrix3x3 m_locRot[6]; // the rotation matrix
|
||||||
|
|
||||||
/// rendered scene
|
/// rendered scene
|
||||||
KX_Scene * m_scene;
|
KX_Scene * m_scene;
|
||||||
|
Reference in New Issue
Block a user