Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-07 02:38:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-07 02:38:39 +0400
commitd5032657edd365ded8b98500536ecdbe1b54df5a (patch)
tree73bb5897da4b67ff37b9639471520bdcdeef16f7 /source/gameengine
parent379c4ae4d8b92ae444c0372dc54872c72b10c199 (diff)
style cleanup
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.cpp2
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp7
-rw-r--r--source/gameengine/Converter/BL_DeformableGameObject.cpp2
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp4
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h2
-rw-r--r--source/gameengine/Expressions/Value.h2
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_Joystick.h14
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp12
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.h2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_BulletPhysicsController.h2
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp19
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h2
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.h3
-rw-r--r--source/gameengine/Ketsji/KX_LightIpoSGController.h2
-rw-r--r--source/gameengine/Ketsji/KX_MaterialIpoController.h2
-rw-r--r--source/gameengine/Ketsji/KX_ObColorIpoSGController.h2
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.h3
-rw-r--r--source/gameengine/Ketsji/KX_WorldIpoController.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_LightObject.h2
-rw-r--r--source/gameengine/SceneGraph/SG_ParentRelation.h3
22 files changed, 49 insertions, 45 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index f38782a9405..7174a563efa 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -529,7 +529,7 @@ bool BL_ArmatureObject::SetActiveAction(BL_ActionActuator *act, short priority,
return true;
}
- else{
+ else {
act->SetBlendTime(0.0);
return false;
}
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 3d73ca66c92..927a0535870 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -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;
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp
index dd4c51b5403..4967401f279 100644
--- a/source/gameengine/Converter/BL_DeformableGameObject.cpp
+++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp
@@ -76,7 +76,7 @@ bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short
return true;
}
- else{
+ else {
act->SetBlendTime(0.0f);
return false;
}
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 13e79b13304..c339e10f673 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -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;
}
}
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 278febee4ac..c50e42446a5 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -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
diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h
index 00320ff9ed2..261f5244f21 100644
--- a/source/gameengine/Expressions/Value.h
+++ b/source/gameengine/Expressions/Value.h
@@ -158,7 +158,7 @@ class CAction
public:
CAction() {
};
- virtual ~CAction(){
+ virtual ~CAction() {
};
virtual void Execute() const =0;
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
index a6809716e32..685cc3fcc48 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
@@ -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;
}
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index 07fad3bfe37..c82e015919d 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -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;
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h
index eecbf2c4183..5dc35faf244 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.h
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h
@@ -117,7 +117,7 @@ public:
virtual bool IsPositiveTrigger();
virtual void Init();
- short int GetJoyIndex(void){
+ short int GetJoyIndex(void) {
return m_joyindex;
}
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 1e16cbd51f2..26cfc560b6d 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -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,
diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.h b/source/gameengine/Ketsji/KX_BulletPhysicsController.h
index 4ced21aa2d8..3b3a1f5cbfb 100644
--- a/source/gameengine/Ketsji/KX_BulletPhysicsController.h
+++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.h
@@ -86,7 +86,7 @@ public:
SetOption(
int option,
int value
- ){
+ ) {
// intentionally empty
};
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index eaabbdd8233..6d57b6950f1 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -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();
}
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index a173ef1ed8f..2b0d13ff2f7 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -712,7 +712,7 @@ public:
void
AddMesh(
RAS_MeshObject* mesh
- ){
+ ) {
m_meshes.push_back(mesh);
}
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp
index 9777eaf333e..7e7e7f8cef2 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.cpp
+++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp
@@ -297,7 +297,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
{
SetLocalTime(curtime);
}
- else{
+ else {
if (!m_bNegativeEvent) {
/* Perform wraparound */
SetLocalTime(curtime);
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h
index 0a50ab0a43a..f9c6d59b668 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.h
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h
@@ -150,8 +150,7 @@ private:
int m_curreye;
/** Categories for profiling display. */
- typedef enum
- {
+ typedef enum {
tc_first = 0,
tc_physics = 0,
tc_logic,
diff --git a/source/gameengine/Ketsji/KX_LightIpoSGController.h b/source/gameengine/Ketsji/KX_LightIpoSGController.h
index 78466e822e7..15591bfa981 100644
--- a/source/gameengine/Ketsji/KX_LightIpoSGController.h
+++ b/source/gameengine/Ketsji/KX_LightIpoSGController.h
@@ -90,7 +90,7 @@ public:
SetOption(
int option,
int value
- ){
+ ) {
// intentionally empty
};
diff --git a/source/gameengine/Ketsji/KX_MaterialIpoController.h b/source/gameengine/Ketsji/KX_MaterialIpoController.h
index 85b2a971fbe..11d92925a02 100644
--- a/source/gameengine/Ketsji/KX_MaterialIpoController.h
+++ b/source/gameengine/Ketsji/KX_MaterialIpoController.h
@@ -49,7 +49,7 @@ public:
SetOption(
int option,
int value
- ){
+ ) {
// intentionally empty
};
diff --git a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h
index d2d69d6db12..d2f4c69bf47 100644
--- a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h
+++ b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h
@@ -64,7 +64,7 @@ public:
SetOption(
int option,
int value
- ){
+ ) {
// intentionally empty
};
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h
index 71ec3ae2f59..dbdb17d0da5 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.h
+++ b/source/gameengine/Ketsji/KX_SoundActuator.h
@@ -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;
diff --git a/source/gameengine/Ketsji/KX_WorldIpoController.h b/source/gameengine/Ketsji/KX_WorldIpoController.h
index 1f60280e355..9578130b51e 100644
--- a/source/gameengine/Ketsji/KX_WorldIpoController.h
+++ b/source/gameengine/Ketsji/KX_WorldIpoController.h
@@ -88,7 +88,7 @@ public:
SetOption(
int option,
int value
- ){
+ ) {
// intentionally empty
};
diff --git a/source/gameengine/Rasterizer/RAS_LightObject.h b/source/gameengine/Rasterizer/RAS_LightObject.h
index c378a9ea0c2..ddf360683cd 100644
--- a/source/gameengine/Rasterizer/RAS_LightObject.h
+++ b/source/gameengine/Rasterizer/RAS_LightObject.h
@@ -36,7 +36,7 @@
struct RAS_LightObject
{
- enum LightType{
+ enum LightType {
LIGHT_SPOT,
LIGHT_SUN,
LIGHT_NORMAL
diff --git a/source/gameengine/SceneGraph/SG_ParentRelation.h b/source/gameengine/SceneGraph/SG_ParentRelation.h
index 689ada84edd..4140563828f 100644
--- a/source/gameengine/SceneGraph/SG_ParentRelation.h
+++ b/source/gameengine/SceneGraph/SG_ParentRelation.h
@@ -76,8 +76,7 @@ public :
virtual
~SG_ParentRelation(
- ){
- };
+ ) {};
/**
* You must provide a way of duplicating an