style cleanup

This commit is contained in:
Campbell Barton 2012-06-06 22:38:39 +00:00
parent 379c4ae4d8
commit d5032657ed
59 changed files with 130 additions and 189 deletions

@ -56,7 +56,7 @@ class CTR_UHeapable {
public : public :
int & int &
HeapPos( HeapPos(
){ ) {
return m_ind; return m_ind;
}; };
float & float &
@ -93,7 +93,7 @@ protected :
}; };
~CTR_UHeapable( ~CTR_UHeapable(
){ ) {
}; };
}; };
@ -214,7 +214,7 @@ private:
HeapType *base, HeapType *base,
int i, int i,
int j int j
){ ) {
std::swap(m_vector[i],m_vector[j]); std::swap(m_vector[i],m_vector[j]);
CTR_UHeapable *heap_i = base + m_vector[i]; CTR_UHeapable *heap_i = base + m_vector[i];

@ -152,7 +152,7 @@ bool system_cpu_support_optimized()
/*__cpuid(result, 0x80000000); /*__cpuid(result, 0x80000000);
num_ex = result[0];*/ num_ex = result[0];*/
if(num >= 1){ if(num >= 1) {
__cpuid(result, 0x00000001); __cpuid(result, 0x00000001);
caps.mmx = (result[3] & ((int)1 << 23)) != 0; caps.mmx = (result[3] & ((int)1 << 23)) != 0;
caps.sse = (result[3] & ((int)1 << 25)) != 0; caps.sse = (result[3] & ((int)1 << 25)) != 0;
@ -167,7 +167,7 @@ bool system_cpu_support_optimized()
caps.fma3 = (result[2] & ((int)1 << 12)) != 0; caps.fma3 = (result[2] & ((int)1 << 12)) != 0;
} }
/*if(num_ex >= 0x80000001){ /*if(num_ex >= 0x80000001) {
__cpuid(result, 0x80000001); __cpuid(result, 0x80000001);
caps.x64 = (result[3] & ((int)1 << 29)) != 0; caps.x64 = (result[3] & ((int)1 << 29)) != 0;
caps.sse4a = (result[2] & ((int)1 << 6)) != 0; caps.sse4a = (result[2] & ((int)1 << 6)) != 0;

@ -56,8 +56,7 @@ typedef unsigned long long GHOST_TUns64;
typedef void *GHOST_TUserDataPtr; typedef void *GHOST_TUserDataPtr;
typedef enum typedef enum {
{
GHOST_kFailure = 0, GHOST_kFailure = 0,
GHOST_kSuccess GHOST_kSuccess
} GHOST_TSuccess; } GHOST_TSuccess;

@ -40,8 +40,7 @@
#define INTERNAL_RND_SORT_SEED 39871946 #define INTERNAL_RND_SORT_SEED 39871946
// internal structure // internal structure
typedef struct typedef struct {
{
float x, y, z; float x, y, z;
} SVec3; } SVec3;
@ -119,14 +118,12 @@ static tbool VNotZero(const SVec3 v)
typedef struct typedef struct {
{
int iNrFaces; int iNrFaces;
int * pTriMembers; int * pTriMembers;
} SSubGroup; } SSubGroup;
typedef struct typedef struct {
{
int iNrFaces; int iNrFaces;
int * pFaceIndices; int * pFaceIndices;
int iVertexRepresentitive; int iVertexRepresentitive;
@ -141,8 +138,7 @@ typedef struct
typedef struct typedef struct {
{
int FaceNeighbors[3]; int FaceNeighbors[3];
SGroup * AssignedGroup[3]; SGroup * AssignedGroup[3];
@ -156,8 +152,7 @@ typedef struct
unsigned char vert_num[4]; unsigned char vert_num[4];
} STriInfo; } STriInfo;
typedef struct typedef struct {
{
SVec3 vOs; SVec3 vOs;
float fMagS; float fMagS;
SVec3 vOt; SVec3 vOt;
@ -426,8 +421,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
typedef struct typedef struct {
{
float vert[3]; float vert[3];
int index; int index;
} STmpVert; } STmpVert;
@ -911,8 +905,7 @@ static SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index)
///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////
typedef union typedef union {
{
struct struct
{ {
int i0, i1, f; int i0, i1, f;

@ -62,8 +62,7 @@ extern "C" {
typedef int tbool; typedef int tbool;
typedef struct SMikkTSpaceContext SMikkTSpaceContext; typedef struct SMikkTSpaceContext SMikkTSpaceContext;
typedef struct typedef struct {
{
// Returns the number of faces (triangles/quads) on the mesh to be processed. // Returns the number of faces (triangles/quads) on the mesh to be processed.
int (*m_getNumFaces)(const SMikkTSpaceContext * pContext); int (*m_getNumFaces)(const SMikkTSpaceContext * pContext);

@ -69,8 +69,7 @@ struct CollisionTree;
* own connectivity of the mesh based on the actual edges in the mesh. * own connectivity of the mesh based on the actual edges in the mesh.
* *
*/ */
typedef struct Cloth typedef struct Cloth {
{
struct ClothVertex *verts; /* The vertices that represent this cloth. */ struct ClothVertex *verts; /* The vertices that represent this cloth. */
struct LinkNode *springs; /* The springs connecting the mesh. */ struct LinkNode *springs; /* The springs connecting the mesh. */
unsigned int numverts; /* The number of verts == m * n. */ unsigned int numverts; /* The number of verts == m * n. */
@ -91,8 +90,7 @@ typedef struct Cloth
/** /**
* The definition of a cloth vertex. * The definition of a cloth vertex.
*/ */
typedef struct ClothVertex typedef struct ClothVertex {
{
int flags; /* General flags per vertex. */ int flags; /* General flags per vertex. */
float v[3]; /* The velocity of the point. */ float v[3]; /* The velocity of the point. */
float xconst[3]; /* constrained position */ float xconst[3]; /* constrained position */
@ -117,8 +115,7 @@ ClothVertex;
/** /**
* The definition of a spring. * The definition of a spring.
*/ */
typedef struct ClothSpring typedef struct ClothSpring {
{
int ij; /* Pij from the paper, one end of the spring. */ int ij; /* Pij from the paper, one end of the spring. */
int kl; /* Pkl from the paper, one end of the spring. */ int kl; /* Pkl from the paper, one end of the spring. */
float restlen; /* The original length of the spring. */ float restlen; /* The original length of the spring. */
@ -149,8 +146,7 @@ ClothSpring;
/* SIMULATION FLAGS: goal flags,.. */ /* SIMULATION FLAGS: goal flags,.. */
/* These are the bits used in SimSettings.flags. */ /* These are the bits used in SimSettings.flags. */
typedef enum typedef enum {
{
CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ),// object is only collision object, no cloth simulation is done CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ),// object is only collision object, no cloth simulation is done
CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled
CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled
@ -160,15 +156,13 @@ typedef enum
} CLOTH_SIMSETTINGS_FLAGS; } CLOTH_SIMSETTINGS_FLAGS;
/* COLLISION FLAGS */ /* COLLISION FLAGS */
typedef enum typedef enum {
{
CLOTH_COLLSETTINGS_FLAG_ENABLED = ( 1 << 1 ), /* enables cloth - object collisions */ CLOTH_COLLSETTINGS_FLAG_ENABLED = ( 1 << 1 ), /* enables cloth - object collisions */
CLOTH_COLLSETTINGS_FLAG_SELF = ( 1 << 2 ), /* enables selfcollisions */ CLOTH_COLLSETTINGS_FLAG_SELF = ( 1 << 2 ), /* enables selfcollisions */
} CLOTH_COLLISIONSETTINGS_FLAGS; } CLOTH_COLLISIONSETTINGS_FLAGS;
/* Spring types as defined in the paper.*/ /* Spring types as defined in the paper.*/
typedef enum typedef enum {
{
CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1), CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1),
CLOTH_SPRING_TYPE_SHEAR = (1 << 2), CLOTH_SPRING_TYPE_SHEAR = (1 << 2),
CLOTH_SPRING_TYPE_BENDING = (1 << 3), CLOTH_SPRING_TYPE_BENDING = (1 << 3),
@ -176,8 +170,7 @@ typedef enum
} CLOTH_SPRING_TYPES; } CLOTH_SPRING_TYPES;
/* SPRING FLAGS */ /* SPRING FLAGS */
typedef enum typedef enum {
{
CLOTH_SPRING_FLAG_DEACTIVATE = ( 1 << 1 ), CLOTH_SPRING_FLAG_DEACTIVATE = ( 1 << 1 ),
CLOTH_SPRING_FLAG_NEEDED = ( 1 << 2 ), // springs has values to be applied CLOTH_SPRING_FLAG_NEEDED = ( 1 << 2 ), // springs has values to be applied
} CLOTH_SPRINGS_FLAGS; } CLOTH_SPRINGS_FLAGS;
@ -230,16 +223,14 @@ int cloth_add_spring (struct ClothModifierData *clmd, unsigned int indexA, unsig
/* This enum provides the IDs for our solvers. */ /* This enum provides the IDs for our solvers. */
// only one available in the moment // only one available in the moment
typedef enum typedef enum {
{
CM_IMPLICIT = 0, CM_IMPLICIT = 0,
} CM_SOLVER_ID; } CM_SOLVER_ID;
/* This structure defines how to call the solver. /* This structure defines how to call the solver.
*/ */
typedef struct typedef struct {
{
const char *name; const char *name;
CM_SOLVER_ID id; CM_SOLVER_ID id;
int ( *init ) (struct Object *ob, struct ClothModifierData *clmd ); int ( *init ) (struct Object *ob, struct ClothModifierData *clmd );

@ -59,8 +59,7 @@ struct LinkNode;
//////////////////////////////////////// ////////////////////////////////////////
/* COLLISION FLAGS */ /* COLLISION FLAGS */
typedef enum typedef enum {
{
COLLISION_IN_FUTURE = (1 << 1), COLLISION_IN_FUTURE = (1 << 1),
#ifdef WITH_ELTOPO #ifdef WITH_ELTOPO
COLLISION_USE_COLLFACE = (1 << 2), COLLISION_USE_COLLFACE = (1 << 2),

@ -266,8 +266,7 @@ struct bNodeTreeExec;
typedef void (*bNodeTreeCallback)(void *calldata, struct ID *owner_id, struct bNodeTree *ntree); typedef void (*bNodeTreeCallback)(void *calldata, struct ID *owner_id, struct bNodeTree *ntree);
typedef void (*bNodeClassCallback)(void *calldata, int nclass, const char *name); typedef void (*bNodeClassCallback)(void *calldata, int nclass, const char *name);
typedef struct bNodeTreeType typedef struct bNodeTreeType {
{
int type; /* type identifier */ int type; /* type identifier */
char idname[64]; /* id name for RNA identification */ char idname[64]; /* id name for RNA identification */

@ -26,14 +26,12 @@
* \ingroup bke * \ingroup bke
*/ */
typedef enum SK_PType typedef enum SK_PType {
{
PT_CONTINUOUS, PT_CONTINUOUS,
PT_EXACT, PT_EXACT,
} SK_PType; } SK_PType;
typedef enum SK_PMode typedef enum SK_PMode {
{
PT_SNAP, PT_SNAP,
PT_PROJECT, PT_PROJECT,
} SK_PMode; } SK_PMode;

@ -695,8 +695,7 @@ DO_INLINE void subadd_bfmatrixS_bfmatrixS( fmatrix3x3 *to, fmatrix3x3 *from, flo
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
// simulator start // simulator start
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
typedef struct Implicit_Data typedef struct Implicit_Data {
{
lfVector *X, *V, *Xnew, *Vnew, *olddV, *F, *B, *dV, *z; lfVector *X, *V, *Xnew, *Vnew, *olddV, *F, *B, *dV, *z;
fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI, *M; fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI, *M;
} Implicit_Data; } Implicit_Data;

@ -2363,13 +2363,12 @@ static EdgeHash *sph_springhash_build(ParticleSystem *psys)
} }
#define SPH_NEIGHBORS 512 #define SPH_NEIGHBORS 512
typedef struct SPHNeighbor typedef struct SPHNeighbor {
{
ParticleSystem *psys; ParticleSystem *psys;
int index; int index;
} SPHNeighbor; } SPHNeighbor;
typedef struct SPHRangeData
{ typedef struct SPHRangeData {
SPHNeighbor neighbors[SPH_NEIGHBORS]; SPHNeighbor neighbors[SPH_NEIGHBORS];
int tot_neighbors; int tot_neighbors;
@ -2641,8 +2640,7 @@ static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float d
/************************************************/ /************************************************/
/* Basic physics */ /* Basic physics */
/************************************************/ /************************************************/
typedef struct EfData typedef struct EfData {
{
ParticleTexture ptex; ParticleTexture ptex;
ParticleSimulationData *sim; ParticleSimulationData *sim;
ParticleData *pa; ParticleData *pa;

@ -38,8 +38,7 @@
#include "IMB_moviecache.h" #include "IMB_moviecache.h"
typedef struct seqCacheKey typedef struct seqCacheKey {
{
struct Sequence * seq; struct Sequence * seq;
SeqRenderData context; SeqRenderData context;
float cfra; float cfra;

@ -27,8 +27,7 @@
* \ingroup bmesh * \ingroup bmesh
*/ */
typedef struct BMEditSelection typedef struct BMEditSelection {
{
struct BMEditSelection *next, *prev; struct BMEditSelection *next, *prev;
BMElem *ele; BMElem *ele;
char htype; char htype;
@ -82,7 +81,7 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3]);
#define BM_select_history_store_notest(bm, ele) _bm_select_history_store_notest(bm, &(ele)->head) #define BM_select_history_store_notest(bm, ele) _bm_select_history_store_notest(bm, &(ele)->head)
#define BM_select_history_store(bm, ele) _bm_select_history_store(bm, &(ele)->head) #define BM_select_history_store(bm, ele) _bm_select_history_store(bm, &(ele)->head)
int _bm_select_history_check(BMesh *bm, const BMHeader *ele); int _bm_select_history_check(BMesh *bm, const BMHeader *ele);
int _bm_select_history_remove(BMesh *bm, BMHeader *ele); int _bm_select_history_remove(BMesh *bm, BMHeader *ele);
void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele); void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele);
void _bm_select_history_store(BMesh *bm, BMHeader *ele); void _bm_select_history_store(BMesh *bm, BMHeader *ele);

@ -81,20 +81,17 @@ typedef struct RetargetParam {
bContext *context; bContext *context;
} RetargetParam; } RetargetParam;
typedef enum typedef enum {
{
RETARGET_LENGTH, RETARGET_LENGTH,
RETARGET_AGGRESSIVE RETARGET_AGGRESSIVE
} RetargetMode; } RetargetMode;
typedef enum typedef enum {
{
METHOD_BRUTE_FORCE = 0, METHOD_BRUTE_FORCE = 0,
METHOD_MEMOIZE = 1 METHOD_MEMOIZE = 1
} RetargetMethod; } RetargetMethod;
typedef enum typedef enum {
{
ARC_FREE = 0, ARC_FREE = 0,
ARC_TAKEN = 1, ARC_TAKEN = 1,
ARC_USED = 2 ARC_USED = 2

@ -168,8 +168,7 @@ typedef struct DepthPeel {
struct ListBase; struct ListBase;
typedef enum SnapMode typedef enum SnapMode {
{
SNAP_ALL = 0, SNAP_ALL = 0,
SNAP_NOT_SELECTED = 1, SNAP_NOT_SELECTED = 1,
SNAP_NOT_OBEDIT = 2 SNAP_NOT_OBEDIT = 2

@ -102,8 +102,7 @@ typedef struct ThumbnailJob {
ReportList reports; ReportList reports;
} ThumbnailJob; } ThumbnailJob;
typedef struct FileList typedef struct FileList {
{
struct direntry *filelist; struct direntry *filelist;
int *fidx; int *fidx;
int numfiles; int numfiles;
@ -124,8 +123,7 @@ typedef struct FileList
} FileList; } FileList;
typedef struct FolderList typedef struct FolderList {
{
struct FolderList *next, *prev; struct FolderList *next, *prev;
char *foldername; char *foldername;
} FolderList; } FolderList;

@ -53,8 +53,7 @@ typedef enum FileSelType {
FILE_SEL_TOGGLE = 2 FILE_SEL_TOGGLE = 2
} FileSelType; } FileSelType;
typedef enum FileCheckType typedef enum FileCheckType {
{
CHECK_DIRS = 1, CHECK_DIRS = 1,
CHECK_FILES = 2, CHECK_FILES = 2,
CHECK_ALL = 3 CHECK_ALL = 3

@ -50,8 +50,7 @@ struct bNodeLink;
struct Main; struct Main;
/* temp data to pass on to modal */ /* temp data to pass on to modal */
typedef struct bNodeLinkDrag typedef struct bNodeLinkDrag {
{
struct bNodeLinkDrag *next, *prev; struct bNodeLinkDrag *next, *prev;
/* List of links dragged by the operator. /* List of links dragged by the operator.

@ -5847,7 +5847,7 @@ void flushTransTracking(TransInfo *t)
/* * masking * */ /* * masking * */
typedef struct TransDataMasking{ typedef struct TransDataMasking {
int is_handle; int is_handle;
float handle[2], orig_handle[2]; float handle[2], orig_handle[2];

@ -51,8 +51,7 @@
#include "transform.h" #include "transform.h"
typedef struct TransformModeItem typedef struct TransformModeItem {
{
char *idname; char *idname;
int mode; int mode;
void (*opfunc)(wmOperatorType*); void (*opfunc)(wmOperatorType*);

@ -1261,8 +1261,8 @@ void mtex_bump_bicubic( vec3 texco, sampler2D ima, float hScale,
mat4 H; mat4 H;
for(int i = 0; i < 4; i++){ for(int i = 0; i < 4; i++) {
for(int j = 0; j < 4; j++){ for(int j = 0; j < 4; j++) {
ivec2 iTexTmp = iTexLocMod + ivec2(i,j); ivec2 iTexTmp = iTexLocMod + ivec2(i,j);
// wrap texture coordinates manually for texelFetch to work on uvs oitside the 0,1 range. // wrap texture coordinates manually for texelFetch to work on uvs oitside the 0,1 range.

@ -904,8 +904,7 @@ static ExrHandle *imb_exr_begin_read_mem(InputFile *file, int width, int height)
/* ********************************************************* */ /* ********************************************************* */
typedef struct RGBA typedef struct RGBA {
{
float r; float r;
float g; float g;
float b; float b;

@ -62,8 +62,7 @@ typedef struct bActionActuator {
float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */ float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */
} bActionActuator; } bActionActuator;
typedef struct Sound3D typedef struct Sound3D {
{
float min_gain; float min_gain;
float max_gain; float max_gain;
float reference_distance; float reference_distance;

@ -44,8 +44,7 @@
* variables with different names to minimize confusion. * variables with different names to minimize confusion.
*/ */
typedef struct ClothSimSettings typedef struct ClothSimSettings {
{
struct LinkNode *cache; /* UNUSED atm */ struct LinkNode *cache; /* UNUSED atm */
float mingoal; /* see SB */ float mingoal; /* see SB */
float Cdis; /* Mechanical damping of springs. */ float Cdis; /* Mechanical damping of springs. */
@ -89,8 +88,7 @@ typedef struct ClothSimSettings
} ClothSimSettings; } ClothSimSettings;
typedef struct ClothCollSettings typedef struct ClothCollSettings {
{
struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */
float epsilon; /* min distance for collisions. */ float epsilon; /* min distance for collisions. */
float self_friction; /* Fiction/damping with self contact. */ float self_friction; /* Fiction/damping with self contact. */

@ -41,22 +41,19 @@ extern "C" {
#endif #endif
/* generic - all structs which are used in linked-lists used this */ /* generic - all structs which are used in linked-lists used this */
typedef struct Link typedef struct Link {
{
struct Link *next, *prev; struct Link *next, *prev;
} Link; } Link;
/* use this when it is not worth defining a custom one... */ /* use this when it is not worth defining a custom one... */
typedef struct LinkData typedef struct LinkData {
{
struct LinkData *next, *prev; struct LinkData *next, *prev;
void *data; void *data;
} LinkData; } LinkData;
/* never change the size of this! genfile.c detects pointerlen with it */ /* never change the size of this! genfile.c detects pointerlen with it */
typedef struct ListBase typedef struct ListBase {
{
void *first, *last; void *first, *last;
} ListBase; } ListBase;

@ -234,8 +234,8 @@ typedef struct ParticleSettings {
struct PartDeflect *pd2; struct PartDeflect *pd2;
} ParticleSettings; } ParticleSettings;
typedef struct ParticleSystem typedef struct ParticleSystem {
{ /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */ /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */
/* note2: make sure any uses of this struct in DNA are accounted for in 'BKE_object_copy_particlesystems' */ /* note2: make sure any uses of this struct in DNA are accounted for in 'BKE_object_copy_particlesystems' */
struct ParticleSystem *next, *prev; struct ParticleSystem *next, *prev;

@ -45,8 +45,7 @@ typedef struct TexResult {
} TexResult; } TexResult;
/* localized shade result data */ /* localized shade result data */
typedef struct ShadeResult typedef struct ShadeResult {
{
float combined[4]; float combined[4];
float col[4]; float col[4];
float alpha, mist, z; float alpha, mist, z;
@ -95,8 +94,7 @@ typedef struct ShadeInputCol {
} ShadeInputCol; } ShadeInputCol;
/* localized renderloop data */ /* localized renderloop data */
typedef struct ShadeInput typedef struct ShadeInput {
{
/* copy from face, also to extract tria from quad */ /* copy from face, also to extract tria from quad */
/* note it mirrors a struct above for quick copy */ /* note it mirrors a struct above for quick copy */

@ -65,16 +65,14 @@ struct Main;
#define TABLEINITSIZE 1024 #define TABLEINITSIZE 1024
#define LAMPINITSIZE 256 #define LAMPINITSIZE 256
typedef struct SampleTables typedef struct SampleTables {
{
float centLut[16]; float centLut[16];
float *fmask1[9], *fmask2[9]; float *fmask1[9], *fmask2[9];
char cmask[256], *centmask; char cmask[256], *centmask;
} SampleTables; } SampleTables;
typedef struct QMCSampler typedef struct QMCSampler {
{
struct QMCSampler *next, *prev; struct QMCSampler *next, *prev;
int type; int type;
int tot; int tot;
@ -88,8 +86,7 @@ typedef struct QMCSampler
#define SAMP_TYPE_HAMMERSLEY 2 #define SAMP_TYPE_HAMMERSLEY 2
/* this is handed over to threaded hiding/passes/shading engine */ /* this is handed over to threaded hiding/passes/shading engine */
typedef struct RenderPart typedef struct RenderPart {
{
struct RenderPart *next, *prev; struct RenderPart *next, *prev;
RenderResult *result; /* result of part rendering */ RenderResult *result; /* result of part rendering */
@ -347,8 +344,7 @@ typedef struct ObjectInstanceRen {
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
typedef struct VertRen typedef struct VertRen {
{
float co[3]; float co[3];
float n[3]; float n[3];
float *orco; float *orco;
@ -384,8 +380,7 @@ typedef struct VlakRen {
int index; int index;
} VlakRen; } VlakRen;
typedef struct HaloRen typedef struct HaloRen {
{
short miny, maxy; short miny, maxy;
float alfa, xs, ys, rad, radsq, sin, cos, co[3], no[3]; float alfa, xs, ys, rad, radsq, sin, cos, co[3], no[3];
float hard, b, g, r; float hard, b, g, r;
@ -456,8 +451,7 @@ typedef struct StrandRen {
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
typedef struct VolumeOb typedef struct VolumeOb {
{
struct VolumeOb *next, *prev; struct VolumeOb *next, *prev;
struct Material *ma; struct Material *ma;
struct ObjectRen *obr; struct ObjectRen *obr;
@ -469,8 +463,7 @@ typedef struct MatInside {
struct ObjectInstanceRen *obi; struct ObjectInstanceRen *obi;
} MatInside; } MatInside;
typedef struct VolPrecachePart typedef struct VolPrecachePart {
{
struct VolPrecachePart *next, *prev; struct VolPrecachePart *next, *prev;
struct RayObject *tree; struct RayObject *tree;
struct ShadeInput *shi; struct ShadeInput *shi;
@ -486,8 +479,7 @@ typedef struct VolPrecachePart
struct Render *re; struct Render *re;
} VolPrecachePart; } VolPrecachePart;
typedef struct VolumePrecache typedef struct VolumePrecache {
{
int res[3]; int res[3];
float *bbmin, *bbmax; float *bbmin, *bbmax;
float *data_r; float *data_r;

@ -46,16 +46,14 @@ struct RayObject;
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
typedef struct PixStr typedef struct PixStr {
{
struct PixStr *next; struct PixStr *next;
int obi, facenr, z, maskz; int obi, facenr, z, maskz;
unsigned short mask; unsigned short mask;
short shadfac; short shadfac;
} PixStr; } PixStr;
typedef struct PixStrMain typedef struct PixStrMain {
{
struct PixStrMain *next, *prev; struct PixStrMain *next, *prev;
struct PixStr *ps; struct PixStr *ps;
int counter; int counter;

@ -31,8 +31,7 @@
#define SPECTRUM_START 350.0 #define SPECTRUM_START 350.0
#define SPECTRUM_END 800.0 #define SPECTRUM_END 800.0
typedef struct SunSky typedef struct SunSky {
{
short effect_type, skyblendtype, sky_colorspace; short effect_type, skyblendtype, sky_colorspace;
float turbidity; float turbidity;
float theta, phi; float theta, phi;

@ -35,8 +35,7 @@
struct Render; struct Render;
struct TexResult; struct TexResult;
typedef struct VoxelDataHeader typedef struct VoxelDataHeader {
{
int resolX, resolY, resolZ; int resolX, resolY, resolZ;
int frames; int frames;
} VoxelDataHeader; } VoxelDataHeader;

@ -80,8 +80,7 @@ typedef struct APixstrand {
struct APixstrand *next; struct APixstrand *next;
} APixstrand; } APixstrand;
typedef struct APixstrMain typedef struct APixstrMain {
{
struct APixstrMain *next, *prev; struct APixstrMain *next, *prev;
void *ps; void *ps;
} APixstrMain; } APixstrMain;

@ -62,8 +62,7 @@ static RayObjectAPI instance_api =
RE_rayobject_instance_hint_bb RE_rayobject_instance_hint_bb
}; };
typedef struct InstanceRayObject typedef struct InstanceRayObject {
{
RayObject rayobj; RayObject rayobj;
RayObject *target; RayObject *target;

@ -520,8 +520,7 @@ static void calc_tangent_vector(ObjectRen *obr, VertexTangent **vtangents, MemAr
************ tangent space generation interface **************** ************ tangent space generation interface ****************
****************************************************************/ ****************************************************************/
typedef struct typedef struct {
{
ObjectRen *obr; ObjectRen *obr;
} SRenderMeshToTangent; } SRenderMeshToTangent;
@ -1011,8 +1010,7 @@ static Material *give_render_material(Render *re, Object *ob, short nr)
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* Particles */ /* Particles */
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
typedef struct ParticleStrandData typedef struct ParticleStrandData {
{
struct MCol *mcol; struct MCol *mcol;
float *orco, *uvco, *surfnor; float *orco, *uvco, *surfnor;
float time, adapt_angle, adapt_pix, size; float time, adapt_angle, adapt_pix, size;

@ -325,8 +325,7 @@ void free_pointdensities(Render *re)
} }
} }
typedef struct PointDensityRangeData typedef struct PointDensityRangeData {
{
float *density; float *density;
float squared_radius; float squared_radius;
float *point_data; float *point_data;

@ -385,7 +385,7 @@ typedef struct wmTabletData {
float Ytilt; /* as above */ float Ytilt; /* as above */
} wmTabletData; } wmTabletData;
typedef enum { // motion progress, for modal handlers typedef enum { /* motion progress, for modal handlers */
P_NOT_STARTED, P_NOT_STARTED,
P_STARTING, // <-- P_STARTING, // <--
P_IN_PROGRESS, // <-- only these are sent for NDOF motion P_IN_PROGRESS, // <-- only these are sent for NDOF motion

@ -577,12 +577,11 @@ int wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *UNUSED(op))
/* ************ events *************** */ /* ************ events *************** */
typedef enum typedef enum {
{ SHIFT = 's',
SHIFT = 's', CONTROL = 'c',
CONTROL = 'c', ALT = 'a',
ALT = 'a', OS = 'C'
OS = 'C'
} modifierKeyType; } modifierKeyType;
/* check if specified modifier key type is pressed */ /* check if specified modifier key type is pressed */

@ -529,7 +529,7 @@ bool BL_ArmatureObject::SetActiveAction(BL_ActionActuator *act, short priority,
return true; return true;
} }
else{ else {
act->SetBlendTime(0.0); act->SetBlendTime(0.0);
return false; return false;
} }

@ -488,11 +488,10 @@ static void GetRGB(short type,
} }
} }
typedef struct MTF_localLayer typedef struct MTF_localLayer {
{
MTFace *face; MTFace *face;
const char *name; const char *name;
}MTF_localLayer; } MTF_localLayer;
// ------------------------------------ // ------------------------------------
bool ConvertMaterial( bool ConvertMaterial(
@ -1193,7 +1192,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
twoside = ((ma->game.flag & GEMAT_BACKCULL)==0); twoside = ((ma->game.flag & GEMAT_BACKCULL)==0);
collider = ((ma->game.flag & GEMAT_NOPHYSICS)==0); collider = ((ma->game.flag & GEMAT_NOPHYSICS)==0);
} }
else{ else {
visible = true; visible = true;
twoside = false; twoside = false;
collider = true; collider = true;

@ -76,7 +76,7 @@ bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short
return true; return true;
} }
else{ else {
act->SetBlendTime(0.0f); act->SetBlendTime(0.0f);
return false; return false;
} }

@ -316,7 +316,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
m_localtime += (length/m_stridelength) * deltapos.length(); m_localtime += (length/m_stridelength) * deltapos.length();
m_lastpos = newpos; m_lastpos = newpos;
} }
else{ else {
SetLocalTime(curtime); SetLocalTime(curtime);
} }
} }
@ -466,7 +466,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
BLI_freelistN(&tchanbase); BLI_freelistN(&tchanbase);
} }
} }
else{ else {
m_blendframe = 0.0f; m_blendframe = 0.0f;
} }
} }

@ -527,7 +527,7 @@ typedef struct KX_PYATTRIBUTE_DEF {
/*------------------------------ /*------------------------------
* PyObjectPlus * PyObjectPlus
------------------------------*/ ------------------------------*/
typedef PyTypeObject * PyParentObject; // Define the PyParent Object typedef PyTypeObject *PyParentObject; /* Define the PyParent Object */
#else // WITH_PYTHON #else // WITH_PYTHON

@ -158,7 +158,7 @@ class CAction
public: public:
CAction() { CAction() {
}; };
virtual ~CAction(){ virtual ~CAction() {
}; };
virtual void Execute() const =0; virtual void Execute() const =0;

@ -99,7 +99,7 @@ class SCA_Joystick
void OnButtonDown(SDL_Event *sdl_event); void OnButtonDown(SDL_Event *sdl_event);
void OnNothing(SDL_Event *sdl_event); void OnNothing(SDL_Event *sdl_event);
#if 0 /* not used yet */ #if 0 /* not used yet */
void OnBallMotion(SDL_Event *sdl_event){} void OnBallMotion(SDL_Event *sdl_event) {}
#endif #endif
#endif /* WITH_SDL */ #endif /* WITH_SDL */
@ -156,27 +156,27 @@ public:
void cSetPrecision(int val); void cSetPrecision(int val);
int GetAxisPosition(int index){ int GetAxisPosition(int index) {
return m_axis_array[index]; return m_axis_array[index];
} }
int GetHat(int index){ int GetHat(int index) {
return m_hat_array[index]; return m_hat_array[index];
} }
int GetThreshold(void){ int GetThreshold(void) {
return m_prec; return m_prec;
} }
bool IsTrigAxis(void){ bool IsTrigAxis(void) {
return m_istrig_axis; return m_istrig_axis;
} }
bool IsTrigButton(void){ bool IsTrigButton(void) {
return m_istrig_button; return m_istrig_button;
} }
bool IsTrigHat(void){ bool IsTrigHat(void) {
return m_istrig_hat; return m_istrig_hat;
} }

@ -137,7 +137,8 @@ bool SCA_JoystickSensor::Evaluate()
if (js->aAxisPairIsPositive(m_axis-1)) { /* use zero based axis index internally */ if (js->aAxisPairIsPositive(m_axis-1)) { /* use zero based axis index internally */
m_istrig = 1; m_istrig = 1;
result = true; result = true;
}else{ }
else {
if (m_istrig) { if (m_istrig) {
m_istrig = 0; m_istrig = 0;
result = true; result = true;
@ -148,7 +149,8 @@ bool SCA_JoystickSensor::Evaluate()
if (js->aAxisPairDirectionIsPositive(m_axis-1, m_axisf)) { /* use zero based axis index internally */ if (js->aAxisPairDirectionIsPositive(m_axis-1, m_axisf)) { /* use zero based axis index internally */
m_istrig = 1; m_istrig = 1;
result = true; result = true;
}else{ }
else {
if (m_istrig) { if (m_istrig) {
m_istrig = 0; m_istrig = 0;
result = true; result = true;
@ -168,7 +170,8 @@ bool SCA_JoystickSensor::Evaluate()
if (js->aAxisIsPositive(m_axis-1)) { /* use zero based axis index internally */ if (js->aAxisIsPositive(m_axis-1)) { /* use zero based axis index internally */
m_istrig = 1; m_istrig = 1;
result = true; result = true;
}else{ }
else {
if (m_istrig) { if (m_istrig) {
m_istrig = 0; m_istrig = 0;
result = true; result = true;
@ -209,7 +212,8 @@ bool SCA_JoystickSensor::Evaluate()
if ((m_bAllEvents && js->GetHat(m_hat-1)) || js->aHatIsPositive(m_hat-1, m_hatf)) { if ((m_bAllEvents && js->GetHat(m_hat-1)) || js->aHatIsPositive(m_hat-1, m_hatf)) {
m_istrig = 1; m_istrig = 1;
result = true; result = true;
}else{ }
else {
if (m_istrig) { if (m_istrig) {
m_istrig = 0; m_istrig = 0;
result = true; result = true;

@ -117,7 +117,7 @@ public:
virtual bool IsPositiveTrigger(); virtual bool IsPositiveTrigger();
virtual void Init(); virtual void Init();
short int GetJoyIndex(void){ short int GetJoyIndex(void) {
return m_joyindex; return m_joyindex;
} }

@ -118,8 +118,7 @@ static void mem_error_cb(const char *errorStr)
} }
#ifdef WIN32 #ifdef WIN32
typedef enum typedef enum {
{
SCREEN_SAVER_MODE_NONE = 0, SCREEN_SAVER_MODE_NONE = 0,
SCREEN_SAVER_MODE_PREVIEW, SCREEN_SAVER_MODE_PREVIEW,
SCREEN_SAVER_MODE_SAVER, SCREEN_SAVER_MODE_SAVER,

@ -86,7 +86,7 @@ public:
SetOption( SetOption(
int option, int option,
int value int value
){ ) {
// intentionally empty // intentionally empty
}; };

@ -445,7 +445,8 @@ void KX_Dome::GLDrawWarpQuads(void)
} }
} }
glEnd(); glEnd();
} else{ }
else {
printf("Dome Error: Warp Mode %d unsupported. Try 1 for Polar Mesh or 2 for Fisheye.\n", warp.mode); printf("Dome Error: Warp Mode %d unsupported. Try 1 for Polar Mesh or 2 for Fisheye.\n", warp.mode);
} }
} }
@ -502,7 +503,8 @@ bool KX_Dome::ParseWarpMesh(STR_String text)
if ((int)lines.size() < 2 + (warp.n_width * warp.n_height)) { if ((int)lines.size() < 2 + (warp.n_width * warp.n_height)) {
printf("Dome Error: Warp Mesh File with insufficient data!\n"); printf("Dome Error: Warp Mesh File with insufficient data!\n");
return false; return false;
}else{ }
else {
warp.nodes = vector<vector<WarpMeshNode> > (warp.n_height, vector<WarpMeshNode>(warp.n_width)); warp.nodes = vector<vector<WarpMeshNode> > (warp.n_height, vector<WarpMeshNode>(warp.n_width));
for (i=2; i-2 < (warp.n_width*warp.n_height); i++) { for (i=2; i-2 < (warp.n_width*warp.n_height); i++) {
@ -520,7 +522,7 @@ bool KX_Dome::ParseWarpMesh(STR_String text)
warp.nodes[nodeY][nodeX].v = atof(columns[3]); warp.nodes[nodeY][nodeX].v = atof(columns[3]);
warp.nodes[nodeY][nodeX].i = atof(columns[4]); warp.nodes[nodeY][nodeX].i = atof(columns[4]);
} }
else{ else {
warp.nodes.clear(); warp.nodes.clear();
printf("Dome Error: Warp Mesh File with wrong number of fields. You should use 5: x y u v i.\n"); printf("Dome Error: Warp Mesh File with wrong number of fields. You should use 5: x y u v i.\n");
return false; return false;
@ -1671,7 +1673,8 @@ void KX_Dome::DrawEnvMap(void)
if (can_width/3 <= can_height/2) { if (can_width/3 <= can_height/2) {
ortho_width = 1.0; ortho_width = 1.0;
ortho_height = (float)can_height/can_width; ortho_height = (float)can_height/can_width;
}else{ }
else {
ortho_height = 2.0f / 3; ortho_height = 2.0f / 3;
ortho_width = (float)can_width/can_height * ortho_height; ortho_width = (float)can_width/can_height * ortho_height;
} }
@ -1801,7 +1804,8 @@ void KX_Dome::DrawDomeFisheye(void)
if (can_width < can_height) { if (can_width < can_height) {
ortho_width = 1.0; ortho_width = 1.0;
ortho_height = (float)can_height/can_width; ortho_height = (float)can_height/can_width;
}else{ }
else {
ortho_width = (float)can_width/can_height; ortho_width = (float)can_width/can_height;
ortho_height = 1.0; ortho_height = 1.0;
} }
@ -1897,7 +1901,8 @@ void KX_Dome::DrawPanorama(void)
if ((can_width / 2) <= (can_height)) { if ((can_width / 2) <= (can_height)) {
ortho_width = 1.0; ortho_width = 1.0;
ortho_height = (float)can_height/can_width; ortho_height = (float)can_height/can_width;
}else{ }
else {
ortho_width = (float)can_width/can_height * 0.5; ortho_width = (float)can_width/can_height * 0.5;
ortho_height = 0.5; ortho_height = 0.5;
} }
@ -1995,7 +2000,7 @@ void KX_Dome::DrawDomeWarped(void)
glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]); glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]);
glCallList(dlistId + m_numfaces); glCallList(dlistId + m_numfaces);
} }
else{ else {
glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]); glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]);
GLDrawWarpQuads(); GLDrawWarpQuads();
} }

@ -712,7 +712,7 @@ public:
void void
AddMesh( AddMesh(
RAS_MeshObject* mesh RAS_MeshObject* mesh
){ ) {
m_meshes.push_back(mesh); m_meshes.push_back(mesh);
} }

@ -297,7 +297,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
{ {
SetLocalTime(curtime); SetLocalTime(curtime);
} }
else{ else {
if (!m_bNegativeEvent) { if (!m_bNegativeEvent) {
/* Perform wraparound */ /* Perform wraparound */
SetLocalTime(curtime); SetLocalTime(curtime);

@ -150,8 +150,7 @@ private:
int m_curreye; int m_curreye;
/** Categories for profiling display. */ /** Categories for profiling display. */
typedef enum typedef enum {
{
tc_first = 0, tc_first = 0,
tc_physics = 0, tc_physics = 0,
tc_logic, tc_logic,

@ -90,7 +90,7 @@ public:
SetOption( SetOption(
int option, int option,
int value int value
){ ) {
// intentionally empty // intentionally empty
}; };

@ -49,7 +49,7 @@ public:
SetOption( SetOption(
int option, int option,
int value int value
){ ) {
// intentionally empty // intentionally empty
}; };

@ -64,7 +64,7 @@ public:
SetOption( SetOption(
int option, int option,
int value int value
){ ) {
// intentionally empty // intentionally empty
}; };

@ -43,8 +43,7 @@
#include "BKE_sound.h" #include "BKE_sound.h"
typedef struct KX_3DSoundSettings typedef struct KX_3DSoundSettings {
{
float min_gain; float min_gain;
float max_gain; float max_gain;
float reference_distance; float reference_distance;

@ -88,7 +88,7 @@ public:
SetOption( SetOption(
int option, int option,
int value int value
){ ) {
// intentionally empty // intentionally empty
}; };

@ -36,7 +36,7 @@
struct RAS_LightObject struct RAS_LightObject
{ {
enum LightType{ enum LightType {
LIGHT_SPOT, LIGHT_SPOT,
LIGHT_SUN, LIGHT_SUN,
LIGHT_NORMAL LIGHT_NORMAL

@ -76,8 +76,7 @@ public :
virtual virtual
~SG_ParentRelation( ~SG_ParentRelation(
){ ) {};
};
/** /**
* You must provide a way of duplicating an * You must provide a way of duplicating an