style cleanup:

also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
This commit is contained in:
Campbell Barton 2013-03-26 07:29:01 +00:00
parent ef961319e0
commit 64d161de87
92 changed files with 304 additions and 300 deletions

@ -34,8 +34,8 @@
#include <stdio.h> /* for FILE */ #include <stdio.h> /* for FILE */
unsigned int GET_FCC (FILE *fp); unsigned int GET_FCC(FILE *fp);
unsigned int GET_TCC (FILE *fp); unsigned int GET_TCC(FILE *fp);
#define PUT_FCC(ch4, fp) \ #define PUT_FCC(ch4, fp) \
{ \ { \

@ -69,7 +69,7 @@ void BKE_brush_jitter_pos(const struct Scene *scene, struct Brush *brush,
const float pos[2], float jitterpos[2]); const float pos[2], float jitterpos[2]);
/* brush curve */ /* brush curve */
void BKE_brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/ int preset); void BKE_brush_curve_preset(struct Brush *b, int preset);
float BKE_brush_curve_strength_clamp(struct Brush *br, float p, const float len); float BKE_brush_curve_strength_clamp(struct Brush *br, float p, const float len);
float BKE_brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */ float BKE_brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */

@ -120,7 +120,7 @@ void pd_point_from_soft(struct Scene *scene, float *loc, float *vel, int index,
/* needed for boids */ /* needed for boids */
float effector_falloff(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, struct EffectorWeights *weights); float effector_falloff(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, struct EffectorWeights *weights);
int closest_point_on_surface(SurfaceModifierData * surmd, const float co[3], float surface_co[3], float surface_nor[3], float surface_vel[3]); int closest_point_on_surface(SurfaceModifierData *surmd, const float co[3], float surface_co[3], float surface_nor[3], float surface_vel[3]);
int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, int real_velocity); int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, int real_velocity);
/* required for particle_system.c */ /* required for particle_system.c */

@ -221,7 +221,7 @@ void BKE_mesh_calc_normals(
/* Return a newly MEM_malloc'd array of all the mesh vertex locations /* Return a newly MEM_malloc'd array of all the mesh vertex locations
* (_numVerts_r_ may be NULL) */ * (_numVerts_r_ may be NULL) */
float (*mesh_getVertexCos(struct Mesh *me, int *r_numVerts))[3]; float (*BKE_mesh_vertexCos_get(struct Mesh *me, int *r_numVerts))[3];
/* map from uv vertex to face (for select linked, stitch, uv suburf) */ /* map from uv vertex to face (for select linked, stitch, uv suburf) */

@ -321,7 +321,7 @@ void psys_get_dupli_path_transform(struct ParticleSimulationData *sim, struct Pa
ParticleThread *psys_threads_create(struct ParticleSimulationData *sim); ParticleThread *psys_threads_create(struct ParticleSimulationData *sim);
void psys_threads_free(ParticleThread *threads); void psys_threads_free(ParticleThread *threads);
void psys_make_billboard(ParticleBillboardData * bb, float xvec[3], float yvec[3], float zvec[3], float center[3]); void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
void psys_apply_hair_lattice(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys); void psys_apply_hair_lattice(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
/* particle_system.c */ /* particle_system.c */

@ -163,8 +163,8 @@ void BKE_pbvh_node_num_verts(PBVH *bvh, PBVHNode *node,
void BKE_pbvh_node_get_verts(PBVH *bvh, PBVHNode *node, void BKE_pbvh_node_get_verts(PBVH *bvh, PBVHNode *node,
int **vert_indices, struct MVert **verts); int **vert_indices, struct MVert **verts);
void BKE_pbvh_node_get_BB(PBVHNode * node, float bb_min[3], float bb_max[3]); void BKE_pbvh_node_get_BB(PBVHNode *node, float bb_min[3], float bb_max[3]);
void BKE_pbvh_node_get_original_BB(PBVHNode * node, float bb_min[3], float bb_max[3]); void BKE_pbvh_node_get_original_BB(PBVHNode *node, float bb_min[3], float bb_max[3]);
float BKE_pbvh_node_get_tmin(PBVHNode *node); float BKE_pbvh_node_get_tmin(PBVHNode *node);
@ -181,7 +181,7 @@ void BKE_pbvh_bmesh_after_stroke(PBVH *bvh);
/* Update Normals/Bounding Box/Draw Buffers/Redraw and clear flags */ /* Update Normals/Bounding Box/Draw Buffers/Redraw and clear flags */
void BKE_pbvh_update(PBVH *bvh, int flags, float (*face_nors)[3]); void BKE_pbvh_update(PBVH *bvh, int flags, float (*face_nors)[3]);
void BKE_pbvh_redraw_BB(PBVH * bvh, float bb_min[3], float bb_max[3]); void BKE_pbvh_redraw_BB(PBVH *bvh, float bb_min[3], float bb_max[3]);
void BKE_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *totface); void BKE_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *totface);
void BKE_pbvh_grids_update(PBVH *bvh, struct CCGElem **grid_elems, void BKE_pbvh_grids_update(PBVH *bvh, struct CCGElem **grid_elems,
struct DMGridAdjacency *gridadj, void **gridfaces, struct DMGridAdjacency *gridadj, void **gridfaces,

@ -126,7 +126,7 @@ void sk_appendStrokePoint(SK_Stroke *stk, SK_Point *pt);
void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end); void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end);
void sk_trimStroke(SK_Stroke *stk, int start, int end); void sk_trimStroke(SK_Stroke *stk, int start, int end);
void sk_straightenStroke(SK_Stroke * stk, int start, int end, float p_start[3], float p_end[3]); void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], float p_end[3]);
void sk_polygonizeStroke(SK_Stroke *stk, int start, int end); void sk_polygonizeStroke(SK_Stroke *stk, int start, int end);
void sk_flattenStroke(SK_Stroke *stk, int start, int end); void sk_flattenStroke(SK_Stroke *stk, int start, int end);
void sk_reverseStroke(SK_Stroke *stk); void sk_reverseStroke(SK_Stroke *stk);

@ -68,7 +68,7 @@ extern void sbObjectToSoftbody(struct Object *ob);
/* pass NULL to unlink again */ /* pass NULL to unlink again */
extern void sbSetInterruptCallBack(int (*f)(void)); extern void sbSetInterruptCallBack(int (*f)(void));
extern void SB_estimate_transform(Object * ob, float lloc[3], float lrot[3][3], float lscale[3][3]); extern void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
#endif #endif

@ -845,7 +845,7 @@ DerivedMesh *mesh_create_derived_for_modifier(Scene *scene, Object *ob,
if (mti->type == eModifierTypeType_OnlyDeform) { if (mti->type == eModifierTypeType_OnlyDeform) {
int numVerts; int numVerts;
float (*deformedVerts)[3] = mesh_getVertexCos(me, &numVerts); float (*deformedVerts)[3] = BKE_mesh_vertexCos_get(me, &numVerts);
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, 0); mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, 0);
dm = mesh_create_derived(me, ob, deformedVerts); dm = mesh_create_derived(me, ob, deformedVerts);
@ -1451,7 +1451,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
if (mti->type == eModifierTypeType_OnlyDeform && !sculpt_dyntopo) { if (mti->type == eModifierTypeType_OnlyDeform && !sculpt_dyntopo) {
if (!deformedVerts) if (!deformedVerts)
deformedVerts = mesh_getVertexCos(me, &numVerts); deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts);
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, deform_app_flags); mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, deform_app_flags);
} }
@ -1485,7 +1485,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
if (inputVertexCos) if (inputVertexCos)
deformedVerts = inputVertexCos; deformedVerts = inputVertexCos;
else else
deformedVerts = mesh_getVertexCos(me, &numVerts); deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts);
} }
@ -1557,7 +1557,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
dm->getVertCos(dm, deformedVerts); dm->getVertCos(dm, deformedVerts);
} }
else { else {
deformedVerts = mesh_getVertexCos(me, &numVerts); deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts);
} }
} }
@ -2441,30 +2441,30 @@ static int GetNumVertsOfFace(const SMikkTSpaceContext *pContext, const int face_
return pMesh->mface[face_num].v4 != 0 ? 4 : 3; return pMesh->mface[face_num].v4 != 0 ? 4 : 3;
} }
static void GetPosition(const SMikkTSpaceContext *pContext, float fPos[], const int face_num, const int vert_index) static void GetPosition(const SMikkTSpaceContext *pContext, float r_co[3], const int face_num, const int vert_index)
{ {
//assert(vert_index >= 0 && vert_index < 4); //assert(vert_index >= 0 && vert_index < 4);
SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData; SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData;
const float *co = pMesh->mvert[(&pMesh->mface[face_num].v1)[vert_index]].co; const float *co = pMesh->mvert[(&pMesh->mface[face_num].v1)[vert_index]].co;
copy_v3_v3(fPos, co); copy_v3_v3(r_co, co);
} }
static void GetTextureCoordinate(const SMikkTSpaceContext *pContext, float fUV[], const int face_num, const int vert_index) static void GetTextureCoordinate(const SMikkTSpaceContext *pContext, float r_uv[2], const int face_num, const int vert_index)
{ {
//assert(vert_index >= 0 && vert_index < 4); //assert(vert_index >= 0 && vert_index < 4);
SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData; SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData;
if (pMesh->mtface != NULL) { if (pMesh->mtface != NULL) {
float *uv = pMesh->mtface[face_num].uv[vert_index]; const float *uv = pMesh->mtface[face_num].uv[vert_index];
fUV[0] = uv[0]; fUV[1] = uv[1]; copy_v2_v2(r_uv, uv);
} }
else { else {
const float *orco = pMesh->orco[(&pMesh->mface[face_num].v1)[vert_index]]; const float *orco = pMesh->orco[(&pMesh->mface[face_num].v1)[vert_index]];
map_to_sphere(&fUV[0], &fUV[1], orco[0], orco[1], orco[2]); map_to_sphere(&r_uv[0], &r_uv[1], orco[0], orco[1], orco[2]);
} }
} }
static void GetNormal(const SMikkTSpaceContext *pContext, float fNorm[], const int face_num, const int vert_index) static void GetNormal(const SMikkTSpaceContext *pContext, float r_no[3], const int face_num, const int vert_index)
{ {
//assert(vert_index >= 0 && vert_index < 4); //assert(vert_index >= 0 && vert_index < 4);
SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData; SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData;
@ -2472,29 +2472,29 @@ static void GetNormal(const SMikkTSpaceContext *pContext, float fNorm[], const i
const int smoothnormal = (pMesh->mface[face_num].flag & ME_SMOOTH); const int smoothnormal = (pMesh->mface[face_num].flag & ME_SMOOTH);
if (!smoothnormal) { // flat if (!smoothnormal) { // flat
if (pMesh->precomputedFaceNormals) { if (pMesh->precomputedFaceNormals) {
copy_v3_v3(fNorm, &pMesh->precomputedFaceNormals[3 * face_num]); copy_v3_v3(r_no, &pMesh->precomputedFaceNormals[3 * face_num]);
} }
else { else {
MFace *mf = &pMesh->mface[face_num]; MFace *mf = &pMesh->mface[face_num];
float *p0 = pMesh->mvert[mf->v1].co; const float *p0 = pMesh->mvert[mf->v1].co;
float *p1 = pMesh->mvert[mf->v2].co; const float *p1 = pMesh->mvert[mf->v2].co;
float *p2 = pMesh->mvert[mf->v3].co; const float *p2 = pMesh->mvert[mf->v3].co;
if (mf->v4) { if (mf->v4) {
float *p3 = pMesh->mvert[mf->v4].co; const float *p3 = pMesh->mvert[mf->v4].co;
normal_quad_v3(fNorm, p0, p1, p2, p3); normal_quad_v3(r_no, p0, p1, p2, p3);
} }
else { else {
normal_tri_v3(fNorm, p0, p1, p2); normal_tri_v3(r_no, p0, p1, p2);
} }
} }
} }
else { else {
const short *no = pMesh->mvert[(&pMesh->mface[face_num].v1)[vert_index]].no; const short *no = pMesh->mvert[(&pMesh->mface[face_num].v1)[vert_index]].no;
normal_short_to_float_v3(fNorm, no); normal_short_to_float_v3(r_no, no);
} }
} }
static void SetTSpace(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fSign, const int face_num, const int iVert) static void SetTSpace(const SMikkTSpaceContext *pContext, const float fvTangent[3], const float fSign, const int face_num, const int iVert)
{ {
//assert(vert_index >= 0 && vert_index < 4); //assert(vert_index >= 0 && vert_index < 4);
SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData; SGLSLMeshToTangent *pMesh = (SGLSLMeshToTangent *) pContext->m_pUserData;

@ -38,7 +38,7 @@
* detects if an image buffer contains a bitmap font. It makes the * detects if an image buffer contains a bitmap font. It makes the
* specific bitmap data which is stored in the bitmap invisible to blender. * specific bitmap data which is stored in the bitmap invisible to blender.
* *
* void matrixGlyph(ImBuf * ibuf, unsigned short unicode, *float x 7) * void matrixGlyph(ImBuf *ibuf, unsigned short unicode, *float x 7)
* returns all the information about the character (unicode) in the floats * returns all the information about the character (unicode) in the floats
* *
* Room for improvement: * Room for improvement:
@ -248,7 +248,7 @@ int locateGlyph(bmFont *bmfont, unsigned short unicode)
} }
void matrixGlyph( void matrixGlyph(
ImBuf * ibuf, unsigned short unicode, ImBuf *ibuf, unsigned short unicode,
float *centerx, float *centery, float *centerx, float *centery,
float *sizex, float *sizey, float *sizex, float *sizey,
float *transx, float *transy, float *transx, float *transy,

@ -417,8 +417,11 @@ void BKE_brush_sculpt_reset(Brush *br)
} }
} }
/* Library Operations */ /**
void BKE_brush_curve_preset(Brush *b, /*CurveMappingPreset*/ int preset) * Library Operations
* \param preset CurveMappingPreset
*/
void BKE_brush_curve_preset(Brush *b, int preset)
{ {
CurveMap *cm = NULL; CurveMap *cm = NULL;

@ -3204,7 +3204,7 @@ void BKE_nurb_direction_switch(Nurb *nu)
} }
float (*BKE_curve_vertexCos_get(Curve * UNUSED(cu), ListBase * lb, int *numVerts_r))[3] float (*BKE_curve_vertexCos_get(Curve *UNUSED(cu), ListBase *lb, int *numVerts_r))[3]
{ {
int i, numVerts = *numVerts_r = BKE_nurbList_verts_count(lb); int i, numVerts = *numVerts_r = BKE_nurbList_verts_count(lb);
float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos"); float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos");
@ -3261,7 +3261,7 @@ void BK_curve_vertexCos_apply(Curve *UNUSED(cu), ListBase *lb, float (*vertexCos
} }
} }
float (*BKE_curve_keyVertexCos_get(Curve * UNUSED(cu), ListBase * lb, float *key))[3] float (*BKE_curve_keyVertexCos_get(Curve *UNUSED(cu), ListBase *lb, float *key))[3]
{ {
int i, numVerts = BKE_nurbList_verts_count(lb); int i, numVerts = BKE_nurbList_verts_count(lb);
float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos"); float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos");

@ -850,7 +850,7 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, fl
*numVerts_r = numVerts; *numVerts_r = numVerts;
} }
static float (*displist_get_allverts(ListBase * dispbase, int *totvert))[3] static float (*displist_get_allverts(ListBase *dispbase, int *totvert))[3]
{ {
DispList *dl; DispList *dl;
float (*allverts)[3], *fp; float (*allverts)[3], *fp;

@ -2190,7 +2190,7 @@ void BKE_mesh_convert_mfaces_to_mpolys_ex(ID *id, CustomData *fdata, CustomData
*mloop_r = mloop; *mloop_r = mloop;
} }
float (*mesh_getVertexCos(Mesh * me, int *r_numVerts))[3] float (*BKE_mesh_vertexCos_get(Mesh *me, int *r_numVerts))[3]
{ {
int i, numVerts = me->totvert; int i, numVerts = me->totvert;
float (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "vertexcos1"); float (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "vertexcos1");

@ -1698,7 +1698,7 @@ void BKE_pbvh_node_layer_disp_free(PBVHNode *node)
} }
} }
float (*BKE_pbvh_get_vertCos(PBVH * pbvh))[3] float (*BKE_pbvh_get_vertCos(PBVH *pbvh))[3]
{ {
int a; int a;
float (*vertCos)[3] = NULL; float (*vertCos)[3] = NULL;

@ -66,7 +66,7 @@ double BLI_dir_free_space(const char *dir);
char *BLI_current_working_dir(char *dir, const size_t maxlen); char *BLI_current_working_dir(char *dir, const size_t maxlen);
unsigned int BLI_dir_contents(const char *dir, struct direntry **filelist); unsigned int BLI_dir_contents(const char *dir, struct direntry **filelist);
void BLI_free_filelist(struct direntry * filelist, unsigned int nrentries); void BLI_free_filelist(struct direntry *filelist, unsigned int nrentries);
/* Files */ /* Files */

@ -172,10 +172,10 @@ typedef struct DualQuat {
void copy_dq_dq(DualQuat *r, DualQuat *dq); void copy_dq_dq(DualQuat *r, DualQuat *dq);
void normalize_dq(DualQuat *dq, float totw); void normalize_dq(DualQuat *dq, float totw);
void add_weighted_dq_dq(DualQuat *r, DualQuat *dq, float weight); void add_weighted_dq_dq(DualQuat *r, DualQuat *dq, float weight);
void mul_v3m3_dq(float r[3], float R[3][3], DualQuat * dq); void mul_v3m3_dq(float r[3], float R[3][3], DualQuat *dq);
void mat4_to_dquat(DualQuat * r, float base[4][4], float M[4][4]); void mat4_to_dquat(DualQuat *r, float base[4][4], float M[4][4]);
void dquat_to_mat4(float R[4][4], DualQuat * dq); void dquat_to_mat4(float R[4][4], DualQuat *dq);
void quat_apply_track(float quat[4], short axis, short upflag); void quat_apply_track(float quat[4], short axis, short upflag);
void vec_apply_track(float vec[3], short axis); void vec_apply_track(float vec[3], short axis);

@ -111,8 +111,8 @@ bool BLI_testextensie_array(const char *str, const char **ext_array);
bool BLI_testextensie_glob(const char *str, const char *ext_fnmatch); bool BLI_testextensie_glob(const char *str, const char *ext_fnmatch);
bool BLI_replace_extension(char *path, size_t maxlen, const char *ext); bool BLI_replace_extension(char *path, size_t maxlen, const char *ext);
bool BLI_ensure_extension(char *path, size_t maxlen, const char *ext); bool BLI_ensure_extension(char *path, size_t maxlen, const char *ext);
void BLI_uniquename(struct ListBase *list, void *vlink, const char * defname, char delim, short name_offs, short len); void BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, short name_offs, short len);
bool BLI_uniquename_cb(bool (*unique_check)(void * arg, const char * name), bool BLI_uniquename_cb(bool (*unique_check)(void *arg, const char *name),
void *arg, const char * defname, char delim, char *name, short name_len); void *arg, const char * defname, char delim, char *name, short name_len);
void BLI_newname(char *name, int add); void BLI_newname(char *name, int add);
int BLI_stringdec(const char *string, char *head, char *start, unsigned short *numlen); int BLI_stringdec(const char *string, char *head, char *start, unsigned short *numlen);

@ -457,7 +457,7 @@ float linearrgb_to_srgb(float c)
return 1.055f * powf(c, 1.0f / 2.4f) - 0.055f; return 1.055f * powf(c, 1.0f / 2.4f) - 0.055f;
} }
void minmax_rgb(short c[]) void minmax_rgb(short c[3])
{ {
if (c[0] > 255) c[0] = 255; if (c[0] > 255) c[0] = 255;
else if (c[0] < 0) c[0] = 0; else if (c[0] < 0) c[0] = 0;

@ -232,7 +232,7 @@ void BLI_newname(char *name, int add)
* \param name_len Maximum length of name area * \param name_len Maximum length of name area
* \return true if there if the name was changed * \return true if there if the name was changed
*/ */
bool BLI_uniquename_cb(bool (*unique_check)(void * arg, const char *name), bool BLI_uniquename_cb(bool (*unique_check)(void *arg, const char *name),
void *arg, const char *defname, char delim, char *name, short name_len) void *arg, const char *defname, char delim, char *name, short name_len)
{ {
if (name[0] == '\0') { if (name[0] == '\0') {

@ -10510,13 +10510,13 @@ static ID *append_named_part_ex(const bContext *C, Main *mainl, FileData *fd, co
return id; return id;
} }
ID *BLO_library_append_named_part(Main *mainl, BlendHandle** bh, const char *idname, const int idcode) ID *BLO_library_append_named_part(Main *mainl, BlendHandle **bh, const char *idname, const int idcode)
{ {
FileData *fd = (FileData*)(*bh); FileData *fd = (FileData*)(*bh);
return append_named_part(mainl, fd, idname, idcode); return append_named_part(mainl, fd, idname, idcode);
} }
ID *BLO_library_append_named_part_ex(const bContext *C, Main *mainl, BlendHandle** bh, const char *idname, const int idcode, const short flag) ID *BLO_library_append_named_part_ex(const bContext *C, Main *mainl, BlendHandle **bh, const char *idname, const int idcode, const short flag)
{ {
FileData *fd = (FileData*)(*bh); FileData *fd = (FileData*)(*bh);
return append_named_part_ex(C, mainl, fd, idname, idcode, flag); return append_named_part_ex(C, mainl, fd, idname, idcode, flag);
@ -10564,7 +10564,7 @@ static Main *library_append_begin(Main *mainvar, FileData **fd, const char *file
return mainl; return mainl;
} }
Main *BLO_library_append_begin(Main *mainvar, BlendHandle** bh, const char *filepath) Main *BLO_library_append_begin(Main *mainvar, BlendHandle **bh, const char *filepath)
{ {
FileData *fd = (FileData*)(*bh); FileData *fd = (FileData*)(*bh);
return library_append_begin(mainvar, &fd, filepath); return library_append_begin(mainvar, &fd, filepath);
@ -10638,7 +10638,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
} }
} }
void BLO_library_append_end(const bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag) void BLO_library_append_end(const bContext *C, struct Main *mainl, BlendHandle **bh, int idcode, short flag)
{ {
FileData *fd = (FileData*)(*bh); FileData *fd = (FileData*)(*bh);
library_append_end(C, mainl, &fd, idcode, flag); library_append_end(C, mainl, &fd, idcode, flag);

@ -647,7 +647,7 @@ static void do_version_constraints_radians_degrees_250(ListBase *lb)
} }
/* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already */ /* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already */
static void do_versions_seq_unique_name_all_strips(Scene * sce, ListBase *seqbasep) static void do_versions_seq_unique_name_all_strips(Scene *sce, ListBase *seqbasep)
{ {
Sequence * seq = seqbasep->first; Sequence * seq = seqbasep->first;

@ -79,7 +79,7 @@ JointData *ArmatureImporter::get_joint_data(COLLADAFW::Node *node);
} }
#endif #endif
void ArmatureImporter::create_bone(SkinInfo* skin, COLLADAFW::Node *node, EditBone *parent, int totchild, void ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBone *parent, int totchild,
float parent_mat[4][4], bArmature *arm) float parent_mat[4][4], bArmature *arm)
{ {
//Checking if bone is already made. //Checking if bone is already made.

@ -139,7 +139,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob, B
void TransformWriter::add_node_transform_identity(COLLADASW::Node& node) void TransformWriter::add_node_transform_identity(COLLADASW::Node& node)
{ {
float loc[] = {0.0f, 0.0f, 0.0f}, scale[] = {1.0f, 1.0f, 1.0f}, rot[] = {0.0f, 0.0f, 0.0f}; float loc[3] = {0.0f, 0.0f, 0.0f}, scale[3] = {1.0f, 1.0f, 1.0f}, rot[3] = {0.0f, 0.0f, 0.0f};
add_transform(node, loc, rot, scale); add_transform(node, loc, rot, scale);
} }

@ -279,6 +279,7 @@ static void pose_slide_apply_vec3(tPoseSlideOp *pso, tPChanFCurveLink *pfl, floa
FCurve *fcu = (FCurve *)ld->data; FCurve *fcu = (FCurve *)ld->data;
/* just work on these channels one by one... there's no interaction between values */ /* just work on these channels one by one... there's no interaction between values */
BLI_assert(fcu->array_index < 3);
pose_slide_apply_val(pso, fcu, &vec[fcu->array_index]); pose_slide_apply_val(pso, fcu, &vec[fcu->array_index]);
} }

@ -877,7 +877,7 @@ static bool gp_stroke_eraser_is_occluded(tGPsdata *p,
} }
/* eraser tool - check if part of stroke occurs within last segment drawn by eraser */ /* eraser tool - check if part of stroke occurs within last segment drawn by eraser */
static short gp_stroke_eraser_strokeinside(const int mval[], const int UNUSED(mvalo[]), static short gp_stroke_eraser_strokeinside(const int mval[2], const int UNUSED(mvalo[2]),
int rad, int x0, int y0, int x1, int y1) int rad, int x0, int y0, int x1, int y1)
{ {
/* simple within-radius check for now */ /* simple within-radius check for now */
@ -927,7 +927,7 @@ static void gp_point_to_xy(ARegion *ar, View2D *v2d, rctf *subrect, bGPDstroke *
/* eraser tool - evaluation per stroke */ /* eraser tool - evaluation per stroke */
/* TODO: this could really do with some optimization (KD-Tree/BVH?) */ /* TODO: this could really do with some optimization (KD-Tree/BVH?) */
static void gp_stroke_eraser_dostroke(tGPsdata *p, static void gp_stroke_eraser_dostroke(tGPsdata *p,
const int mval[], const int mvalo[], const int mval[2], const int mvalo[2],
short rad, const rcti *rect, bGPDframe *gpf, bGPDstroke *gps) short rad, const rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
{ {
bGPDspoint *pt1, *pt2; bGPDspoint *pt1, *pt2;

@ -188,7 +188,7 @@ gla2DDrawInfo *glaBegin2DDraw(struct rcti *screen_rect, struct rctf *world_rect
void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r); void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r);
/** Translate the \a world point from world coordiantes into screen space. */ /** Translate the \a world point from world coordiantes into screen space. */
void gla2DDrawTranslatePtv(gla2DDrawInfo * di, float world[2], int screen_r[2]); void gla2DDrawTranslatePtv(gla2DDrawInfo *di, float world[2], int screen_r[2]);
/* Restores the previous OpenGL state and free's the auxilary /* Restores the previous OpenGL state and free's the auxilary
* gla data. * gla data.

@ -520,9 +520,9 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y
void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float maxy, float rad, bool use_alpha); void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float maxy, float rad, bool use_alpha);
void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect); void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect);
uiWidgetColors *ui_tooltip_get_theme(void); uiWidgetColors *ui_tooltip_get_theme(void);
void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock * block, rcti * rect); void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock *block, rcti *rect);
void ui_draw_search_back(struct uiStyle *style, uiBlock *block, rcti *rect); void ui_draw_search_back(struct uiStyle *style, uiBlock *block, rcti *rect);
int ui_link_bezier_points(const rcti * rect, float coord_array[][2], int resol); int ui_link_bezier_points(const rcti *rect, float coord_array[][2], int resol);
void ui_draw_link_bezier(const rcti *rect); void ui_draw_link_bezier(const rcti *rect);
extern void ui_draw_but(const struct bContext *C, ARegion *ar, struct uiStyle *style, uiBut *but, rcti *rect); extern void ui_draw_but(const struct bContext *C, ARegion *ar, struct uiStyle *style, uiBut *but, rcti *rect);

@ -125,7 +125,7 @@ void image_undo_restore(struct bContext *C, struct ListBase *lb);
void image_undo_free(struct ListBase *lb); void image_undo_free(struct ListBase *lb);
void imapaint_image_update(struct SpaceImage *sima, struct Image *image, struct ImBuf *ibuf, short texpaint); void imapaint_image_update(struct SpaceImage *sima, struct Image *image, struct ImBuf *ibuf, short texpaint);
struct ImagePaintPartialRedraw *get_imapaintpartial(void); struct ImagePaintPartialRedraw *get_imapaintpartial(void);
void set_imapaintpartial(struct ImagePaintPartialRedraw * ippr); void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr);
void imapaint_clear_partial_redraw(void); void imapaint_clear_partial_redraw(void);
void imapaint_dirty_region(struct Image *ima, struct ImBuf *ibuf, int x, int y, int w, int h); void imapaint_dirty_region(struct Image *ima, struct ImBuf *ibuf, int x, int y, int w, int h);
int get_imapaint_zoom(struct bContext *C, float *zoomx, float *zoomy); int get_imapaint_zoom(struct bContext *C, float *zoomx, float *zoomy);

@ -3456,7 +3456,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob,
free_sculptsession_deformMats(ss); free_sculptsession_deformMats(ss);
ss->orig_cos = (ss->kb) ? BKE_key_convert_to_vertcos(ob, ss->kb) : mesh_getVertexCos(me, NULL); ss->orig_cos = (ss->kb) ? BKE_key_convert_to_vertcos(ob, ss->kb) : BKE_mesh_vertexCos_get(me, NULL);
crazyspace_build_sculpt(scene, ob, &ss->deform_imats, &ss->deform_cos); crazyspace_build_sculpt(scene, ob, &ss->deform_imats, &ss->deform_cos);
BKE_pbvh_apply_vertCos(ss->pbvh, ss->deform_cos); BKE_pbvh_apply_vertCos(ss->pbvh, ss->deform_cos);

@ -135,7 +135,7 @@ void NODE_OT_backimage_sample(struct wmOperatorType *ot);
/* drawnode.c */ /* drawnode.c */
void node_draw_link(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link); void node_draw_link(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link);
void node_draw_link_bezier(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3); void node_draw_link_bezier(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3);
int node_link_bezier_points(struct View2D * v2d, struct SpaceNode * snode, struct bNodeLink * link, float coord_array[][2], int resol); int node_link_bezier_points(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link, float coord_array[][2], int resol);
// void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 ); // void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
void draw_nodespace_back_pix(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode); void draw_nodespace_back_pix(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode);

@ -167,11 +167,11 @@ void sequencer_operatortypes(void);
void sequencer_keymap(struct wmKeyConfig *keyconf); void sequencer_keymap(struct wmKeyConfig *keyconf);
/* sequencer_scope.c */ /* sequencer_scope.c */
struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf); struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf *ibuf);
struct ImBuf *make_sep_waveform_view_from_ibuf(struct ImBuf * ibuf); struct ImBuf *make_sep_waveform_view_from_ibuf(struct ImBuf *ibuf);
struct ImBuf *make_vectorscope_view_from_ibuf(struct ImBuf * ibuf); struct ImBuf *make_vectorscope_view_from_ibuf(struct ImBuf *ibuf);
struct ImBuf *make_zebra_view_from_ibuf(struct ImBuf * ibuf, float perc); struct ImBuf *make_zebra_view_from_ibuf(struct ImBuf *ibuf, float perc);
struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf * ibuf); struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf *ibuf);
/* sequencer_buttons.c */ /* sequencer_buttons.c */
void sequencer_buttons_register(struct ARegionType *art); void sequencer_buttons_register(struct ARegionType *art);

@ -332,7 +332,7 @@ int sculpt_get_first_deform_matrices(Scene *scene, Object *ob, float (**deformma
if (!defmats) { if (!defmats) {
Mesh *me = (Mesh *)ob->data; Mesh *me = (Mesh *)ob->data;
dm = mesh_create_derived(me, ob, NULL); dm = mesh_create_derived(me, ob, NULL);
deformedVerts = mesh_getVertexCos(me, &numVerts); deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts);
defmats = MEM_callocN(sizeof(*defmats) * numVerts, "defmats"); defmats = MEM_callocN(sizeof(*defmats) * numVerts, "defmats");
for (a = 0; a < numVerts; a++) for (a = 0; a < numVerts; a++)
@ -413,7 +413,7 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
int a, numVerts; int a, numVerts;
Mesh *me = (Mesh *)ob->data; Mesh *me = (Mesh *)ob->data;
*deformcos = mesh_getVertexCos(me, &numVerts); *deformcos = BKE_mesh_vertexCos_get(me, &numVerts);
*deformmats = MEM_callocN(sizeof(*(*deformmats)) * numVerts, "defmats"); *deformmats = MEM_callocN(sizeof(*(*deformmats)) * numVerts, "defmats");
for (a = 0; a < numVerts; a++) for (a = 0; a < numVerts; a++)

@ -134,7 +134,7 @@ struct ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y,
*/ */
void IMB_refImBuf(struct ImBuf *ibuf); void IMB_refImBuf(struct ImBuf *ibuf);
struct ImBuf * IMB_makeSingleUser(struct ImBuf *ibuf); struct ImBuf *IMB_makeSingleUser(struct ImBuf *ibuf);
/** /**
* *
@ -213,9 +213,9 @@ typedef enum IMB_Proxy_Size {
} IMB_Proxy_Size; } IMB_Proxy_Size;
/* defaults to BL_proxy within the directory of the animation */ /* defaults to BL_proxy within the directory of the animation */
void IMB_anim_set_index_dir(struct anim * anim, const char * dir); void IMB_anim_set_index_dir(struct anim *anim, const char *dir);
int IMB_anim_index_get_frame_index(struct anim * anim, IMB_Timecode_Type tc, int IMB_anim_index_get_frame_index(struct anim *anim, IMB_Timecode_Type tc,
int position); int position);
struct IndexBuildContext; struct IndexBuildContext;
@ -241,8 +241,8 @@ int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc);
* Return the fps contained in movie files (function rval is FALSE, * Return the fps contained in movie files (function rval is FALSE,
* and frs_sec and frs_sec_base untouched if none available!) * and frs_sec and frs_sec_base untouched if none available!)
*/ */
int IMB_anim_get_fps(struct anim * anim, int IMB_anim_get_fps(struct anim *anim,
short * frs_sec, float * frs_sec_base); short *frs_sec, float *frs_sec_base);
/** /**
* *

@ -70,12 +70,12 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags);
/* targa */ /* targa */
int imb_is_a_targa(unsigned char *buf); int imb_is_a_targa(unsigned char *buf);
struct ImBuf *imb_loadtarga(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); struct ImBuf *imb_loadtarga(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags); int imb_savetarga(struct ImBuf *ibuf, const char *name, int flags);
/* iris */ /* iris */
int imb_is_a_iris(unsigned char *mem); int imb_is_a_iris(unsigned char *mem);
struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
int imb_saveiris(struct ImBuf * ibuf, const char *name, int flags); int imb_saveiris(struct ImBuf *ibuf, const char *name, int flags);
/* jp2 */ /* jp2 */
int imb_is_a_jp2(unsigned char *buf); int imb_is_a_jp2(unsigned char *buf);
@ -85,7 +85,7 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags);
/* jpeg */ /* jpeg */
int imb_is_a_jpeg(unsigned char *mem); int imb_is_a_jpeg(unsigned char *mem);
int imb_savejpeg(struct ImBuf *ibuf, const char *name, int flags); int imb_savejpeg(struct ImBuf *ibuf, const char *name, int flags);
struct ImBuf * imb_load_jpeg (unsigned char * buffer, size_t size, int flags, char colorspace[IM_MAX_SPACE]); struct ImBuf *imb_load_jpeg (unsigned char *buffer, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
/* bmp */ /* bmp */
int imb_is_a_bmp(unsigned char *buf); int imb_is_a_bmp(unsigned char *buf);
@ -109,7 +109,7 @@ int imb_is_dpx(unsigned char *buf);
/* hdr */ /* hdr */
int imb_is_a_hdr(unsigned char *buf); int imb_is_a_hdr(unsigned char *buf);
struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
int imb_savehdr(struct ImBuf * ibuf, const char *name, int flags); int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags);
/* tiff */ /* tiff */
void imb_inittiff(void); void imb_inittiff(void);

@ -81,7 +81,7 @@ typedef struct anim_index_builder {
struct anim_index_entry *entry); struct anim_index_entry *entry);
} anim_index_builder; } anim_index_builder;
anim_index_builder * IMB_index_builder_create(const char * name); anim_index_builder * IMB_index_builder_create(const char *name);
void IMB_index_builder_add_entry( void IMB_index_builder_add_entry(
anim_index_builder * fp, anim_index_builder * fp,
int frameno, unsigned long long seek_pos, int frameno, unsigned long long seek_pos,
@ -96,25 +96,25 @@ void IMB_index_builder_proc_frame(
unsigned long long seek_pos_dts, unsigned long long seek_pos_dts,
unsigned long long pts); unsigned long long pts);
void IMB_index_builder_finish(anim_index_builder * fp, int rollback); void IMB_index_builder_finish(anim_index_builder *fp, int rollback);
struct anim_index *IMB_indexer_open(const char * name); struct anim_index *IMB_indexer_open(const char *name);
unsigned long long IMB_indexer_get_seek_pos( unsigned long long IMB_indexer_get_seek_pos(
struct anim_index *idx, int frameno_index); struct anim_index *idx, int frameno_index);
unsigned long long IMB_indexer_get_seek_pos_dts( unsigned long long IMB_indexer_get_seek_pos_dts(
struct anim_index *idx, int frameno_index); struct anim_index *idx, int frameno_index);
int IMB_indexer_get_frame_index(struct anim_index * idx, int frameno); int IMB_indexer_get_frame_index(struct anim_index *idx, int frameno);
unsigned long long IMB_indexer_get_pts(struct anim_index *idx, unsigned long long IMB_indexer_get_pts(struct anim_index *idx,
int frame_index); int frame_index);
int IMB_indexer_get_duration(struct anim_index * idx); int IMB_indexer_get_duration(struct anim_index *idx);
int IMB_indexer_can_scan(struct anim_index * idx, int IMB_indexer_can_scan(struct anim_index *idx,
int old_frame_index, int new_frame_index); int old_frame_index, int new_frame_index);
void IMB_indexer_close(struct anim_index * idx); void IMB_indexer_close(struct anim_index *idx);
void IMB_free_indices(struct anim * anim); void IMB_free_indices(struct anim *anim);
struct anim *IMB_anim_open_proxy( struct anim *IMB_anim_open_proxy(
struct anim *anim, IMB_Proxy_Size preview_size); struct anim *anim, IMB_Proxy_Size preview_size);

@ -220,7 +220,7 @@ void BlockDXT1::evaluatePalette4(Color32 color_array[4]) const
} }
void BlockDXT1::decodeBlock(ColorBlock * block) const void BlockDXT1::decodeBlock(ColorBlock *block) const
{ {
// Decode color block. // Decode color block.
Color32 color_array[4]; Color32 color_array[4];
@ -235,7 +235,7 @@ void BlockDXT1::decodeBlock(ColorBlock * block) const
} }
} }
void BlockDXT1::decodeBlockNV5x(ColorBlock * block) const void BlockDXT1::decodeBlockNV5x(ColorBlock *block) const
{ {
// Decode color block. // Decode color block.
Color32 color_array[4]; Color32 color_array[4];
@ -277,7 +277,7 @@ inline void BlockDXT1::flip2()
BlockDXT3 BlockDXT3
----------------------------------------------------------------------------*/ ----------------------------------------------------------------------------*/
void BlockDXT3::decodeBlock(ColorBlock * block) const void BlockDXT3::decodeBlock(ColorBlock *block) const
{ {
// Decode color. // Decode color.
color.decodeBlock(block); color.decodeBlock(block);
@ -286,13 +286,13 @@ void BlockDXT3::decodeBlock(ColorBlock * block) const
alpha.decodeBlock(block); alpha.decodeBlock(block);
} }
void BlockDXT3::decodeBlockNV5x(ColorBlock * block) const void BlockDXT3::decodeBlockNV5x(ColorBlock *block) const
{ {
color.decodeBlockNV5x(block); color.decodeBlockNV5x(block);
alpha.decodeBlock(block); alpha.decodeBlock(block);
} }
void AlphaBlockDXT3::decodeBlock(ColorBlock * block) const void AlphaBlockDXT3::decodeBlock(ColorBlock *block) const
{ {
block->color(0x0).a = (alpha0 << 4) | alpha0; block->color(0x0).a = (alpha0 << 4) | alpha0;
block->color(0x1).a = (alpha1 << 4) | alpha1; block->color(0x1).a = (alpha1 << 4) | alpha1;
@ -415,7 +415,7 @@ void AlphaBlockDXT5::setIndex(uint index, uint value)
this->u = (this->u & ~mask) | (uint64(value) << offset); this->u = (this->u & ~mask) | (uint64(value) << offset);
} }
void AlphaBlockDXT5::decodeBlock(ColorBlock * block) const void AlphaBlockDXT5::decodeBlock(ColorBlock *block) const
{ {
uint8 alpha_array[8]; uint8 alpha_array[8];
evaluatePalette(alpha_array); evaluatePalette(alpha_array);
@ -454,7 +454,7 @@ void AlphaBlockDXT5::flip2()
*b = tmp; *b = tmp;
} }
void BlockDXT5::decodeBlock(ColorBlock * block) const void BlockDXT5::decodeBlock(ColorBlock *block) const
{ {
// Decode color. // Decode color.
color.decodeBlock(block); color.decodeBlock(block);
@ -463,7 +463,7 @@ void BlockDXT5::decodeBlock(ColorBlock * block) const
alpha.decodeBlock(block); alpha.decodeBlock(block);
} }
void BlockDXT5::decodeBlockNV5x(ColorBlock * block) const void BlockDXT5::decodeBlockNV5x(ColorBlock *block) const
{ {
// Decode color. // Decode color.
color.decodeBlockNV5x(block); color.decodeBlockNV5x(block);
@ -488,7 +488,7 @@ void BlockDXT5::flip2()
/// Decode ATI1 block. /// Decode ATI1 block.
void BlockATI1::decodeBlock(ColorBlock * block) const void BlockATI1::decodeBlock(ColorBlock *block) const
{ {
uint8 alpha_array[8]; uint8 alpha_array[8];
alpha.evaluatePalette(alpha_array); alpha.evaluatePalette(alpha_array);
@ -517,7 +517,7 @@ void BlockATI1::flip2()
/// Decode ATI2 block. /// Decode ATI2 block.
void BlockATI2::decodeBlock(ColorBlock * block) const void BlockATI2::decodeBlock(ColorBlock *block) const
{ {
uint8 alpha_array[8]; uint8 alpha_array[8];
uint8 index_array[16]; uint8 index_array[16];
@ -580,7 +580,7 @@ void BlockCTX1::evaluatePalette(Color32 color_array[4]) const
color_array[3].a = 0xFF; color_array[3].a = 0xFF;
} }
void BlockCTX1::decodeBlock(ColorBlock * block) const void BlockCTX1::decodeBlock(ColorBlock *block) const
{ {
// Decode color block. // Decode color block.
Color32 color_array[4]; Color32 color_array[4];

@ -57,7 +57,7 @@ ColorBlock::ColorBlock()
} }
/// Init the color block from an array of colors. /// Init the color block from an array of colors.
ColorBlock::ColorBlock(const uint * linearImage) ColorBlock::ColorBlock(const uint *linearImage)
{ {
for (uint i = 0; i < 16; i++) { for (uint i = 0; i < 16; i++) {
color(i) = Color32(linearImage[i]); color(i) = Color32(linearImage[i]);
@ -74,17 +74,17 @@ ColorBlock::ColorBlock(const ColorBlock & block)
/// Initialize this color block. /// Initialize this color block.
ColorBlock::ColorBlock(const Image * img, uint x, uint y) ColorBlock::ColorBlock(const Image *img, uint x, uint y)
{ {
init(img, x, y); init(img, x, y);
} }
void ColorBlock::init(const Image * img, uint x, uint y) void ColorBlock::init(const Image *img, uint x, uint y)
{ {
init(img->width(), img->height(), (const uint *)img->pixels(), x, y); init(img->width(), img->height(), (const uint *)img->pixels(), x, y);
} }
void ColorBlock::init(uint w, uint h, const uint * data, uint x, uint y) void ColorBlock::init(uint w, uint h, const uint *data, uint x, uint y)
{ {
const uint bw = min(w - x, 4U); const uint bw = min(w - x, 4U);
const uint bh = min(h - y, 4U); const uint bh = min(h - y, 4U);
@ -105,7 +105,7 @@ void ColorBlock::init(uint w, uint h, const uint * data, uint x, uint y)
} }
} }
void ColorBlock::init(uint w, uint h, const float * data, uint x, uint y) void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y)
{ {
const uint bw = min(w - x, 4U); const uint bw = min(w - x, 4U);
const uint bh = min(h - y, 4U); const uint bh = min(h - y, 4U);
@ -245,7 +245,7 @@ bool ColorBlock::hasAlpha() const
#if 0 #if 0
/// Get diameter color range. /// Get diameter color range.
void ColorBlock::diameterRange(Color32 * start, Color32 * end) const void ColorBlock::diameterRange(Color32 *start, Color32 *end) const
{ {
Color32 c0, c1; Color32 c0, c1;
uint best_dist = 0; uint best_dist = 0;
@ -266,7 +266,7 @@ void ColorBlock::diameterRange(Color32 * start, Color32 * end) const
} }
/// Get luminance color range. /// Get luminance color range.
void ColorBlock::luminanceRange(Color32 * start, Color32 * end) const void ColorBlock::luminanceRange(Color32 *start, Color32 *end) const
{ {
Color32 minColor, maxColor; Color32 minColor, maxColor;
uint minLuminance, maxLuminance; uint minLuminance, maxLuminance;
@ -292,7 +292,7 @@ void ColorBlock::luminanceRange(Color32 * start, Color32 * end) const
} }
/// Get color range based on the bounding box. /// Get color range based on the bounding box.
void ColorBlock::boundsRange(Color32 * start, Color32 * end) const void ColorBlock::boundsRange(Color32 *start, Color32 *end) const
{ {
Color32 minColor(255, 255, 255); Color32 minColor(255, 255, 255);
Color32 maxColor(0, 0, 0); Color32 maxColor(0, 0, 0);
@ -326,7 +326,7 @@ void ColorBlock::boundsRange(Color32 * start, Color32 * end) const
} }
/// Get color range based on the bounding box. /// Get color range based on the bounding box.
void ColorBlock::boundsRangeAlpha(Color32 * start, Color32 * end) const void ColorBlock::boundsRangeAlpha(Color32 *start, Color32 *end) const
{ {
Color32 minColor(255, 255, 255, 255); Color32 minColor(255, 255, 255, 255);
Color32 maxColor(0, 0, 0, 0); Color32 maxColor(0, 0, 0, 0);
@ -387,7 +387,7 @@ void ColorBlock::sortColorsByAbsoluteValue()
/*/// Find extreme colors in the given axis. /*/// Find extreme colors in the given axis.
void ColorBlock::computeRange(Vector3::Arg axis, Color32 * start, Color32 * end) const void ColorBlock::computeRange(Vector3::Arg axis, Color32 *start, Color32 *end) const
{ {
int mini, maxi; int mini, maxi;

@ -47,7 +47,7 @@ extern "C" {
#include "IMB_colormanagement.h" #include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h" #include "IMB_colormanagement_intern.h"
int imb_save_dds(struct ImBuf * ibuf, const char *name, int flags) int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags)
{ {
return(0); /* todo: finish this function */ return(0); /* todo: finish this function */
@ -85,7 +85,7 @@ int imb_is_a_dds(unsigned char *mem) // note: use at most first 32 bytes
struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE])
{ {
struct ImBuf * ibuf = 0; struct ImBuf *ibuf = NULL;
DirectDrawSurface dds(mem, size); /* reads header */ DirectDrawSurface dds(mem, size); /* reads header */
unsigned char bits_per_pixel; unsigned char bits_per_pixel;
unsigned int *rect; unsigned int *rect;

@ -64,12 +64,12 @@ typedef struct {
#include "mathutils_geometry.h" #include "mathutils_geometry.h"
#include "mathutils_noise.h" #include "mathutils_noise.h"
PyObject *BaseMathObject_owner_get(BaseMathObject * self, void *); PyObject *BaseMathObject_owner_get(BaseMathObject *self, void *);
PyObject *BaseMathObject_is_wrapped_get(BaseMathObject *self, void *); PyObject *BaseMathObject_is_wrapped_get(BaseMathObject *self, void *);
int BaseMathObject_traverse(BaseMathObject *self, visitproc visit, void *arg); int BaseMathObject_traverse(BaseMathObject *self, visitproc visit, void *arg);
int BaseMathObject_clear(BaseMathObject *self); int BaseMathObject_clear(BaseMathObject *self);
void BaseMathObject_dealloc(BaseMathObject * self); void BaseMathObject_dealloc(BaseMathObject *self);
PyMODINIT_FUNC PyInit_mathutils(void); PyMODINIT_FUNC PyInit_mathutils(void);

@ -218,7 +218,7 @@ static NSString *stringWithCodecType(int codecType)
return [NSString stringWithCString:str encoding:NSASCIIStringEncoding]; return [NSString stringWithCString:str encoding:NSASCIIStringEncoding];
} }
void makeqtstring (RenderData *rd, char *string) void makeqtstring(RenderData *rd, char *string)
{ {
char txt[64]; char txt[64];

@ -78,7 +78,7 @@ void quicktime_exit(void)
} }
int anim_is_quicktime (const char *name) int anim_is_quicktime(const char *name)
{ {
NSAutoreleasePool *pool; NSAutoreleasePool *pool;
@ -119,7 +119,7 @@ int anim_is_quicktime (const char *name)
} }
void free_anim_quicktime (struct anim *anim) void free_anim_quicktime(struct anim *anim)
{ {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@ -143,7 +143,7 @@ void free_anim_quicktime (struct anim *anim)
[pool drain]; [pool drain];
} }
static ImBuf * nsImageToiBuf(NSImage *sourceImage, int width, int height) static ImBuf *nsImageToiBuf(NSImage *sourceImage, int width, int height)
{ {
ImBuf *ibuf = NULL; ImBuf *ibuf = NULL;
uchar *rasterRGB = NULL; uchar *rasterRGB = NULL;
@ -260,7 +260,7 @@ static ImBuf * nsImageToiBuf(NSImage *sourceImage, int width, int height)
return ibuf; return ibuf;
} }
ImBuf * qtime_fetchibuf (struct anim *anim, int position) ImBuf *qtime_fetchibuf (struct anim *anim, int position)
{ {
NSImage *frameImage; NSImage *frameImage;
QTTime time; QTTime time;
@ -299,7 +299,7 @@ ImBuf * qtime_fetchibuf (struct anim *anim, int position)
} }
int startquicktime (struct anim *anim) int startquicktime(struct anim *anim)
{ {
NSAutoreleasePool *pool; NSAutoreleasePool *pool;
NSArray* videoTracks; NSArray* videoTracks;
@ -390,7 +390,7 @@ int startquicktime (struct anim *anim)
return 0; return 0;
} }
int imb_is_a_quicktime (char *name) int imb_is_a_quicktime(char *name)
{ {
NSImage *image; NSImage *image;
int result; int result;

@ -64,14 +64,14 @@ char *get_valid_qtname(const char *name);
/* quicktime movie import functions */ /* quicktime movie import functions */
int anim_is_quicktime (const char *name); int anim_is_quicktime(const char *name);
int startquicktime (struct anim *anim); int startquicktime(struct anim *anim);
void free_anim_quicktime (struct anim *anim); void free_anim_quicktime(struct anim *anim);
ImBuf *qtime_fetchibuf (struct anim *anim, int position); ImBuf *qtime_fetchibuf(struct anim *anim, int position);
/* quicktime image import functions */ /* quicktime image import functions */
int imb_is_a_quicktime (char *name); int imb_is_a_quicktime(char *name);
ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags); ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags);
#endif /* __QUICKTIME_IMPORT_H__ */ #endif /* __QUICKTIME_IMPORT_H__ */

@ -165,9 +165,9 @@ int RE_RenderInProgress(struct Render *re);
void RE_InitRenderCB(struct Render *re); void RE_InitRenderCB(struct Render *re);
/* use free render as signal to do everything over (previews) */ /* use free render as signal to do everything over (previews) */
void RE_FreeRender (struct Render *re); void RE_FreeRender(struct Render *re);
/* only called on exit */ /* only called on exit */
void RE_FreeAllRender (void); void RE_FreeAllRender(void);
/* only call on file load */ /* only call on file load */
void RE_FreeAllRenderResults(void); void RE_FreeAllRenderResults(void);
/* for external render engines that can keep persistent data */ /* for external render engines that can keep persistent data */
@ -187,22 +187,22 @@ struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name)
float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype); float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype);
/* obligatory initialize call, disprect is optional */ /* obligatory initialize call, disprect is optional */
void RE_InitState (struct Render *re, struct Render *source, struct RenderData *rd, struct SceneRenderLayer *srl, int winx, int winy, rcti *disprect); void RE_InitState(struct Render *re, struct Render *source, struct RenderData *rd, struct SceneRenderLayer *srl, int winx, int winy, rcti *disprect);
/* set up the viewplane/perspective matrix, three choices */ /* set up the viewplane/perspective matrix, three choices */
struct Object *RE_GetCamera(struct Render *re); /* return camera override if set */ struct Object *RE_GetCamera(struct Render *re); /* return camera override if set */
void RE_SetCamera(struct Render *re, struct Object *camera); void RE_SetCamera(struct Render *re, struct Object *camera);
void RE_SetEnvmapCamera(struct Render *re, struct Object *cam_ob, float viewscale, float clipsta, float clipend); void RE_SetEnvmapCamera(struct Render *re, struct Object *cam_ob, float viewscale, float clipsta, float clipend);
void RE_SetWindow (struct Render *re, rctf *viewplane, float clipsta, float clipend); void RE_SetWindow(struct Render *re, rctf *viewplane, float clipsta, float clipend);
void RE_SetOrtho (struct Render *re, rctf *viewplane, float clipsta, float clipend); void RE_SetOrtho(struct Render *re, rctf *viewplane, float clipsta, float clipend);
void RE_SetPixelSize(struct Render *re, float pixsize); void RE_SetPixelSize(struct Render *re, float pixsize);
/* option to set viewmatrix before making dbase */ /* option to set viewmatrix before making dbase */
void RE_SetView (struct Render *re, float mat[4][4]); void RE_SetView(struct Render *re, float mat[4][4]);
/* make or free the dbase */ /* make or free the dbase */
void RE_Database_FromScene(struct Render *re, struct Main *bmain, struct Scene *scene, unsigned int lay, int use_camera_view); void RE_Database_FromScene(struct Render *re, struct Main *bmain, struct Scene *scene, unsigned int lay, int use_camera_view);
void RE_Database_Free (struct Render *re); void RE_Database_Free(struct Render *re);
/* project dbase again, when viewplane/perspective changed */ /* project dbase again, when viewplane/perspective changed */
void RE_DataBase_ApplyWindow(struct Render *re); void RE_DataBase_ApplyWindow(struct Render *re);

@ -50,7 +50,7 @@ typedef struct RayCounter {
} RayCounter; } RayCounter;
#define RE_RC_INIT(isec, shi) (isec).raycounter = &((shi).shading.raycounter) #define RE_RC_INIT(isec, shi) (isec).raycounter = &((shi).shading.raycounter)
void RE_RC_INFO (RayCounter *rc); void RE_RC_INFO(RayCounter *rc);
void RE_RC_MERGE(RayCounter *rc, RayCounter *tmp); void RE_RC_MERGE(RayCounter *rc, RayCounter *tmp);
#define RE_RC_COUNT(var) (var)++ #define RE_RC_COUNT(var) (var)++

@ -55,10 +55,10 @@ int testclip(const float v[3]);
void zbuffer_shadow(struct Render *re, float winmat[4][4], struct LampRen *lar, int *rectz, int size, float jitx, float jity); void zbuffer_shadow(struct Render *re, float winmat[4][4], struct LampRen *lar, int *rectz, int size, float jitx, float jity);
void zbuffer_abuf_shadow(struct Render *re, struct LampRen *lar, float winmat[4][4], struct APixstr *APixbuf, struct APixstrand *apixbuf, struct ListBase *apsmbase, int size, int samples, float (*jit)[2]); void zbuffer_abuf_shadow(struct Render *re, struct LampRen *lar, float winmat[4][4], struct APixstr *APixbuf, struct APixstrand *apixbuf, struct ListBase *apsmbase, int size, int samples, float (*jit)[2]);
void zbuffer_solid(struct RenderPart *pa, struct RenderLayer *rl, void (*fillfunc)(struct RenderPart *, struct ZSpan *, int, void*), void *data); void zbuffer_solid(struct RenderPart *pa, struct RenderLayer *rl, void (*fillfunc)(struct RenderPart *, struct ZSpan *, int, void *), void *data);
unsigned short *zbuffer_transp_shade(struct RenderPart *pa, struct RenderLayer *rl, float *pass, struct ListBase *psmlist); unsigned short *zbuffer_transp_shade(struct RenderPart *pa, struct RenderLayer *rl, float *pass, struct ListBase *psmlist);
void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void*, int, int, int, int, int)); void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void *, int, int, int, int, int));
int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct APixstrand *apixbuf, struct ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[4][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, struct StrandShadeCache *cache); int zbuffer_strands_abuf(struct Render *re, struct RenderPart *pa, struct APixstrand *apixbuf, struct ListBase *apsmbase, unsigned int lay, int negzmask, float winmat[4][4], int winx, int winy, int sample, float (*jit)[2], float clipcrop, int shadow, struct StrandShadeCache *cache);
typedef struct APixstr { typedef struct APixstr {

@ -44,7 +44,7 @@ static int RE_rayobject_blibvh_intersect(RayObject *o, Isect *isec);
static void RE_rayobject_blibvh_add(RayObject *o, RayObject *ob); static void RE_rayobject_blibvh_add(RayObject *o, RayObject *ob);
static void RE_rayobject_blibvh_done(RayObject *o); static void RE_rayobject_blibvh_done(RayObject *o);
static void RE_rayobject_blibvh_free(RayObject *o); static void RE_rayobject_blibvh_free(RayObject *o);
static void RE_rayobject_blibvh_bb(RayObject * o, float min[3], float max[3]); static void RE_rayobject_blibvh_bb(RayObject *o, float min[3], float max[3]);
static float RE_rayobject_blibvh_cost(RayObject *UNUSED(o)) static float RE_rayobject_blibvh_cost(RayObject *UNUSED(o))
{ {

@ -517,68 +517,68 @@ typedef struct {
/* interface */ /* interface */
#include "mikktspace.h" #include "mikktspace.h"
static int GetNumFaces(const SMikkTSpaceContext * pContext) static int GetNumFaces(const SMikkTSpaceContext *pContext)
{ {
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
return pMesh->obr->totvlak; return pMesh->obr->totvlak;
} }
static int GetNumVertsOfFace(const SMikkTSpaceContext * pContext, const int face_num) static int GetNumVertsOfFace(const SMikkTSpaceContext *pContext, const int face_num)
{ {
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num);
return vlr->v4!=NULL ? 4 : 3; return vlr->v4!=NULL ? 4 : 3;
} }
static void GetPosition(const SMikkTSpaceContext * pContext, float fPos[], const int face_num, const int vert_index) static void GetPosition(const SMikkTSpaceContext *pContext, float r_co[3], const int face_num, const int vert_index)
{ {
//assert(vert_index>=0 && vert_index<4); //assert(vert_index>=0 && vert_index<4);
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num);
const float *co= (&vlr->v1)[vert_index]->co; const float *co = (&vlr->v1)[vert_index]->co;
copy_v3_v3(fPos, co); copy_v3_v3(r_co, co);
} }
static void GetTextureCoordinate(const SMikkTSpaceContext * pContext, float fUV[], const int face_num, const int vert_index) static void GetTextureCoordinate(const SMikkTSpaceContext *pContext, float r_uv[2], const int face_num, const int vert_index)
{ {
//assert(vert_index>=0 && vert_index<4); //assert(vert_index>=0 && vert_index<4);
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num);
MTFace *tface= RE_vlakren_get_tface(pMesh->obr, vlr, pMesh->obr->actmtface, NULL, 0); MTFace *tface= RE_vlakren_get_tface(pMesh->obr, vlr, pMesh->obr->actmtface, NULL, 0);
const float *coord; const float *coord;
if (tface != NULL) { if (tface != NULL) {
coord= tface->uv[vert_index]; coord= tface->uv[vert_index];
fUV[0]= coord[0]; fUV[1]= coord[1]; copy_v2_v2(r_uv, coord);
} }
else if ((coord= (&vlr->v1)[vert_index]->orco)) { else if ((coord = (&vlr->v1)[vert_index]->orco)) {
map_to_sphere(&fUV[0], &fUV[1], coord[0], coord[1], coord[2]); map_to_sphere(&r_uv[0], &r_uv[1], coord[0], coord[1], coord[2]);
} }
else { /* else we get un-initialized value, 0.0 ok default? */ else { /* else we get un-initialized value, 0.0 ok default? */
fUV[0]= fUV[1]= 0.0f; zero_v2(r_uv);
} }
} }
static void GetNormal(const SMikkTSpaceContext * pContext, float fNorm[], const int face_num, const int vert_index) static void GetNormal(const SMikkTSpaceContext *pContext, float r_no[3], const int face_num, const int vert_index)
{ {
//assert(vert_index>=0 && vert_index<4); //assert(vert_index>=0 && vert_index<4);
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num);
if (vlr->flag & ME_SMOOTH) { if (vlr->flag & ME_SMOOTH) {
const float *n = (&vlr->v1)[vert_index]->n; const float *n = (&vlr->v1)[vert_index]->n;
copy_v3_v3(fNorm, n); copy_v3_v3(r_no, n);
} }
else { else {
negate_v3_v3(fNorm, vlr->n); negate_v3_v3(r_no, vlr->n);
} }
} }
static void SetTSpace(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fSign, const int face_num, const int iVert) static void SetTSpace(const SMikkTSpaceContext *pContext, const float fvTangent[3], const float fSign, const int face_num, const int iVert)
{ {
//assert(vert_index>=0 && vert_index<4); //assert(vert_index>=0 && vert_index<4);
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData; SRenderMeshToTangent *pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num); VlakRen *vlr = RE_findOrAddVlak(pMesh->obr, face_num);
float * ftang= RE_vlakren_get_nmap_tangent(pMesh->obr, vlr, 1); float *ftang = RE_vlakren_get_nmap_tangent(pMesh->obr, vlr, 1);
if (ftang!=NULL) { if (ftang!=NULL) {
copy_v3_v3(&ftang[iVert*4+0], fvTangent); copy_v3_v3(&ftang[iVert*4+0], fvTangent);
ftang[iVert*4+3]=fSign; ftang[iVert*4+3]=fSign;

@ -1532,7 +1532,7 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen
return in; return in;
} }
static void texco_mapping(ShadeInput* shi, Tex* tex, MTex* mtex, static void texco_mapping(ShadeInput *shi, Tex *tex, MTex *mtex,
const float co[3], const float dx[3], const float dy[3], float texvec[3], float dxt[3], float dyt[3]) const float co[3], const float dx[3], const float dy[3], float texvec[3], float dxt[3], float dyt[3])
{ {
/* new: first swap coords, then map, then trans/scale */ /* new: first swap coords, then map, then trans/scale */

@ -2062,7 +2062,7 @@ static void zmask_rect(int *rectz, int *rectp, int xs, int ys, int neg)
/* ***************** ZBUFFER MAIN ROUTINES **************** */ /* ***************** ZBUFFER MAIN ROUTINES **************** */
void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*, ZSpan*, int, void*), void *data) void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart *, ZSpan *, int, void *), void *data)
{ {
ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE]; ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE];
ZSpan zspans[16], *zspan; /* 16 = RE_MAX_OSA */ ZSpan zspans[16], *zspan; /* 16 = RE_MAX_OSA */
@ -2531,7 +2531,7 @@ static void zbuffill_sss(ZSpan *zspan, int obi, int zvlnr,
} }
} }
void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void*, int, int, int, int, int)) void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(void *, int, int, int, int, int))
{ {
ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE]; ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE];
ZSpan zspan; ZSpan zspan;

@ -193,7 +193,7 @@ int WM_operator_winactive (struct bContext *C);
/* invoke callback, exec + redo popup */ /* invoke callback, exec + redo popup */
int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
int WM_operator_props_popup (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_operator_props_popup (struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
int WM_operator_props_dialog_popup (struct bContext *C, struct wmOperator *op, int width, int height); int WM_operator_props_dialog_popup(struct bContext *C, struct wmOperator *op, int width, int height);
int WM_operator_redo_popup (struct bContext *C, struct wmOperator *op); int WM_operator_redo_popup (struct bContext *C, struct wmOperator *op);
int WM_operator_ui_popup (struct bContext *C, struct wmOperator *op, int width, int height); int WM_operator_ui_popup (struct bContext *C, struct wmOperator *op, int width, int height);

@ -189,7 +189,7 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen
void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype) {} void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype) {}
char stipple_quarttone[1]; //GLubyte stipple_quarttone[128] char stipple_quarttone[1]; //GLubyte stipple_quarttone[128]
double elbeemEstimateMemreq(int res, float sx, float sy, float sz, int refine, char *retstr) {return 0.0f;} double elbeemEstimateMemreq(int res, float sx, float sy, float sz, int refine, char *retstr) {return 0.0f;}
struct Render *RE_NewRender(const char *name) {return (struct Render*) NULL;} struct Render *RE_NewRender(const char *name) {return (struct Render *) NULL;}
void RE_SwapResult(struct Render *re, struct RenderResult **rr) {} void RE_SwapResult(struct Render *re, struct RenderResult **rr) {}
void RE_BlenderFrame(struct Render *re, struct Scene *scene, int frame) {} void RE_BlenderFrame(struct Render *re, struct Scene *scene, int frame) {}
int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]) { return 0; } int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]) { return 0; }
@ -239,7 +239,7 @@ void UI_view2d_view_to_region(struct View2D *v2d, float x, float y, int *regionx
void UI_view2d_to_region_no_clip(struct View2D *v2d, float x, float y, int *regionx, int *region_y) {} void UI_view2d_to_region_no_clip(struct View2D *v2d, float x, float y, int *regionx, int *region_y) {}
struct EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, struct EditBone *ebo) {return (struct EditBone *) NULL;} struct EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, struct EditBone *ebo) {return (struct EditBone *) NULL;}
struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, char *name) {return (struct EditBone*) NULL;} struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, char *name) {return (struct EditBone *) NULL;}
struct ListBase *get_active_constraints (struct Object *ob) {return (struct ListBase *) NULL;} struct ListBase *get_active_constraints (struct Object *ob) {return (struct ListBase *) NULL;}
struct ListBase *get_constraint_lb(struct Object *ob, struct bConstraint *con, struct bPoseChannel **pchan_r) {return (struct ListBase *) NULL;} struct ListBase *get_constraint_lb(struct Object *ob, struct bConstraint *con, struct bPoseChannel **pchan_r) {return (struct ListBase *) NULL;}
int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan) {return 0;} int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan) {return 0;}
@ -517,8 +517,8 @@ void WM_operator_properties_free(struct PointerRNA *ptr) {}
void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring) {} void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring) {}
void WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperatorType *ot) {} void WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperatorType *ot) {}
void WM_operator_properties_sanitize(struct PointerRNA *ptr, const short no_context) {}; void WM_operator_properties_sanitize(struct PointerRNA *ptr, const short no_context) {};
void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType*, void *), void *userdata) {} void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata) {}
void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType*, void *), void *userdata) {} void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata) {}
void WM_operator_bl_idname(char *to, const char *from) {} void WM_operator_bl_idname(char *to, const char *from) {}
void WM_operator_py_idname(char *to, const char *from) {} void WM_operator_py_idname(char *to, const char *from) {}
void WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width, int height) {} void WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width, int height) {}

@ -248,7 +248,7 @@ void KX_BlenderCanvas::SetMousePosition(int x,int y)
void KX_BlenderCanvas::MakeScreenShot(const char* filename) void KX_BlenderCanvas::MakeScreenShot(const char *filename)
{ {
ScrArea area_dummy= {0}; ScrArea area_dummy= {0};
area_dummy.totrct.xmin = m_frame_rect.GetLeft(); area_dummy.totrct.xmin = m_frame_rect.GetLeft();

@ -190,7 +190,7 @@ void BL_print_game_line(int fontid, const char *text, int size, int dpi, float *
BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT); BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
} }
void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height) void BL_print_gamedebug_line(const char *text, int xco, int yco, int width, int height)
{ {
/* gl prepping */ /* gl prepping */
DisableForText(); DisableForText();
@ -219,7 +219,7 @@ void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
} }
void BL_print_gamedebug_line_padded(const char* text, int xco, int yco, int width, int height) void BL_print_gamedebug_line_padded(const char *text, int xco, int yco, int width, int height)
{ {
/* This is a rather important line :( The gl-mode hasn't been left /* This is a rather important line :( The gl-mode hasn't been left
* behind quite as neatly as we'd have wanted to. I don't know * behind quite as neatly as we'd have wanted to. I don't know
@ -296,7 +296,7 @@ static unsigned int *screenshot(ScrArea *curarea, int *dumpsx, int *dumpsy)
} }
/* based on screendump.c::screenshot_exec */ /* based on screendump.c::screenshot_exec */
void BL_MakeScreenShot(ScrArea *curarea, const char* filename) void BL_MakeScreenShot(ScrArea *curarea, const char *filename)
{ {
char path[MAX_FILE_LENGTH]; char path[MAX_FILE_LENGTH];
strcpy(path,filename); strcpy(path,filename);

@ -44,7 +44,7 @@ void BL_SwapBuffers(struct wmWindow *win);
void BL_warp_pointer(struct wmWindow *win,int x,int y); void BL_warp_pointer(struct wmWindow *win,int x,int y);
void BL_MakeScreenShot(struct ScrArea *curarea, const char* filename); void BL_MakeScreenShot(struct ScrArea *curarea, const char *filename);
void BL_HideMouse(struct wmWindow *win); void BL_HideMouse(struct wmWindow *win);
void BL_NormalMouse(struct wmWindow *win); void BL_NormalMouse(struct wmWindow *win);

@ -154,7 +154,7 @@ void KX_BlenderRenderTools::SetClientObject(RAS_IRasterizer *rasty, void* obj)
} }
} }
bool KX_BlenderRenderTools::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data) bool KX_BlenderRenderTools::RayHit(KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
{ {
double* const oglmatrix = (double* const) data; double* const oglmatrix = (double* const) data;
MT_Point3 resultpoint(result->m_hitPoint); MT_Point3 resultpoint(result->m_hitPoint);

@ -59,7 +59,7 @@ extern "C" {
#include "RNA_define.h" #include "RNA_define.h"
} }
BL_ActionActuator::BL_ActionActuator(SCA_IObject* gameobj, BL_ActionActuator::BL_ActionActuator(SCA_IObject *gameobj,
const STR_String& propname, const STR_String& propname,
const STR_String& framepropname, const STR_String& framepropname,
float starttime, float starttime,

@ -50,7 +50,7 @@ CEmptyValue::~CEmptyValue()
CValue * CEmptyValue::Calc(VALUE_OPERATOR op, CValue * val) CValue *CEmptyValue::Calc(VALUE_OPERATOR op, CValue *val)
/* /*
* pre: * pre:
* ret: a new object containing the result of applying operator op to this * ret: a new object containing the result of applying operator op to this
@ -63,7 +63,7 @@ CValue * CEmptyValue::Calc(VALUE_OPERATOR op, CValue * val)
CValue * CEmptyValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue * val) CValue * CEmptyValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val)
/* /*
* pre: the type of val is dtype * pre: the type of val is dtype
* ret: a new object containing the result of applying operator op to val and * ret: a new object containing the result of applying operator op to val and

@ -32,7 +32,7 @@
#include "KX_HashedPtr.h" #include "KX_HashedPtr.h"
unsigned int KX_Hash(void * inDWord) unsigned int KX_Hash(void *inDWord)
{ {
#if defined(_WIN64) && !defined(FREE_WINDOWS64) #if defined(_WIN64) && !defined(FREE_WINDOWS64)
unsigned __int64 key = (unsigned __int64)inDWord; unsigned __int64 key = (unsigned __int64)inDWord;

@ -36,7 +36,7 @@
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
#endif #endif
unsigned int KX_Hash(void * inDWord); unsigned int KX_Hash(void *inDWord);
class CHashedPtr class CHashedPtr
{ {

@ -123,7 +123,7 @@ void CListValue::ReleaseAndRemoveAll()
CValue* CListValue::FindValue(const STR_String & name) CValue* CListValue::FindValue(const STR_String &name)
{ {
for (int i=0; i < GetCount(); i++) for (int i=0; i < GetCount(); i++)
if (GetValue(i)->GetName() == name) if (GetValue(i)->GetName() == name)
@ -132,7 +132,7 @@ CValue* CListValue::FindValue(const STR_String & name)
return NULL; return NULL;
} }
CValue* CListValue::FindValue(const char * name) CValue* CListValue::FindValue(const char *name)
{ {
for (int i=0; i < GetCount(); i++) for (int i=0; i < GetCount(); i++)
if (GetValue(i)->GetName() == name) if (GetValue(i)->GetName() == name)

@ -31,7 +31,7 @@ effect: constucts an empty COperator1Expr
m_lhs = NULL; m_lhs = NULL;
} }
COperator1Expr::COperator1Expr(VALUE_OPERATOR op, CExpression * lhs) COperator1Expr::COperator1Expr(VALUE_OPERATOR op, CExpression *lhs)
/* /*
pre: pre:
effect: constucts a COperator1Expr with op and lhs in it effect: constucts a COperator1Expr with op and lhs in it

@ -531,7 +531,7 @@ PyAttributeDef CValue::Attributes[] = {
{ NULL } //Sentinel { NULL } //Sentinel
}; };
PyObject *CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF *attrdef) PyObject *CValue::pyattr_get_name(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
CValue * self = static_cast<CValue *> (self_v); CValue * self = static_cast<CValue *> (self_v);
return PyUnicode_From_STR_String(self->GetName()); return PyUnicode_From_STR_String(self->GetName());

@ -47,7 +47,7 @@ CVectorValue::CVectorValue(float x,float y,float z, AllocationTYPE alloctype)
m_vec[KX_Z] = m_transformedvec[KX_Z] = z; m_vec[KX_Z] = m_transformedvec[KX_Z] = z;
} }
CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctype) CVectorValue::CVectorValue(double vec[3], const char *name,AllocationTYPE alloctype)
{ {
SetCustomFlag1(false);//FancyOutput=false; SetCustomFlag1(false);//FancyOutput=false;
@ -65,7 +65,7 @@ CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctyp
SetName(name); SetName(name);
} }
CVectorValue::CVectorValue(double vec[],AllocationTYPE alloctype) CVectorValue::CVectorValue(double vec[3], AllocationTYPE alloctype)
{ {
SetCustomFlag1(false);//FancyOutput=false; SetCustomFlag1(false);//FancyOutput=false;

@ -45,10 +45,10 @@ public:
CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val); CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
CVectorValue(double vec[],const char *name,AllocationTYPE alloctype=CValue::HEAPVALUE); CVectorValue(double vec[3], const char *name,AllocationTYPE alloctype=CValue::HEAPVALUE);
CVectorValue() {}; CVectorValue() {};
CVectorValue(double vec[],AllocationTYPE alloctype=CValue::HEAPVALUE); CVectorValue(double vec[3], AllocationTYPE alloctype=CValue::HEAPVALUE);
CVectorValue(float x,float y,float z, AllocationTYPE alloctype = CValue::HEAPVALUE); CVectorValue(float x,float y,float z, AllocationTYPE alloctype = CValue::HEAPVALUE);
virtual ~CVectorValue(); virtual ~CVectorValue();
//virtual bool ExportT3D(File *txtfile,bool bNoName=false); //virtual bool ExportT3D(File *txtfile,bool bNoName=false);

@ -163,7 +163,7 @@ void GPC_RenderTools::SetClientObject(RAS_IRasterizer *rasty, void* obj)
} }
} }
bool GPC_RenderTools::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data) bool GPC_RenderTools::RayHit(KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
{ {
double* const oglmatrix = (double* const) data; double* const oglmatrix = (double* const) data;
MT_Point3 resultpoint(result->m_hitPoint); MT_Point3 resultpoint(result->m_hitPoint);

@ -43,7 +43,7 @@
* detects if an image buffer contains a bitmap font. It makes the * detects if an image buffer contains a bitmap font. It makes the
* specific bitmap data which is stored in the bitmap invisible to blender. * specific bitmap data which is stored in the bitmap invisible to blender.
* *
* void matrixGlyph(ImBuf * ibuf, unsigned short unicode, *float x 7) * void matrixGlyph(ImBuf *ibuf, unsigned short unicode, *float x 7)
* returns all the information about the character (unicode) in the floats * returns all the information about the character (unicode) in the floats
* *
* Room for improvement: * Room for improvement:
@ -62,8 +62,8 @@
#include "BKE_bmfont.h" #include "BKE_bmfont.h"
#include "BKE_bmfont_types.h" #include "BKE_bmfont_types.h"
/*MAART: #if 0
void printfGlyph(bmGlyph * glyph) void printfGlyph(bmGlyph *glyph)
{ {
printf("unicode: %d '%c'\n", glyph->unicode, glyph->unicode); printf("unicode: %d '%c'\n", glyph->unicode, glyph->unicode);
printf(" locx: %4d locy: %4d\n", glyph->locx, glyph->locy); printf(" locx: %4d locy: %4d\n", glyph->locx, glyph->locy);
@ -71,9 +71,9 @@ void printfGlyph(bmGlyph * glyph)
printf(" ofsx: %3d ofsy: %3d\n", glyph->ofsx, glyph->ofsy); printf(" ofsx: %3d ofsy: %3d\n", glyph->ofsx, glyph->ofsy);
printf(" advan: %3d reser: %3d\n", glyph->advance, glyph->reserved); printf(" advan: %3d reser: %3d\n", glyph->advance, glyph->reserved);
} }
*/ #endif
void calcAlpha(ImBuf * ibuf) void calcAlpha(ImBuf *ibuf)
{ {
int i; int i;
char * rect; char * rect;
@ -87,7 +87,7 @@ void calcAlpha(ImBuf * ibuf)
} }
} }
void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step) void readBitmapFontVersion0(ImBuf *ibuf, unsigned char *rect, int step)
{ {
int glyphcount, bytes, i, index, linelength, ysize; int glyphcount, bytes, i, index, linelength, ysize;
unsigned char * buffer; unsigned char * buffer;
@ -253,7 +253,7 @@ int locateGlyph(bmFont *bmfont, unsigned short unicode)
return(current); return(current);
} }
void matrixGlyph(ImBuf * ibuf, unsigned short unicode, void matrixGlyph(ImBuf *ibuf, unsigned short unicode,
float *centerx, float *centery, float *centerx, float *centery,
float *sizex, float *sizey, float *sizex, float *sizey,
float *transx, float *transy, float *transx, float *transy,

@ -116,7 +116,7 @@ KX_ConstraintActuator::~KX_ConstraintActuator()
// there's nothing to be done here, really.... // there's nothing to be done here, really....
} /* end of destructor */ } /* end of destructor */
bool KX_ConstraintActuator::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data) bool KX_ConstraintActuator::RayHit(KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
{ {
m_hitObject = client->m_gameobject; m_hitObject = client->m_gameobject;
@ -150,7 +150,7 @@ bool KX_ConstraintActuator::RayHit(KX_ClientObjectInfo* client, KX_RayCast* resu
/* This function is used to pre-filter the object before casting the ray on them. /* This function is used to pre-filter the object before casting the ray on them.
* This is useful for "X-Ray" option when we want to see "through" unwanted object. * This is useful for "X-Ray" option when we want to see "through" unwanted object.
*/ */
bool KX_ConstraintActuator::NeedRayCast(KX_ClientObjectInfo* client) bool KX_ConstraintActuator::NeedRayCast(KX_ClientObjectInfo *client)
{ {
if (client->m_type > KX_ClientObjectInfo::ACTOR) if (client->m_type > KX_ClientObjectInfo::ACTOR)
{ {

@ -1435,7 +1435,7 @@ void KX_Dome::SplitFace(vector <DomeFace>& face, int *nfaces)
*nfaces = n2; *nfaces = n2;
} }
void KX_Dome::CalculateFrustum(KX_Camera * cam) void KX_Dome::CalculateFrustum(KX_Camera *cam)
{ {
#if 0 #if 0
// manually creating a 90deg Field of View Frustum // manually creating a 90deg Field of View Frustum

@ -187,7 +187,7 @@ KX_GameObject::~KX_GameObject()
#endif // WITH_PYTHON #endif // WITH_PYTHON
} }
KX_GameObject* KX_GameObject::GetClientObject(KX_ClientObjectInfo* info) KX_GameObject* KX_GameObject::GetClientObject(KX_ClientObjectInfo *info)
{ {
if (!info) if (!info)
return NULL; return NULL;
@ -2987,7 +2987,7 @@ KX_PYMETHODDEF_DOC_O(KX_GameObject, getVectTo,
return returnValue; return returnValue;
} }
bool KX_GameObject::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data) bool KX_GameObject::RayHit(KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
{ {
KX_GameObject* hitKXObj = client->m_gameobject; KX_GameObject* hitKXObj = client->m_gameobject;
@ -3006,7 +3006,7 @@ bool KX_GameObject::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void
/* this function is used to pre-filter the object before casting the ray on them. /* this function is used to pre-filter the object before casting the ray on them.
* This is useful for "X-Ray" option when we want to see "through" unwanted object. * This is useful for "X-Ray" option when we want to see "through" unwanted object.
*/ */
bool KX_GameObject::NeedRayCast(KX_ClientObjectInfo* client) bool KX_GameObject::NeedRayCast(KX_ClientObjectInfo *client)
{ {
KX_GameObject* hitKXObj = client->m_gameobject; KX_GameObject* hitKXObj = client->m_gameobject;

@ -403,15 +403,15 @@ PyObject *KX_MeshProxy::pyattr_get_materials(void *self_v, const KX_PYATTRIBUTE_
return materials; return materials;
} }
PyObject * KX_MeshProxy::pyattr_get_numMaterials(void * selfv, const KX_PYATTRIBUTE_DEF * attrdef) PyObject *KX_MeshProxy::pyattr_get_numMaterials(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
KX_MeshProxy * self = static_cast<KX_MeshProxy *> (selfv); KX_MeshProxy * self = static_cast<KX_MeshProxy *> (self_v);
return PyLong_FromLong(self->m_meshobj->NumMaterials()); return PyLong_FromLong(self->m_meshobj->NumMaterials());
} }
PyObject * KX_MeshProxy::pyattr_get_numPolygons(void * selfv, const KX_PYATTRIBUTE_DEF * attrdef) PyObject *KX_MeshProxy::pyattr_get_numPolygons(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{ {
KX_MeshProxy * self = static_cast<KX_MeshProxy *> (selfv); KX_MeshProxy * self = static_cast<KX_MeshProxy *> (self_v);
return PyLong_FromLong(self->m_meshobj->NumPolygons()); return PyLong_FromLong(self->m_meshobj->NumPolygons());
} }

@ -136,7 +136,7 @@ bool KX_MouseFocusSensor::Evaluate()
return result; return result;
} }
bool KX_MouseFocusSensor::RayHit(KX_ClientObjectInfo* client_info, KX_RayCast* result, void * const data) bool KX_MouseFocusSensor::RayHit(KX_ClientObjectInfo *client_info, KX_RayCast *result, void * const data)
{ {
KX_GameObject* hitKXObj = client_info->m_gameobject; KX_GameObject* hitKXObj = client_info->m_gameobject;

@ -186,7 +186,7 @@ bool KX_NearSensor::BroadPhaseFilterCollision(void*obj1,void*obj2)
// need the mapping from PHY_IPhysicsController to gameobjects now // need the mapping from PHY_IPhysicsController to gameobjects now
assert(obj1==m_physCtrl && obj2); assert(obj1==m_physCtrl && obj2);
KX_ClientObjectInfo* client_info = static_cast<KX_ClientObjectInfo*>((static_cast<PHY_IPhysicsController*>(obj2))->getNewClientInfo()); KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo*>((static_cast<PHY_IPhysicsController*>(obj2))->getNewClientInfo());
KX_GameObject* gameobj = ( client_info ? KX_GameObject* gameobj = ( client_info ?
client_info->m_gameobject : client_info->m_gameobject :
@ -208,14 +208,14 @@ bool KX_NearSensor::BroadPhaseFilterCollision(void*obj1,void*obj2)
return false; return false;
} }
bool KX_NearSensor::NewHandleCollision(void* obj1,void* obj2,const PHY_CollData * coll_data) bool KX_NearSensor::NewHandleCollision(void *obj1, void *obj2, const PHY_CollData *coll_data)
{ {
// KX_TouchEventManager* toucheventmgr = static_cast<KX_TouchEventManager*>(m_eventmgr); // KX_TouchEventManager* toucheventmgr = static_cast<KX_TouchEventManager*>(m_eventmgr);
// KX_GameObject* parent = static_cast<KX_GameObject*>(GetParent()); // KX_GameObject* parent = static_cast<KX_GameObject*>(GetParent());
// need the mapping from PHY_IPhysicsController to gameobjects now // need the mapping from PHY_IPhysicsController to gameobjects now
KX_ClientObjectInfo* client_info =static_cast<KX_ClientObjectInfo*> (obj1 == m_physCtrl? KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo*> (obj1 == m_physCtrl?
((PHY_IPhysicsController*)obj2)->getNewClientInfo() : ((PHY_IPhysicsController*)obj2)->getNewClientInfo() :
((PHY_IPhysicsController*)obj1)->getNewClientInfo()); ((PHY_IPhysicsController*)obj1)->getNewClientInfo());

@ -63,7 +63,7 @@ static int KX_PythonSeq_clear(KX_PythonSeq *self)
return 0; return 0;
} }
static void KX_PythonSeq_dealloc(KX_PythonSeq * self) static void KX_PythonSeq_dealloc(KX_PythonSeq *self)
{ {
KX_PythonSeq_clear(self); KX_PythonSeq_clear(self);
PyObject_GC_Del(self); PyObject_GC_Del(self);
@ -264,7 +264,7 @@ static PyObjectPlus * KX_PythonSeq_subscript__internal(PyObject *self, const cha
} }
static PyObject * KX_PythonSeq_subscript(PyObject *self, PyObject *key) static PyObject *KX_PythonSeq_subscript(PyObject *self, PyObject *key)
{ {
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base); PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
@ -394,9 +394,9 @@ static PyObject *KX_PythonSeq_nextIter(KX_PythonSeq *self)
} }
static int KX_PythonSeq_compare( KX_PythonSeq * a, KX_PythonSeq * b ) static int KX_PythonSeq_compare(KX_PythonSeq *a, KX_PythonSeq *b)
{ {
return ( a->type == b->type && a->base == b->base) ? 0 : -1; return (a->type == b->type && a->base == b->base) ? 0 : -1;
} }
static PyObject *KX_PythonSeq_richcmp(PyObject *a, PyObject *b, int op) static PyObject *KX_PythonSeq_richcmp(PyObject *a, PyObject *b, int op)
@ -434,7 +434,7 @@ static PyObject *KX_PythonSeq_richcmp(PyObject *a, PyObject *b, int op)
* repr function * repr function
* convert to a list and get its string value * convert to a list and get its string value
*/ */
static PyObject *KX_PythonSeq_repr( KX_PythonSeq * self ) static PyObject *KX_PythonSeq_repr(KX_PythonSeq *self)
{ {
PyObject *list = PySequence_List((PyObject *)self); PyObject *list = PySequence_List((PyObject *)self);
PyObject *repr = PyObject_Repr(list); PyObject *repr = PyObject_Repr(list);

@ -80,7 +80,7 @@ bool KX_RayCast::RayTest(PHY_IPhysicsEnvironment* physics_environment, const MT_
frompoint.x(),frompoint.y(),frompoint.z(), frompoint.x(),frompoint.y(),frompoint.z(),
topoint.x(),topoint.y(),topoint.z())) != NULL) topoint.x(),topoint.y(),topoint.z())) != NULL)
{ {
KX_ClientObjectInfo* info = static_cast<KX_ClientObjectInfo*>(hit_controller->getNewClientInfo()); KX_ClientObjectInfo *info = static_cast<KX_ClientObjectInfo*>(hit_controller->getNewClientInfo());
if (!info) if (!info)
{ {

@ -108,7 +108,7 @@ bool KX_RaySensor::IsPositiveTrigger()
return result; return result;
} }
bool KX_RaySensor::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data) bool KX_RaySensor::RayHit(KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
{ {
KX_GameObject* hitKXObj = client->m_gameobject; KX_GameObject* hitKXObj = client->m_gameobject;
@ -153,7 +153,7 @@ bool KX_RaySensor::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void
/* this function is used to pre-filter the object before casting the ray on them. /* this function is used to pre-filter the object before casting the ray on them.
* This is useful for "X-Ray" option when we want to see "through" unwanted object. * This is useful for "X-Ray" option when we want to see "through" unwanted object.
*/ */
bool KX_RaySensor::NeedRayCast(KX_ClientObjectInfo* client) bool KX_RaySensor::NeedRayCast(KX_ClientObjectInfo *client)
{ {
if (client->m_type > KX_ClientObjectInfo::ACTOR) if (client->m_type > KX_ClientObjectInfo::ACTOR)
{ {

@ -1468,7 +1468,7 @@ void KX_Scene::MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj,KX_Cam
} }
} }
void KX_Scene::PhysicsCullingCallback(KX_ClientObjectInfo* objectInfo, void* cullingInfo) void KX_Scene::PhysicsCullingCallback(KX_ClientObjectInfo *objectInfo, void* cullingInfo)
{ {
KX_GameObject* gameobj = objectInfo->m_gameobject; KX_GameObject* gameobj = objectInfo->m_gameobject;
if (!gameobj->GetVisible()) if (!gameobj->GetVisible())

@ -208,7 +208,7 @@ KX_Camera* KX_SceneActuator::FindCamera(const char *camName)
KX_Scene* KX_SceneActuator::FindScene(const char * sceneName) KX_Scene* KX_SceneActuator::FindScene(const char *sceneName)
{ {
return m_KetsjiEngine->FindScene(sceneName); return m_KetsjiEngine->FindScene(sceneName);
} }

@ -82,7 +82,7 @@ bool KX_TouchEventManager::newBroadphaseResponse(void *client_data,
const PHY_CollData *coll_data) const PHY_CollData *coll_data)
{ {
PHY_IPhysicsController* ctrl = static_cast<PHY_IPhysicsController*>(object1); PHY_IPhysicsController* ctrl = static_cast<PHY_IPhysicsController*>(object1);
KX_ClientObjectInfo* info = (ctrl) ? static_cast<KX_ClientObjectInfo*>(ctrl->getNewClientInfo()) : NULL; KX_ClientObjectInfo *info = (ctrl) ? static_cast<KX_ClientObjectInfo*>(ctrl->getNewClientInfo()) : NULL;
// This call back should only be called for controllers of Near and Radar sensor // This call back should only be called for controllers of Near and Radar sensor
if (!info) if (!info)
return true; return true;

@ -175,7 +175,7 @@ void KX_TouchSensor::RegisterSumo(KX_TouchEventManager *touchman)
{ {
if (touchman->GetPhysicsEnvironment()->requestCollisionCallback(m_physCtrl)) if (touchman->GetPhysicsEnvironment()->requestCollisionCallback(m_physCtrl))
{ {
KX_ClientObjectInfo* client_info = static_cast<KX_ClientObjectInfo*>(m_physCtrl->getNewClientInfo()); KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo*>(m_physCtrl->getNewClientInfo());
if (client_info->isSensor()) if (client_info->isSensor())
touchman->GetPhysicsEnvironment()->addSensor(m_physCtrl); touchman->GetPhysicsEnvironment()->addSensor(m_physCtrl);
} }
@ -188,7 +188,7 @@ void KX_TouchSensor::UnregisterSumo(KX_TouchEventManager* touchman)
if (touchman->GetPhysicsEnvironment()->removeCollisionCallback(m_physCtrl)) if (touchman->GetPhysicsEnvironment()->removeCollisionCallback(m_physCtrl))
{ {
// no more sensor on the controller, can remove it if it is a sensor object // no more sensor on the controller, can remove it if it is a sensor object
KX_ClientObjectInfo* client_info = static_cast<KX_ClientObjectInfo*>(m_physCtrl->getNewClientInfo()); KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo*>(m_physCtrl->getNewClientInfo());
if (client_info->isSensor()) if (client_info->isSensor())
touchman->GetPhysicsEnvironment()->removeSensor(m_physCtrl); touchman->GetPhysicsEnvironment()->removeSensor(m_physCtrl);
} }
@ -203,8 +203,8 @@ bool KX_TouchSensor::BroadPhaseSensorFilterCollision(void*obj1,void*obj2)
KX_GameObject* myobj = (KX_GameObject*)GetParent(); KX_GameObject* myobj = (KX_GameObject*)GetParent();
KX_GameObject* myparent = myobj->GetParent(); KX_GameObject* myparent = myobj->GetParent();
KX_ClientObjectInfo* client_info = static_cast<KX_ClientObjectInfo*>(((PHY_IPhysicsController*)obj2)->getNewClientInfo()); KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo*>(((PHY_IPhysicsController*)obj2)->getNewClientInfo());
KX_ClientObjectInfo* my_client_info = static_cast<KX_ClientObjectInfo*>(m_physCtrl->getNewClientInfo()); KX_ClientObjectInfo *my_client_info = static_cast<KX_ClientObjectInfo*>(m_physCtrl->getNewClientInfo());
KX_GameObject* otherobj = ( client_info ? client_info->m_gameobject : NULL); KX_GameObject* otherobj = ( client_info ? client_info->m_gameobject : NULL);
// first, decrement refcount as GetParent() increases it // first, decrement refcount as GetParent() increases it
@ -243,7 +243,7 @@ bool KX_TouchSensor::NewHandleCollision(void*object1,void*object2,const PHY_Coll
// need the mapping from PHY_IPhysicsController to gameobjects now // need the mapping from PHY_IPhysicsController to gameobjects now
KX_ClientObjectInfo* client_info = static_cast<KX_ClientObjectInfo*> (object1 == m_physCtrl? KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo*> (object1 == m_physCtrl?
((PHY_IPhysicsController*)object2)->getNewClientInfo(): ((PHY_IPhysicsController*)object2)->getNewClientInfo():
((PHY_IPhysicsController*)object1)->getNewClientInfo()); ((PHY_IPhysicsController*)object1)->getNewClientInfo());

@ -1799,7 +1799,7 @@ struct DbvtCullingCallback : btDbvt::ICollide
btBroadphaseProxy* proxy=(btBroadphaseProxy*)leaf->data; btBroadphaseProxy* proxy=(btBroadphaseProxy*)leaf->data;
// the client object is a graphic controller // the client object is a graphic controller
CcdGraphicController* ctrl = static_cast<CcdGraphicController*>(proxy->m_clientObject); CcdGraphicController* ctrl = static_cast<CcdGraphicController*>(proxy->m_clientObject);
KX_ClientObjectInfo* info = (KX_ClientObjectInfo*)ctrl->getNewClientInfo(); KX_ClientObjectInfo *info = (KX_ClientObjectInfo*)ctrl->getNewClientInfo();
if (m_ocb) if (m_ocb)
{ {
// means we are doing occlusion culling. Check if this object is an occluders // means we are doing occlusion culling. Check if this object is an occluders

@ -48,7 +48,7 @@ ExpDesc errNFoundDesc(ErrNotFound, "Error description not found");
// implementation of ExpDesc // implementation of ExpDesc
// constructor // constructor
ExpDesc::ExpDesc (ExceptionID & exp, const char * desc, RESULT hres) ExpDesc::ExpDesc (ExceptionID & exp, const char *desc, RESULT hres)
: m_expID(exp), m_hRslt(hres), m_description(desc) : m_expID(exp), m_hRslt(hres), m_description(desc)
{ {
} }
@ -105,7 +105,7 @@ const char * Exception::what()
// debug version - with file and line of exception // debug version - with file and line of exception
Exception::Exception (ExceptionID & expID, RESULT rslt, const char * fil, int lin) Exception::Exception (ExceptionID & expID, RESULT rslt, const char *fil, int lin)
: m_expID (&expID), m_hRslt (rslt) : m_expID (&expID), m_hRslt (rslt)
{ {
// set file and line // set file and line
@ -115,7 +115,7 @@ Exception::Exception (ExceptionID & expID, RESULT rslt, const char * fil, int li
// set file and line // set file and line
void Exception::setFileLine (const char * fil, int lin) void Exception::setFileLine (const char *fil, int lin)
{ {
if (fil != NULL) m_fileName = fil; if (fil != NULL) m_fileName = fil;
m_line = lin; m_line = lin;

@ -124,7 +124,7 @@ PyObject *Filter_getPrevious (PyFilter *self, void *closure)
if (self->m_filter != NULL) if (self->m_filter != NULL)
{ {
// pixel filter object // pixel filter object
PyObject * filt = reinterpret_cast<PyObject*>(self->m_filter->getPrevious()); PyObject *filt = reinterpret_cast<PyObject*>(self->m_filter->getPrevious());
// if filter is present // if filter is present
if (filt != NULL) if (filt != NULL)
{ {

@ -141,7 +141,7 @@ static int setMatrix(PyFilter *self, PyObject *value, void *closure)
for (int r = 0; valid && r < 4; ++r) for (int r = 0; valid && r < 4; ++r)
{ {
// get row object // get row object
PyObject * row = PySequence_Fast_GET_ITEM(value, r); PyObject *row = PySequence_Fast_GET_ITEM(value, r);
// check sequence // check sequence
valid = PySequence_Check(row) && PySequence_Size(row) == 5; valid = PySequence_Check(row) && PySequence_Size(row) == 5;
// check items // check items
@ -274,7 +274,7 @@ static int setLevels(PyFilter *self, PyObject *value, void *closure)
for (int r = 0; valid && r < 4; ++r) for (int r = 0; valid && r < 4; ++r)
{ {
// get row object // get row object
PyObject * row = PySequence_Fast_GET_ITEM(value, r); PyObject *row = PySequence_Fast_GET_ITEM(value, r);
// check sequence // check sequence
valid = PySequence_Check(row) && PySequence_Size(row) == 2; valid = PySequence_Check(row) && PySequence_Size(row) == 2;
// check items // check items

@ -364,7 +364,7 @@ PyTypeList pyImageTypes;
// functions for python interface // functions for python interface
// object allocation // object allocation
PyObject *Image_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds) PyObject *Image_allocNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
{ {
// allocate object // allocate object
PyImage *self = reinterpret_cast<PyImage*>(type->tp_alloc(type, 0)); PyImage *self = reinterpret_cast<PyImage*>(type->tp_alloc(type, 0));
@ -394,7 +394,7 @@ void Image_dealloc(PyImage *self)
} }
// get image data // get image data
PyObject *Image_getImage (PyImage *self, char * mode) PyObject *Image_getImage(PyImage *self, char *mode)
{ {
try try
{ {
@ -551,7 +551,7 @@ int Image_setFlip(PyImage *self, PyObject *value, void *closure)
} }
// get zbuff // get zbuff
PyObject * Image_getZbuff (PyImage * self, void * closure) PyObject *Image_getZbuff(PyImage * self, void *closure)
{ {
if (self->m_image != NULL && self->m_image->getZbuff()) Py_RETURN_TRUE; if (self->m_image != NULL && self->m_image->getZbuff()) Py_RETURN_TRUE;
else Py_RETURN_FALSE; else Py_RETURN_FALSE;
@ -573,7 +573,7 @@ int Image_setZbuff(PyImage *self, PyObject *value, void *closure)
} }
// get depth // get depth
PyObject * Image_getDepth (PyImage * self, void * closure) PyObject *Image_getDepth(PyImage * self, void *closure)
{ {
if (self->m_image != NULL && self->m_image->getDepth()) Py_RETURN_TRUE; if (self->m_image != NULL && self->m_image->getDepth()) Py_RETURN_TRUE;
else Py_RETURN_FALSE; else Py_RETURN_FALSE;
@ -598,7 +598,7 @@ int Image_setDepth(PyImage *self, PyObject *value, void *closure)
// get filter source object // get filter source object
PyObject *Image_getSource (PyImage *self, PyObject *args) PyObject *Image_getSource(PyImage *self, PyObject *args)
{ {
// get arguments // get arguments
char * id; char * id;
@ -622,7 +622,7 @@ PyObject *Image_getSource (PyImage *self, PyObject *args)
// set filter source object // set filter source object
PyObject *Image_setSource (PyImage *self, PyObject *args) PyObject *Image_setSource(PyImage *self, PyObject *args)
{ {
// get arguments // get arguments
char * id; char * id;
@ -657,13 +657,13 @@ PyObject *Image_setSource (PyImage *self, PyObject *args)
// get pixel filter object // get pixel filter object
PyObject *Image_getFilter (PyImage *self, void *closure) PyObject *Image_getFilter(PyImage *self, void *closure)
{ {
// if image object is available // if image object is available
if (self->m_image != NULL) if (self->m_image != NULL)
{ {
// pixel filter object // pixel filter object
PyObject * filt = reinterpret_cast<PyObject*>(self->m_image->getFilter()); PyObject *filt = reinterpret_cast<PyObject*>(self->m_image->getFilter());
// if filter is present // if filter is present
if (filt != NULL) if (filt != NULL)
{ {

@ -57,52 +57,52 @@ public:
/// constructor /// constructor
ImageBase (bool staticSrc = false); ImageBase (bool staticSrc = false);
/// destructor /// destructor
virtual ~ImageBase (void); virtual ~ImageBase(void);
/// release contained objects, if returns true, object should be deleted /// release contained objects, if returns true, object should be deleted
virtual bool release (void); virtual bool release(void);
/// is an image available /// is an image available
bool isImageAvailable(void) bool isImageAvailable(void)
{ return m_avail; } { return m_avail; }
/// get image /// get image
unsigned int * getImage (unsigned int texId = 0, double timestamp=-1.0); unsigned int *getImage(unsigned int texId = 0, double timestamp=-1.0);
/// get image size /// get image size
short * getSize (void) { return m_size; } short * getSize(void) { return m_size; }
/// get image buffer size /// get image buffer size
unsigned long getBuffSize (void) unsigned long getBuffSize(void)
{ return m_size[0] * m_size[1] * sizeof(unsigned int); } { return m_size[0] * m_size[1] * sizeof(unsigned int); }
/// refresh image - invalidate its current content /// refresh image - invalidate its current content
virtual void refresh (void); virtual void refresh(void);
/// get scale /// get scale
bool getScale (void) { return m_scale; } bool getScale(void) { return m_scale; }
/// set scale /// set scale
void setScale (bool scale) { m_scale = scale; m_scaleChange = true; } void setScale(bool scale) { m_scale = scale; m_scaleChange = true; }
/// get vertical flip /// get vertical flip
bool getFlip (void) { return m_flip; } bool getFlip(void) { return m_flip; }
/// set vertical flip /// set vertical flip
void setFlip (bool flip) { m_flip = flip; } void setFlip(bool flip) { m_flip = flip; }
/// get Z buffer /// get Z buffer
bool getZbuff (void) { return m_zbuff; } bool getZbuff(void) { return m_zbuff; }
/// set Z buffer /// set Z buffer
void setZbuff (bool zbuff) { m_zbuff = zbuff; } void setZbuff(bool zbuff) { m_zbuff = zbuff; }
/// get depth /// get depth
bool getDepth (void) { return m_depth; } bool getDepth(void) { return m_depth; }
/// set depth /// set depth
void setDepth (bool depth) { m_depth = depth; } void setDepth(bool depth) { m_depth = depth; }
/// get source object /// get source object
PyImage * getSource (const char * id); PyImage * getSource(const char * id);
/// set source object, return true, if source was set /// set source object, return true, if source was set
bool setSource (const char * id, PyImage *source); bool setSource(const char * id, PyImage *source);
/// get pixel filter /// get pixel filter
PyFilter * getFilter (void) { return m_pyfilter; } PyFilter * getFilter(void) { return m_pyfilter; }
/// set pixel filter /// set pixel filter
void setFilter (PyFilter * filt); void setFilter(PyFilter * filt);
/// calculate size (nearest power of 2) /// calculate size(nearest power of 2)
static short calcSize (short size); static short calcSize(short size);
/// number of buffer pointing to m_image, public because not handled by this class /// number of buffer pointing to m_image, public because not handled by this class
int m_exports; int m_exports;
@ -137,25 +137,25 @@ protected:
PyFilter * m_pyfilter; PyFilter * m_pyfilter;
/// initialize image data /// initialize image data
void init (short width, short height); void init(short width, short height);
/// find source /// find source
ImageSourceList::iterator findSource (const char * id); ImageSourceList::iterator findSource(const char *id);
/// create new source /// create new source
virtual ImageSource * newSource (const char * id) { return NULL; } virtual ImageSource *newSource(const char *id) { return NULL; }
/// check source sizes /// check source sizes
bool checkSourceSizes (void); bool checkSourceSizes(void);
/// calculate image from sources and set its availability /// calculate image from sources and set its availability
virtual void calcImage (unsigned int texId, double ts) {} virtual void calcImage(unsigned int texId, double ts) {}
/// perform loop detection /// perform loop detection
bool loopDetect (ImageBase * img); bool loopDetect(ImageBase * img);
/// template for image conversion /// template for image conversion
template<class FLT, class SRC> void convImage (FLT & filter, SRC srcBuff, template<class FLT, class SRC> void convImage(FLT & filter, SRC srcBuff,
short * srcSize) short * srcSize)
{ {
// destination buffer // destination buffer
@ -328,7 +328,7 @@ extern PyTypeList pyImageTypes;
// functions for python interface // functions for python interface
// object initialization // object initialization
template <class T> static int Image_init (PyObject *pySelf, PyObject *args, PyObject *kwds) template <class T> static int Image_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
{ {
PyImage *self = reinterpret_cast<PyImage*>(pySelf); PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// create source object // create source object
@ -339,43 +339,43 @@ template <class T> static int Image_init (PyObject *pySelf, PyObject *args, PyOb
} }
// object allocation // object allocation
PyObject *Image_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds); PyObject *Image_allocNew(PyTypeObject *type, PyObject *args, PyObject *kwds);
// object deallocation // object deallocation
void Image_dealloc (PyImage *self); void Image_dealloc(PyImage *self);
// get image data // get image data
PyObject *Image_getImage (PyImage *self, char * mode); PyObject *Image_getImage(PyImage *self, char * mode);
// get image size // get image size
PyObject *Image_getSize (PyImage *self, void *closure); PyObject *Image_getSize(PyImage *self, void *closure);
// refresh image - invalidate current content // refresh image - invalidate current content
PyObject *Image_refresh (PyImage *self); PyObject *Image_refresh(PyImage *self);
// get scale // get scale
PyObject *Image_getScale (PyImage *self, void *closure); PyObject *Image_getScale(PyImage *self, void *closure);
// set scale // set scale
int Image_setScale (PyImage *self, PyObject *value, void *closure); int Image_setScale(PyImage *self, PyObject *value, void *closure);
// get flip // get flip
PyObject *Image_getFlip (PyImage *self, void *closure); PyObject *Image_getFlip(PyImage *self, void *closure);
// set flip // set flip
int Image_setFlip (PyImage *self, PyObject *value, void *closure); int Image_setFlip(PyImage *self, PyObject *value, void *closure);
// get filter source object // get filter source object
PyObject *Image_getSource (PyImage *self, PyObject *args); PyObject *Image_getSource(PyImage *self, PyObject *args);
// set filter source object // set filter source object
PyObject *Image_setSource (PyImage *self, PyObject *args); PyObject *Image_setSource(PyImage *self, PyObject *args);
// get Z buffer // get Z buffer
PyObject * Image_getZbuff (PyImage * self, void * closure); PyObject *Image_getZbuff(PyImage * self, void *closure);
// set Z buffer // set Z buffer
int Image_setZbuff (PyImage * self, PyObject * value, void * closure); int Image_setZbuff(PyImage * self, PyObject *value, void *closure);
// get depth // get depth
PyObject * Image_getDepth (PyImage * self, void * closure); PyObject *Image_getDepth(PyImage * self, void *closure);
// set depth // set depth
int Image_setDepth (PyImage * self, PyObject * value, void * closure); int Image_setDepth(PyImage * self, PyObject *value, void *closure);
// get pixel filter object // get pixel filter object
PyObject *Image_getFilter (PyImage *self, void *closure); PyObject *Image_getFilter(PyImage *self, void *closure);
// set pixel filter object // set pixel filter object
int Image_setFilter (PyImage *self, PyObject *value, void *closure); int Image_setFilter(PyImage *self, PyObject *value, void *closure);
// check if a buffer can be extracted // check if a buffer can be extracted
PyObject *Image_valid(PyImage *self, void *closure); PyObject *Image_valid(PyImage *self, void *closure);
// for buffer access to PyImage objects // for buffer access to PyImage objects

@ -299,7 +299,7 @@ static int ImageRender_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
// parameters - scene object // parameters - scene object
PyObject *scene; PyObject *scene;
// camera object // camera object
PyObject * camera; PyObject *camera;
// parameter keywords // parameter keywords
static const char *kwlist[] = {"sceneObj", "cameraObj", NULL}; static const char *kwlist[] = {"sceneObj", "cameraObj", NULL};
// get parameters // get parameters

@ -95,12 +95,12 @@ protected:
GLint * getViewportSize (void) { return m_viewport + 2; } GLint * getViewportSize (void) { return m_viewport + 2; }
}; };
PyObject *ImageViewport_getCaptureSize (PyImage *self, void *closure); PyObject *ImageViewport_getCaptureSize(PyImage *self, void *closure);
int ImageViewport_setCaptureSize (PyImage *self, PyObject *value, void *closure); int ImageViewport_setCaptureSize(PyImage *self, PyObject *value, void *closure);
PyObject *ImageViewport_getWhole (PyImage *self, void *closure); PyObject *ImageViewport_getWhole(PyImage *self, void *closure);
int ImageViewport_setWhole (PyImage *self, PyObject *value, void *closure); int ImageViewport_setWhole(PyImage *self, PyObject *value, void *closure);
PyObject *ImageViewport_getAlpha (PyImage *self, void *closure); PyObject *ImageViewport_getAlpha(PyImage *self, void *closure);
int ImageViewport_setAlpha (PyImage *self, PyObject *value, void *closure); int ImageViewport_setAlpha(PyImage *self, PyObject *value, void *closure);
#endif #endif

@ -504,7 +504,7 @@ void VideoFFmpeg::stopCache()
} }
} }
void VideoFFmpeg::releaseFrame(AVFrame* frame) void VideoFFmpeg::releaseFrame(AVFrame *frame)
{ {
if (frame == m_frameRGB) if (frame == m_frameRGB)
{ {
@ -521,7 +521,7 @@ void VideoFFmpeg::releaseFrame(AVFrame* frame)
} }
// open video file // open video file
void VideoFFmpeg::openFile (char * filename) void VideoFFmpeg::openFile (char *filename)
{ {
if (openStream(filename, NULL, NULL) != 0) if (openStream(filename, NULL, NULL) != 0)
return; return;
@ -578,7 +578,7 @@ void VideoFFmpeg::openFile (char * filename)
// open video capture device // open video capture device
void VideoFFmpeg::openCam (char * file, short camIdx) void VideoFFmpeg::openCam (char *file, short camIdx)
{ {
// open camera source // open camera source
AVInputFormat *inputFormat; AVInputFormat *inputFormat;

@ -51,12 +51,12 @@ extern "C" {
#endif #endif
#ifdef FFMPEG_CODEC_IS_POINTER #ifdef FFMPEG_CODEC_IS_POINTER
static inline AVCodecContext* get_codec_from_stream(AVStream* stream) static inline AVCodecContext *get_codec_from_stream(AVStream* stream)
{ {
return stream->codec; return stream->codec;
} }
#else #else
static inline AVCodecContext* get_codec_from_stream(AVStream* stream) static inline AVCodecContext *get_codec_from_stream(AVStream* stream)
{ {
return &stream->codec; return &stream->codec;
} }