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 :
int &
HeapPos(
){
) {
return m_ind;
};
float &
@ -93,7 +93,7 @@ protected :
};
~CTR_UHeapable(
){
) {
};
};
@ -214,7 +214,7 @@ private:
HeapType *base,
int i,
int j
){
) {
std::swap(m_vector[i],m_vector[j]);
CTR_UHeapable *heap_i = base + m_vector[i];

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

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

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

@ -62,8 +62,7 @@ extern "C" {
typedef int tbool;
typedef struct SMikkTSpaceContext SMikkTSpaceContext;
typedef struct
{
typedef struct {
// Returns the number of faces (triangles/quads) on the mesh to be processed.
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.
*
*/
typedef struct Cloth
{
typedef struct Cloth {
struct ClothVertex *verts; /* The vertices that represent this cloth. */
struct LinkNode *springs; /* The springs connecting the mesh. */
unsigned int numverts; /* The number of verts == m * n. */
@ -91,8 +90,7 @@ typedef struct Cloth
/**
* The definition of a cloth vertex.
*/
typedef struct ClothVertex
{
typedef struct ClothVertex {
int flags; /* General flags per vertex. */
float v[3]; /* The velocity of the point. */
float xconst[3]; /* constrained position */
@ -117,8 +115,7 @@ ClothVertex;
/**
* The definition of a spring.
*/
typedef struct ClothSpring
{
typedef struct ClothSpring {
int ij; /* Pij 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. */
@ -149,8 +146,7 @@ ClothSpring;
/* SIMULATION FLAGS: goal 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_GOAL = ( 1 << 3 ), // we have goals enabled
CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled
@ -160,15 +156,13 @@ typedef enum
} CLOTH_SIMSETTINGS_FLAGS;
/* COLLISION FLAGS */
typedef enum
{
typedef enum {
CLOTH_COLLSETTINGS_FLAG_ENABLED = ( 1 << 1 ), /* enables cloth - object collisions */
CLOTH_COLLSETTINGS_FLAG_SELF = ( 1 << 2 ), /* enables selfcollisions */
} CLOTH_COLLISIONSETTINGS_FLAGS;
/* Spring types as defined in the paper.*/
typedef enum
{
typedef enum {
CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1),
CLOTH_SPRING_TYPE_SHEAR = (1 << 2),
CLOTH_SPRING_TYPE_BENDING = (1 << 3),
@ -176,8 +170,7 @@ typedef enum
} CLOTH_SPRING_TYPES;
/* SPRING FLAGS */
typedef enum
{
typedef enum {
CLOTH_SPRING_FLAG_DEACTIVATE = ( 1 << 1 ),
CLOTH_SPRING_FLAG_NEEDED = ( 1 << 2 ), // springs has values to be applied
} 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. */
// only one available in the moment
typedef enum
{
typedef enum {
CM_IMPLICIT = 0,
} CM_SOLVER_ID;
/* This structure defines how to call the solver.
*/
typedef struct
{
typedef struct {
const char *name;
CM_SOLVER_ID id;
int ( *init ) (struct Object *ob, struct ClothModifierData *clmd );

@ -59,8 +59,7 @@ struct LinkNode;
////////////////////////////////////////
/* COLLISION FLAGS */
typedef enum
{
typedef enum {
COLLISION_IN_FUTURE = (1 << 1),
#ifdef WITH_ELTOPO
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 (*bNodeClassCallback)(void *calldata, int nclass, const char *name);
typedef struct bNodeTreeType
{
typedef struct bNodeTreeType {
int type; /* type identifier */
char idname[64]; /* id name for RNA identification */

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

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

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

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

@ -27,8 +27,7 @@
* \ingroup bmesh
*/
typedef struct BMEditSelection
{
typedef struct BMEditSelection {
struct BMEditSelection *next, *prev;
BMElem *ele;
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(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);
void _bm_select_history_store_notest(BMesh *bm, BMHeader *ele);
void _bm_select_history_store(BMesh *bm, BMHeader *ele);

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

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

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

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

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

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

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

@ -1261,8 +1261,8 @@ void mtex_bump_bicubic( vec3 texco, sampler2D ima, float hScale,
mat4 H;
for(int i = 0; i < 4; i++){
for(int j = 0; j < 4; j++){
for(int i = 0; i < 4; i++) {
for(int j = 0; j < 4; j++) {
ivec2 iTexTmp = iTexLocMod + ivec2(i,j);
// 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 g;
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) */
} bActionActuator;
typedef struct Sound3D
{
typedef struct Sound3D {
float min_gain;
float max_gain;
float reference_distance;

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

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

@ -234,8 +234,8 @@ typedef struct ParticleSettings {
struct PartDeflect *pd2;
} ParticleSettings;
typedef struct ParticleSystem
{ /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */
typedef struct ParticleSystem {
/* 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' */
struct ParticleSystem *next, *prev;

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

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

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

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

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

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

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

@ -520,8 +520,7 @@ static void calc_tangent_vector(ObjectRen *obr, VertexTangent **vtangents, MemAr
************ tangent space generation interface ****************
****************************************************************/
typedef struct
{
typedef struct {
ObjectRen *obr;
} SRenderMeshToTangent;
@ -1011,8 +1010,7 @@ static Material *give_render_material(Render *re, Object *ob, short nr)
/* ------------------------------------------------------------------------- */
/* Particles */
/* ------------------------------------------------------------------------- */
typedef struct ParticleStrandData
{
typedef struct ParticleStrandData {
struct MCol *mcol;
float *orco, *uvco, *surfnor;
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 squared_radius;
float *point_data;

@ -385,7 +385,7 @@ typedef struct wmTabletData {
float Ytilt; /* as above */
} wmTabletData;
typedef enum { // motion progress, for modal handlers
typedef enum { /* motion progress, for modal handlers */
P_NOT_STARTED,
P_STARTING, // <--
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 *************** */
typedef enum
{
SHIFT = 's',
CONTROL = 'c',
ALT = 'a',
OS = 'C'
typedef enum {
SHIFT = 's',
CONTROL = 'c',
ALT = 'a',
OS = 'C'
} modifierKeyType;
/* check if specified modifier key type is pressed */

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

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

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

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

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

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

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

@ -137,7 +137,8 @@ bool SCA_JoystickSensor::Evaluate()
if (js->aAxisPairIsPositive(m_axis-1)) { /* use zero based axis index internally */
m_istrig = 1;
result = true;
}else{
}
else {
if (m_istrig) {
m_istrig = 0;
result = true;
@ -148,7 +149,8 @@ bool SCA_JoystickSensor::Evaluate()
if (js->aAxisPairDirectionIsPositive(m_axis-1, m_axisf)) { /* use zero based axis index internally */
m_istrig = 1;
result = true;
}else{
}
else {
if (m_istrig) {
m_istrig = 0;
result = true;
@ -168,7 +170,8 @@ bool SCA_JoystickSensor::Evaluate()
if (js->aAxisIsPositive(m_axis-1)) { /* use zero based axis index internally */
m_istrig = 1;
result = true;
}else{
}
else {
if (m_istrig) {
m_istrig = 0;
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)) {
m_istrig = 1;
result = true;
}else{
}
else {
if (m_istrig) {
m_istrig = 0;
result = true;

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

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

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

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

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

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

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

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

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

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

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

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

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

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