[Bf-blender-cvs] [d94db03] master: Style cleanup: BGE

HG1 noreply at git.blender.org
Mon Dec 23 19:45:54 CET 2013


Commit: d94db03ac8ef9f6a10e42f01d622421fe3f216bb
Author: HG1
Date:   Tue Dec 24 05:44:54 2013 +1100
http://developer.blender.org/rBd94db03ac8ef9f6a10e42f01d622421fe3f216bb

Style cleanup: BGE

===================================================================

M	source/gameengine/Converter/BlenderWorldInfo.cpp
M	source/gameengine/Converter/BlenderWorldInfo.h
M	source/gameengine/Ketsji/KX_PythonInit.h
M	source/gameengine/Ketsji/KX_WorldInfo.h
M	source/gameengine/Rasterizer/RAS_IRasterizer.h
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h

===================================================================

diff --git a/source/gameengine/Converter/BlenderWorldInfo.cpp b/source/gameengine/Converter/BlenderWorldInfo.cpp
index f1f264b..be85d89 100644
--- a/source/gameengine/Converter/BlenderWorldInfo.cpp
+++ b/source/gameengine/Converter/BlenderWorldInfo.cpp
@@ -64,22 +64,19 @@
 /* end of blender include block */
 
 
-BlenderWorldInfo::BlenderWorldInfo(struct Scene *blenderscene, struct World* blenderworld)
+BlenderWorldInfo::BlenderWorldInfo(struct Scene *blenderscene, struct World *blenderworld)
 {
-	if (blenderworld)
-	{
+	if (blenderworld) {
 		m_hasworld = true;
 
 		// do we have mist?
-		if ((blenderworld->mode) & WO_MIST)
-		{
+		if ((blenderworld->mode) & WO_MIST) {
 			m_hasmist = true;
 			m_miststart = blenderworld->miststa;
 			m_mistdistance = blenderworld->mistdist;
 			copy_v3_v3(m_mistcolor, &blenderworld->horr);
 		}
-		else
-		{
+		else {
 			m_hasmist = false;
 			m_miststart = 0.0;
 			m_mistdistance = 0.0;
@@ -95,53 +92,39 @@ BlenderWorldInfo::BlenderWorldInfo(struct Scene *blenderscene, struct World* ble
 			linearrgb_to_srgb_v3_v3(m_ambientcolor, m_ambientcolor);
 		}
 	}
-	else
-	{
+	else {
 		m_hasworld = false;
 	}
 }
 
-
-
 BlenderWorldInfo::~BlenderWorldInfo()
 {
-
 }
 
-
 bool BlenderWorldInfo::hasWorld()
 {
 	return m_hasworld;
 }
 
-
-
 bool BlenderWorldInfo::hasMist()
 {
 	return m_hasmist;
 }
 
-
-
 float BlenderWorldInfo::getBackColorRed()
 {
 	return m_backgroundcolor[0];
 }
 
-
-
 float BlenderWorldInfo::getBackColorGreen()
 {
 	return m_backgroundcolor[1];
-}  
-
-
+}
 
 float BlenderWorldInfo::getBackColorBlue()
 {
 	return m_backgroundcolor[2];
-}  
-
+}
 
 float BlenderWorldInfo::getAmbientColorRed()
 {
@@ -163,28 +146,20 @@ float BlenderWorldInfo::getMistStart()
 	return m_miststart;
 }
 
-
-
 float BlenderWorldInfo::getMistDistance()
 {
 	return m_mistdistance;
 }
 
-
-
 float BlenderWorldInfo::getMistColorRed()
 {
 	return m_mistcolor[0];
 }
 
-
-
 float BlenderWorldInfo::getMistColorGreen()
 {
 	return m_mistcolor[1];
-}   
-
-
+}
 
 float BlenderWorldInfo::getMistColorBlue()
 {
@@ -198,41 +173,27 @@ void BlenderWorldInfo::setBackColor(float r, float g, float b)
 	m_backgroundcolor[2] = b;
 }
 
-	void
-BlenderWorldInfo::setMistStart(
-	float d
-) {
+void BlenderWorldInfo::setMistStart(float d)
+{
 	m_miststart = d;
 }
 
-
-	void
-BlenderWorldInfo::setMistDistance(
-	float d
-) {
+void BlenderWorldInfo::setMistDistance(float d)
+{
 	m_mistdistance = d;
 }
 
-
-	void
-BlenderWorldInfo::setMistColorRed(
-	float d
-) {
+void BlenderWorldInfo::setMistColorRed(float d)
+{
 	m_mistcolor[0] = d;
 }
 
-
-	void
-BlenderWorldInfo::setMistColorGreen(
-	float d
-) {
+void BlenderWorldInfo::setMistColorGreen(float d)
+{
 	m_mistcolor[1] = d;
 }
 
-
-	void
-BlenderWorldInfo::setMistColorBlue(
-	float d
-) {
+void BlenderWorldInfo::setMistColorBlue(float d)
+{
 	m_mistcolor[2] = d;
 }
diff --git a/source/gameengine/Converter/BlenderWorldInfo.h b/source/gameengine/Converter/BlenderWorldInfo.h
index af535d6..2ac2d70 100644
--- a/source/gameengine/Converter/BlenderWorldInfo.h
+++ b/source/gameengine/Converter/BlenderWorldInfo.h
@@ -36,68 +36,44 @@
 
 class BlenderWorldInfo : public KX_WorldInfo
 {
-	bool			m_hasworld;
-	float			m_backgroundcolor[3];
+	bool m_hasworld;
+	float m_backgroundcolor[3];
 
-	bool			m_hasmist;
-	float			m_miststart;
-	float			m_mistdistance;
-	float			m_mistcolor[3];
+	bool m_hasmist;
+	float m_miststart;
+	float m_mistdistance;
+	float m_mistcolor[3];
 
-	float			m_ambientcolor[3];
+	float m_ambientcolor[3];
 
 public:
-	BlenderWorldInfo(struct Scene *blenderscene, struct World* blenderworld);
+	BlenderWorldInfo(struct Scene *blenderscene, struct World *blenderworld);
 	~BlenderWorldInfo();
 
-	bool	hasWorld();
-	bool	hasMist();
-	float	getBackColorRed();
-	float	getBackColorGreen();
-	float	getBackColorBlue();
-	
-	float	getAmbientColorRed();
-	float	getAmbientColorGreen();
-	float	getAmbientColorBlue();
+	bool hasWorld();
+	bool hasMist();
+	float getBackColorRed();
+	float getBackColorGreen();
+	float getBackColorBlue();
 
-	float	getMistStart();
-	float	getMistDistance();
-	float	getMistColorRed();
-	float	getMistColorGreen();
-	float	getMistColorBlue();
+	float getAmbientColorRed();
+	float getAmbientColorGreen();
+	float getAmbientColorBlue();
 
-	void
-	setBackColor(
-		float r,
-		float g,
-		float b
-	);
-		void
-	setMistStart(
-		float d
-	);
+	float getMistStart();
+	float getMistDistance();
+	float getMistColorRed();
+	float getMistColorGreen();
+	float getMistColorBlue();
 
-		void
-	setMistDistance(
-		float d
-	);
+	void setBackColor(float r, float g, float b);
+	void setMistStart(float d);
+	void setMistDistance(float d);
+	void setMistColorRed(float d);
+	void setMistColorGreen(float d);
+	void setMistColorBlue(float d);
 
-		void
-	setMistColorRed(
-		float d
-	);
 
-		void
-	setMistColorGreen(
-		float d
-	);
-
-		void
-	setMistColorBlue(
-		float d
-	);   
-	
-	
 #ifdef WITH_CXX_GUARDEDALLOC
 	MEM_CXX_CLASS_ALLOC_FUNCS("GE:BlenderWorldInfo")
 #endif
diff --git a/source/gameengine/Ketsji/KX_PythonInit.h b/source/gameengine/Ketsji/KX_PythonInit.h
index 859c31a..719a74e 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.h
+++ b/source/gameengine/Ketsji/KX_PythonInit.h
@@ -34,32 +34,33 @@
 
 #include "KX_Python.h"
 #include "STR_String.h"
+#include "MT_Vector3.h"
 
 typedef enum {
 	psl_Lowest = 0,
-	psl_Highest
+	psl_Highest,
 } TPythonSecurityLevel;
 
 extern bool gUseVisibilityTemp;
 
 #ifdef WITH_PYTHON
-PyObject*	initGameLogic(class KX_KetsjiEngine *engine, class KX_Scene* ketsjiscene);
-PyObject*	initGameKeys();
-PyObject*	initRasterizer(class RAS_IRasterizer* rasty,class RAS_ICanvas* canvas);
-PyObject*	initGamePlayerPythonScripting(const STR_String& progname, TPythonSecurityLevel level, struct Main *maggie, int argc, char** argv);
-PyObject*	initVideoTexture(void); 
-void		exitGamePlayerPythonScripting();
-PyObject*	initGamePythonScripting(const STR_String& progname, TPythonSecurityLevel level, struct Main *maggie);
-void		exitGamePythonScripting();
-
+PyObject *initGameLogic(class KX_KetsjiEngine *engine, class KX_Scene *ketsjiscene);
+PyObject *initGameKeys();
+PyObject *initRasterizer(class RAS_IRasterizer *rasty,class RAS_ICanvas *canvas);
+PyObject *initGamePlayerPythonScripting(const STR_String &progname, TPythonSecurityLevel level,
+                                        struct Main *maggie, int argc, char **argv);
+PyObject *initVideoTexture(void); 
+PyObject *initGamePythonScripting(const STR_String &progname, TPythonSecurityLevel level, struct Main *maggie);
+
+void exitGamePlayerPythonScripting();
+void exitGamePythonScripting();
 void setupGamePython(KX_KetsjiEngine *ketsjiengine, KX_Scene *startscene, Main *blenderdata,
-                     PyObject *pyGlobalDict, PyObject **gameLogic, PyObject **gameLogic_keys, int argc, char** argv);
-
-void		setGamePythonPath(const char *path);
-void		resetGamePythonPath();
-void		pathGamePythonConfig( char *path );
-int			saveGamePythonConfig( char **marshal_buffer);
-int			loadGamePythonConfig(char *marshal_buffer, int marshal_length);
+                     PyObject *pyGlobalDict, PyObject **gameLogic, PyObject **gameLogic_keys, int argc, char **argv);
+void setGamePythonPath(const char *path);
+void resetGamePythonPath();
+void pathGamePythonConfig(char *path);
+int saveGamePythonConfig(char **marshal_buffer);
+int loadGamePythonConfig(char *marshal_buffer, int marshal_length);
 #endif
 
 void addImportMain(struct Main *maggie);
@@ -68,9 +69,9 @@ void removeImportMain(struct Main *maggie);
 class KX_KetsjiEngine;
 class KX_Scene;
 
-void KX_SetActiveScene(class KX_Scene* scene);
-class KX_Scene* KX_GetActiveScene();
-class KX_KetsjiEngine* KX_GetActiveEngine();
+void KX_SetActiveScene(class KX_Scene *scene);
+class KX_Scene *KX_GetActiveScene();
+class KX_KetsjiEngine *KX_GetActiveEngine();
 
 typedef int (*PyNextFrameFunc)(void *);
 
@@ -82,11 +83,9 @@ struct PyNextFrameState {
 };
 extern struct PyNextFrameState pynextframestate;
 
-#include "MT_Vector3.h"
-
-void		KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color);
-void		KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
-                                         const MT_Vector3& normal, int nsector);
+void KX_RasterizerDrawDebugLine(const MT_Vector3 &from,const MT_Vector3 &to,const MT_Vector3 &color);
+void KX_RasterizerDrawDebugCircle(const MT_Vector3 &center, const MT_Scalar radius, const MT_Vector3 &color,
+                                  const MT_Vector3 &normal, int nsector);
 
 
 #endif  /* __KX_PYTHONINIT_H__ */
diff --git a/source/gameengine/Ketsji/KX_WorldInfo.h b/source/gameengine/Ketsji/KX_WorldInfo.h
index a64ca5c..90b16fe 100644
--- a/source/gameengine/Ketsji/KX_WorldInfo.h
+++ b/source/gameengine/Ketsji/KX_WorldInfo.h
@@ -46,29 +46,29 @@ public:
 	KX_WorldInfo() {}
 	virtual ~KX_WorldInfo();
 
-	virtual bool	hasWorld()=0;
-	virtual bool	hasMist()=0;
-	virtual float	getBackColorRed()=0;
-	virtual float	getBackColorGreen()=0;
-	virtual float	getBackColorBlue()=0;
-	virtual float	getMistStart()=0;
-	virtual float	getMistDistance()=0;
-	virtual float	getMistColorRed()=0;
-	virtual float	getMistColorGreen()=0;
-	virtual float	getMistColorBlue()=0;
+	virtual bool hasWorld() = 0;
+	virtual bool hasMist() = 0;
+	virtual float getBackColorRed() = 0;
+	virtual float getBackColorGreen() = 0;
+	virtual float getBackColorBlue() = 0;
+	virtual float getMistStart() = 0;
+	virtual float getMistDistance() = 0;
+	virtual float getMistColorRed() = 0;
+	virtual float getMistColorGreen() = 0;
+	virtual float getMistColorBlue() = 0;
+
+	virtual float getAmbientColorRed() = 0;
+	virtual float getAmbientColorGreen() = 0;
+	virtual float getAmbientColorBlue() = 0;
+
+	virtual void setBackColor(float, float, float) = 0;
+	virtual void setMistStart(float) = 0;
+	virtual void setMistDistance(float) = 0;
+	virtual void setMistColorRed(float) = 0;
+	virtual void setMistColorGreen(float) = 0;
+	virtual void setMistColorBlue(float) = 0;
 
-	virtual float	getAmbientColorRed()=0;
-	virtual float	getAmbientColorGreen()=0;
-	virtual float	getAmbientColorBlue()=0;
 
-	virtual void	setBackC

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list