From 89a963fb7fdff543b77de790355b9dac3019bd33 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Mar 2012 18:28:30 +0000 Subject: style cleanup: comment blocks --- source/gameengine/Converter/BL_ActionActuator.cpp | 4 +- source/gameengine/Converter/BL_ArmatureChannel.h | 4 +- .../Converter/BL_BlenderDataConversion.cpp | 7 +- .../gameengine/Converter/KX_ConvertActuators.cpp | 42 ++--- source/gameengine/Converter/KX_ConvertSensors.cpp | 8 +- source/gameengine/Expressions/BoolValue.cpp | 6 +- source/gameengine/Expressions/BoolValue.h | 2 +- source/gameengine/Expressions/EmptyValue.h | 2 +- source/gameengine/Expressions/ErrorValue.h | 2 +- source/gameengine/Expressions/Expression.h | 2 +- source/gameengine/Expressions/FloatValue.h | 2 +- source/gameengine/Expressions/IfExpr.cpp | 28 +-- source/gameengine/Expressions/InputParser.cpp | 12 +- source/gameengine/Expressions/IntValue.cpp | 9 +- source/gameengine/Expressions/IntValue.h | 2 +- source/gameengine/Expressions/ListValue.h | 2 +- source/gameengine/Expressions/Operator2Expr.h | 2 +- source/gameengine/Expressions/PyObjectPlus.h | 8 +- source/gameengine/Expressions/StringValue.cpp | 36 ++-- source/gameengine/Expressions/Value.h | 2 +- source/gameengine/Expressions/VectorValue.cpp | 17 +- source/gameengine/Expressions/VectorValue.h | 8 +- .../gameengine/GameLogic/Joystick/SCA_Joystick.h | 2 +- source/gameengine/GamePlayer/common/GPC_Canvas.cpp | 16 +- source/gameengine/Ketsji/BL_Material.h | 10 +- .../Ketsji/KX_BulletPhysicsController.cpp | 10 +- source/gameengine/Ketsji/KX_Camera.cpp | 34 ++-- source/gameengine/Ketsji/KX_Camera.h | 9 +- source/gameengine/Ketsji/KX_CameraActuator.cpp | 8 +- source/gameengine/Ketsji/KX_ConstraintActuator.cpp | 4 +- .../gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 4 +- source/gameengine/Ketsji/KX_Dome.cpp | 204 ++++++++++----------- source/gameengine/Ketsji/KX_Dome.h | 7 +- source/gameengine/Ketsji/KX_FontObject.cpp | 4 +- source/gameengine/Ketsji/KX_FontObject.h | 4 +- source/gameengine/Ketsji/KX_GameObject.cpp | 6 +- source/gameengine/Ketsji/KX_IPhysicsController.h | 10 +- source/gameengine/Ketsji/KX_ISceneConverter.h | 10 +- source/gameengine/Ketsji/KX_IpoActuator.h | 6 +- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 10 +- source/gameengine/Ketsji/KX_MouseFocusSensor.cpp | 10 +- source/gameengine/Ketsji/KX_MouseFocusSensor.h | 2 +- source/gameengine/Ketsji/KX_NearSensor.h | 4 +- source/gameengine/Ketsji/KX_PythonInit.cpp | 2 +- source/gameengine/Ketsji/KX_PythonInitTypes.cpp | 6 +- source/gameengine/Ketsji/KX_RadarSensor.h | 4 +- source/gameengine/Ketsji/KX_RaySensor.cpp | 2 +- source/gameengine/Ketsji/KX_Scene.cpp | 4 +- source/gameengine/Ketsji/KX_Scene.h | 8 +- .../gameengine/Rasterizer/RAS_2DFilterManager.cpp | 10 +- .../RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp | 10 +- source/gameengine/VideoTexture/BlendType.h | 2 +- source/gameengine/VideoTexture/Common.h | 14 +- source/gameengine/VideoTexture/Exception.h | 2 +- source/gameengine/VideoTexture/FilterBase.h | 2 +- source/gameengine/VideoTexture/FilterBlueScreen.h | 2 +- source/gameengine/VideoTexture/FilterColor.h | 2 +- source/gameengine/VideoTexture/FilterNormal.h | 2 +- source/gameengine/VideoTexture/FilterSource.h | 2 +- source/gameengine/VideoTexture/ImageBase.h | 2 +- source/gameengine/VideoTexture/ImageBuff.h | 2 +- source/gameengine/VideoTexture/ImageMix.h | 2 +- source/gameengine/VideoTexture/ImageRender.h | 2 +- source/gameengine/VideoTexture/ImageViewport.h | 2 +- source/gameengine/VideoTexture/PyTypeList.h | 2 +- source/gameengine/VideoTexture/Texture.h | 2 +- source/gameengine/VideoTexture/VideoBase.h | 2 +- source/gameengine/VideoTexture/VideoFFmpeg.h | 2 +- 68 files changed, 334 insertions(+), 339 deletions(-) (limited to 'source/gameengine') diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 28b03b56370..5d87e7fd969 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -401,12 +401,12 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* value) PyTuple_SET_ITEM(ret, 2, list); return ret; -/* +#if 0 return Py_BuildValue("([fff][fff][ffff])", pchan->loc[0], pchan->loc[1], pchan->loc[2], pchan->size[0], pchan->size[1], pchan->size[2], pchan->quat[0], pchan->quat[1], pchan->quat[2], pchan->quat[3] ); -*/ +#endif } /* setChannel */ diff --git a/source/gameengine/Converter/BL_ArmatureChannel.h b/source/gameengine/Converter/BL_ArmatureChannel.h index 3fd49c276ae..cd38ee2d531 100644 --- a/source/gameengine/Converter/BL_ArmatureChannel.h +++ b/source/gameengine/Converter/BL_ArmatureChannel.h @@ -72,8 +72,8 @@ public: }; /* this is a factory class to access bBone data field in the GE. - It's not supposed to be instantiated, we only need it for the Attributes and Method array. - The actual proxy object will be manually created using NewProxyPtr */ + * It's not supposed to be instantiated, we only need it for the Attributes and Method array. + * The actual proxy object will be manually created using NewProxyPtr */ class BL_ArmatureBone : public PyObjectPlus { // use Py_HeaderPtr since we use generic pointer in proxy diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 066cfe63bb5..89877261cd7 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1071,15 +1071,16 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene, * "Texture Face/Singletexture" we can then think about it */ /* Texture Face mode ignores texture but requires "Face Textures to be True "*/ - /** +#if 0 if ((ma->mode &MA_FACETEXTURE)==0 && (ma->game.flag &GEMAT_TEXT)==0) { bima = NULL; imastr = ""; alpha_blend = GEMAT_SOLID; } - else + else { alpha_blend = ma->game.alpha_blend; - */ + } +#endif } /* check for tface tex to fallback on */ else { diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 135a3b20d96..04342717555 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -106,8 +106,8 @@ #include "BL_BlenderDataConversion.h" /** -KX_BLENDERTRUNC needed to round 'almost' zero values to zero, else velocities etc. are incorrectly set -*/ + * KX_BLENDERTRUNC needed to round 'almost' zero values to zero, else velocities etc. are incorrectly set + */ #define KX_BLENDERTRUNC(x) (( x < 0.0001 && x > -0.0001 ) ? 0.0 : x) @@ -310,30 +310,26 @@ void BL_ConvertActuators(const char* maggiename, { bMessageActuator *msgAct = (bMessageActuator *) bact->data; - /** - * Get the name of the properties that objects must own that - * we're sending to, if present - */ + /* Get the name of the properties that objects must own that + * we're sending to, if present + */ STR_String toPropName = (msgAct->toPropName ? (char*) msgAct->toPropName : ""); - /** - * Get the Message Subject to send. - */ + /* Get the Message Subject to send. + */ STR_String subject = (msgAct->subject ? (char*) msgAct->subject : ""); - /** - * Get the bodyType - */ + /* Get the bodyType + */ int bodyType = msgAct->bodyType; - /** - * Get the body (text message or property name whose value - * we'll be sending, might be empty - */ + /* Get the body (text message or property name whose value + * we'll be sending, might be empty + */ STR_String body = (msgAct->body ? (char*) msgAct->body : ""); @@ -451,13 +447,13 @@ void BL_ConvertActuators(const char* maggiename, SCA_IObject* destinationObj = NULL; /* - here the destinationobject is searched. problem with multiple scenes: other scenes - have not been converted yet, so the destobj will not be found, so the prop will - not be copied. - possible solutions: - - convert everything when possible and not realtime only when needed. - - let the object-with-property report itself to the act when converted - */ + * here the destinationobject is searched. problem with multiple scenes: other scenes + * have not been converted yet, so the destobj will not be found, so the prop will + * not be copied. + * possible solutions: + * - convert everything when possible and not realtime only when needed. + * - let the object-with-property report itself to the act when converted + */ if (propact->ob) destinationObj = converter->FindGameObject(propact->ob); diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index a672e9cd9b8..fa9eb5317b9 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -50,7 +50,7 @@ #include "DNA_material_types.h" #include "DNA_sensor_types.h" #include "DNA_actuator_types.h" /* for SENS_ALL_KEYS ? this define is -probably misplaced */ + * probably misplaced */ /* end of blender include block */ #include "RAS_IPolygonMaterial.h" @@ -315,9 +315,9 @@ void BL_ConvertSensors(struct Object* blenderobject, bMouseSensor *bmouse = (bMouseSensor *)sens->data; /* There are two main types of mouse sensors. If there is - * no focus-related behavior requested, we can make do - * with a basic sensor. This cuts down memory usage and - * gives a slight performance gain. */ + * no focus-related behavior requested, we can make do + * with a basic sensor. This cuts down memory usage and + * gives a slight performance gain. */ SCA_MouseManager *eventmgr = (SCA_MouseManager*) logicmgr->FindEventManager(SCA_EventManager::MOUSE_EVENTMGR); diff --git a/source/gameengine/Expressions/BoolValue.cpp b/source/gameengine/Expressions/BoolValue.cpp index 113d12b7d59..b3c4dc144df 100644 --- a/source/gameengine/Expressions/BoolValue.cpp +++ b/source/gameengine/Expressions/BoolValue.cpp @@ -30,9 +30,9 @@ const STR_String CBoolValue::sFalseString = "FALSE"; CBoolValue::CBoolValue() /* -pre: false -effect: constructs a new CBoolValue -*/ + * pre: false + * effect: constructs a new CBoolValue + */ { trace("Bool constructor error"); } diff --git a/source/gameengine/Expressions/BoolValue.h b/source/gameengine/Expressions/BoolValue.h index 00baeba0857..23c8ef5b0e9 100644 --- a/source/gameengine/Expressions/BoolValue.h +++ b/source/gameengine/Expressions/BoolValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _BOOLVALUE_H +#ifndef _BOOLVALUE_H #define _BOOLVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/EmptyValue.h b/source/gameengine/Expressions/EmptyValue.h index 1da0ee8e928..d7212c55adf 100644 --- a/source/gameengine/Expressions/EmptyValue.h +++ b/source/gameengine/Expressions/EmptyValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _EMPTYVALUE_H +#ifndef _EMPTYVALUE_H #define _EMPTYVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/ErrorValue.h b/source/gameengine/Expressions/ErrorValue.h index ec81fc2c82b..55d799cc5e4 100644 --- a/source/gameengine/Expressions/ErrorValue.h +++ b/source/gameengine/Expressions/ErrorValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _ERRORVALUE_H +#ifndef _ERRORVALUE_H #define _ERRORVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/Expression.h b/source/gameengine/Expressions/Expression.h index b9232477c34..b4d12e6328c 100644 --- a/source/gameengine/Expressions/Expression.h +++ b/source/gameengine/Expressions/Expression.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _EXPRESSION_H +#ifndef _EXPRESSION_H #define _EXPRESSION_H #include "Value.h" diff --git a/source/gameengine/Expressions/FloatValue.h b/source/gameengine/Expressions/FloatValue.h index 8dfb42d6b2e..6276e533547 100644 --- a/source/gameengine/Expressions/FloatValue.h +++ b/source/gameengine/Expressions/FloatValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _FLOATVALUE_H +#ifndef _FLOATVALUE_H #define _FLOATVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/IfExpr.cpp b/source/gameengine/Expressions/IfExpr.cpp index 9e6d80ab468..baf91e4a5c3 100644 --- a/source/gameengine/Expressions/IfExpr.cpp +++ b/source/gameengine/Expressions/IfExpr.cpp @@ -31,11 +31,11 @@ CIfExpr::CIfExpr() -CIfExpr::CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2) /* -pre: -effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) -*/ + * pre: + * effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) + */ +CIfExpr::CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2) { m_guard = guard; m_e1 = e1; @@ -44,11 +44,11 @@ effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) -CIfExpr::~CIfExpr() /* -pre: -effect: dereferences the object -*/ + * pre: + * effect: dereferences the object + */ +CIfExpr::~CIfExpr() { if (m_guard) m_guard->Release(); @@ -62,13 +62,13 @@ effect: dereferences the object +/** + * pre: + * ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE + * a new object containing the value of m_e2 if m_guard is a boolean FALSE + * an new errorvalue if m_guard is not a boolean + */ CValue* CIfExpr::Calculate() -/* -pre: -ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE - a new object containing the value of m_e2 if m_guard is a boolean FALSE - an new errorvalue if m_guard is not a boolean -*/ { CValue *guardval; guardval = m_guard->Calculate(); diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp index 9f0def6e866..e13cb8200b1 100644 --- a/source/gameengine/Expressions/InputParser.cpp +++ b/source/gameengine/Expressions/InputParser.cpp @@ -579,12 +579,12 @@ CExpression* CParser::ProcessText } ch = text[0]; - /*if (ch != '=') { - expr = new CConstExpr(new CStringValue(text)); - *dependent = deplist; - return expr; - } else - */ + /* if (ch != '=') { + * expr = new CConstExpr(new CStringValue(text)); + * *dependent = deplist; + * return expr; + * } else + */ // NextCh(); NextSym(); expr = Expr(); diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp index c03c97311c7..20a4bbc0405 100644 --- a/source/gameengine/Expressions/IntValue.cpp +++ b/source/gameengine/Expressions/IntValue.cpp @@ -278,12 +278,11 @@ this object } - +/** + * pre: + * ret: the cInt stored in the object + */ cInt CIntValue::GetInt() -/* -pre: -ret: the cInt stored in the object -*/ { return m_int; } diff --git a/source/gameengine/Expressions/IntValue.h b/source/gameengine/Expressions/IntValue.h index e6802b6ad04..09cf910dbc3 100644 --- a/source/gameengine/Expressions/IntValue.h +++ b/source/gameengine/Expressions/IntValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _INTVALUE_H +#ifndef _INTVALUE_H #define _INTVALUE_H diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h index 4446b40af16..4d97c6cc29c 100644 --- a/source/gameengine/Expressions/ListValue.h +++ b/source/gameengine/Expressions/ListValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _LISTVALUE_H +#ifndef _LISTVALUE_H #define _LISTVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/Operator2Expr.h b/source/gameengine/Expressions/Operator2Expr.h index f003696b580..261fef106df 100644 --- a/source/gameengine/Expressions/Operator2Expr.h +++ b/source/gameengine/Expressions/Operator2Expr.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _OPERATOR2EXPR_H +#ifndef _OPERATOR2EXPR_H #define _OPERATOR2EXPR_H diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index e3701b8793c..6de0f3fa8d5 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -609,10 +609,10 @@ public: static PyObject *GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr); /* self=NULL => proxy to generic pointer detached from GE object - if py_owns is true, the memory pointed by ptr will be deleted automatically with MEM_freeN - self!=NULL=> proxy attached to GE object, ptr is optional and point to a struct from which attributes can be defined - if py_owns is true, the object will be deleted automatically, ptr will NOT be deleted - (assume object destructor takes care of it) */ + * if py_owns is true, the memory pointed by ptr will be deleted automatically with MEM_freeN + * self!=NULL=> proxy attached to GE object, ptr is optional and point to a struct from which attributes can be defined + * if py_owns is true, the object will be deleted automatically, ptr will NOT be deleted + * (assume object destructor takes care of it) */ static PyObject *NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr, bool py_owns); static WarnLink* GetDeprecationWarningLinkFirst(void); diff --git a/source/gameengine/Expressions/StringValue.cpp b/source/gameengine/Expressions/StringValue.cpp index 29c72a29b71..2e29a39222b 100644 --- a/source/gameengine/Expressions/StringValue.cpp +++ b/source/gameengine/Expressions/StringValue.cpp @@ -24,20 +24,20 @@ // Construction/Destruction ////////////////////////////////////////////////////////////////////// +/** + * pre: false + * effect: constructs a new CStringValue + */ CStringValue::CStringValue() -/* -pre: false -effect: constructs a new CStringValue -*/ { m_strString = "[Illegal String constructor call]"; } +/** + * pre: + * effect: constructs a new CStringValue containing text txt + */ CStringValue::CStringValue(const char *txt,const char *name,AllocationTYPE alloctype) -/* -pre: -effect: constructs a new CStringValue containing text txt -*/ { m_strString = txt; SetName(name); @@ -52,23 +52,23 @@ effect: constructs a new CStringValue containing text txt } +/** + * pre: + * ret: a new object containing the result of applying operator op to this + * object and val + */ CValue* CStringValue::Calc(VALUE_OPERATOR op, CValue *val) -/* -pre: -ret: a new object containing the result of applying operator op to this -object and val -*/ { //return val->CalrcString(op, this); return val->CalcFinal(VALUE_STRING_TYPE, op, this); } +/** + * pre: the type of val is dtype + * ret: a new object containing the result of applying operator op to val and + * this object + */ CValue* CStringValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) -/* -pre: the type of val is dtype -ret: a new object containing the result of applying operator op to val and -this object -*/ { CValue *ret; diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h index 3a81ec05d5b..00320ff9ed2 100644 --- a/source/gameengine/Expressions/Value.h +++ b/source/gameengine/Expressions/Value.h @@ -152,7 +152,7 @@ struct ValueFlags { /** * Base Class for all Actions performed on CValue's. Can be extended for undo/redo system in future. -*/ + */ class CAction { public: diff --git a/source/gameengine/Expressions/VectorValue.cpp b/source/gameengine/Expressions/VectorValue.cpp index 07a2743b19f..65f5d7d3d22 100644 --- a/source/gameengine/Expressions/VectorValue.cpp +++ b/source/gameengine/Expressions/VectorValue.cpp @@ -87,12 +87,12 @@ CVectorValue::~CVectorValue() } +/** + * pre: the type of val is dtype + * ret: a new object containing the result of applying operator op to val and + * this object + */ CValue* CVectorValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) -/* -pre: the type of val is dtype -ret: a new object containing the result of applying operator op to val and -this object -*/ { CValue *ret = NULL; @@ -210,10 +210,9 @@ CValue* CVectorValue::GetReplica() return replica; }; -/*void CVectorValue::Transform(rcMatrix4x4 mat) +#if 0 +void CVectorValue::Transform(rcMatrix4x4 mat) { m_transformedvec = mat*m_vec; } -*/ - - +#endif diff --git a/source/gameengine/Expressions/VectorValue.h b/source/gameengine/Expressions/VectorValue.h index 6ff47843282..6158d6773ff 100644 --- a/source/gameengine/Expressions/VectorValue.h +++ b/source/gameengine/Expressions/VectorValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _VECTORVALUE_H +#ifndef _VECTORVALUE_H #define _VECTORVALUE_H #include "Value.h" @@ -59,7 +59,7 @@ public: virtual CValue* GetReplica(); virtual const STR_String & GetText(); -/* +#if 0 void SnapPoint(float num,int snap) { if (num > 0) num += ((float)snap / 2); @@ -78,8 +78,8 @@ public: SnapPoint(m_vec[KX_Z],snapvec[KX_Z]); } -*/ - +#endif + protected: double m_vec[3]; double m_transformedvec[3]; diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h index ba4a64a138c..a992150fad3 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h @@ -74,7 +74,7 @@ class SCA_Joystick /** * max # of buttons avail - */ + */ int m_axismax; int m_buttonmax; diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp index 15211247d26..0915326c8eb 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp @@ -442,17 +442,17 @@ MakeScreenShot( png_init_io(png_ptr, fp); - /* +#if 0 png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS); + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); - */ +#endif // png image settings png_set_IHDR(png_ptr, diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index 2c6316ea32b..7b1779fed10 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -24,11 +24,11 @@ struct EnvMap; // -- /** max units - this will default to users available units - to build with more available, just increment this value - although the more you add the slower the search time will be. - we will go for eight, which should be enough -*/ + * this will default to users available units + * to build with more available, just increment this value + * although the more you add the slower the search time will be. + * we will go for eight, which should be enough + */ #define MAXTEX 8 //match in RAS_TexVert & RAS_OpenGLRasterizer // different mapping modes diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp index 3febff92e18..9940b400527 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp @@ -235,9 +235,9 @@ void KX_BulletPhysicsController::setRigidBody(bool rigid) } /* This function dynamically adds the collision shape of another controller to - the current controller shape provided it is a compound shape. - The idea is that dynamic parenting on a compound object will dynamically extend the shape -*/ + * the current controller shape provided it is a compound shape. + * The idea is that dynamic parenting on a compound object will dynamically extend the shape + */ void KX_BulletPhysicsController::AddCompoundChild(KX_IPhysicsController* child) { if (child == NULL || !IsCompound()) @@ -308,8 +308,8 @@ void KX_BulletPhysicsController::AddCompoundChild(KX_IPhysicsController* chil } /* Reverse function of the above, it will remove a shape from a compound shape - provided that the former was added to the later using AddCompoundChild() -*/ + * provided that the former was added to the later using AddCompoundChild() + */ void KX_BulletPhysicsController::RemoveCompoundChild(KX_IPhysicsController* child) { if (child == NULL || !IsCompound()) diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 14a307794db..7a2d71f56ff 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -133,8 +133,8 @@ const MT_Quaternion KX_Camera::GetCameraOrientation() const /** -* Sets the projection matrix that is used by the rasterizer. -*/ + * Sets the projection matrix that is used by the rasterizer. + */ void KX_Camera::SetProjectionMatrix(const MT_Matrix4x4 & mat) { m_projection_matrix = mat; @@ -146,8 +146,8 @@ void KX_Camera::SetProjectionMatrix(const MT_Matrix4x4 & mat) /** -* Sets the modelview matrix that is used by the rasterizer. -*/ + * Sets the modelview matrix that is used by the rasterizer. + */ void KX_Camera::SetModelviewMatrix(const MT_Matrix4x4 & mat) { m_modelview_matrix = mat; @@ -158,8 +158,8 @@ void KX_Camera::SetModelviewMatrix(const MT_Matrix4x4 & mat) /** -* Gets the projection matrix that is used by the rasterizer. -*/ + * Gets the projection matrix that is used by the rasterizer. + */ const MT_Matrix4x4& KX_Camera::GetProjectionMatrix() const { return m_projection_matrix; @@ -168,8 +168,8 @@ const MT_Matrix4x4& KX_Camera::GetProjectionMatrix() const /** -* Gets the modelview matrix that is used by the rasterizer. -*/ + * Gets the modelview matrix that is used by the rasterizer. + */ const MT_Matrix4x4& KX_Camera::GetModelviewMatrix() const { return m_modelview_matrix; @@ -187,9 +187,9 @@ void KX_Camera::InvalidateProjectionMatrix(bool valid) } -/* -* These getters retrieve the clip data and the focal length -*/ +/** + * These getters retrieve the clip data and the focal length + */ float KX_Camera::GetLens() const { return m_camdata.m_lens; @@ -200,17 +200,17 @@ float KX_Camera::GetScale() const return m_camdata.m_scale; } -/* -* Gets the horizontal size of the sensor - for camera matching. -*/ +/** + * Gets the horizontal size of the sensor - for camera matching. + */ float KX_Camera::GetSensorWidth() const { return m_camdata.m_sensor_x; } -/* -* Gets the vertical size of the sensor - for camera matching. -*/ +/** + * Gets the vertical size of the sensor - for camera matching. + */ float KX_Camera::GetSensorHeight() const { return m_camdata.m_sensor_y; diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h index 38fc170e371..7481b2eb7f0 100644 --- a/source/gameengine/Ketsji/KX_Camera.h +++ b/source/gameengine/Ketsji/KX_Camera.h @@ -63,12 +63,13 @@ protected: // Never used, I think... // void MoveTo(const MT_Point3& movevec) // { - /*MT_Transform camtrans; +#if 0 + MT_Transform camtrans; camtrans.invert(m_trans1); MT_Matrix3x3 camorient = camtrans.getBasis(); camtrans.translate(camorient.inverse()*movevec); m_trans1.invert(camtrans); - */ +#endif // } /** @@ -185,8 +186,8 @@ public: bool hasValidProjectionMatrix() const; /** Sets the validity of the projection matrix. Call this if you change camera - data (eg lens, near plane, far plane) and require the projection matrix to be - recalculated. + * data (eg lens, near plane, far plane) and require the projection matrix to be + * recalculated. */ void InvalidateProjectionMatrix(bool valid = false); diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 1361a6122ad..b683fcb8036 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -186,7 +186,7 @@ static void Kx_VecUpMat3(float vec[3], float mat[][3], short axis) mat[coz][2]= vec[2]; if (Kx_Normalize((float *)mat[coz]) == 0.f) { /* this is a very abnormal situation: the camera has reach the object center exactly - We will choose a completely arbitrary direction */ + * We will choose a completely arbitrary direction */ mat[coz][0] = 1.0f; mat[coz][1] = 0.0f; mat[coz][2] = 0.0f; @@ -239,9 +239,9 @@ bool KX_CameraActuator::Update(double curtime, bool frame) /* CONSTRAINT 6: again: fixed height relative to floor below actor */ /* CONSTRAINT 7: track to floor below actor */ /* CONSTRAINT 8: look a little bit left or right, depending on how the - - character is looking (horizontal x) - */ + * + * character is looking (horizontal x) + */ /* ...and then set the camera position. Since we assume the parent of */ /* this actuator is always a camera, just set the parent position and */ diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index f78ff0081b7..322d6e60071 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -147,8 +147,8 @@ bool KX_ConstraintActuator::RayHit(KX_ClientObjectInfo* client, KX_RayCast* resu return true; } -/* 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 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. */ bool KX_ConstraintActuator::NeedRayCast(KX_ClientObjectInfo* client) { diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 610200cc235..28e7f221ce4 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -464,7 +464,7 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, if (objprop->m_dyna && !objprop->m_angular_rigidbody) { - /* +#if 0 //setting the inertia could achieve similar results to constraint the up //but it is prone to instability, so use special 'Angular' constraint btVector3 inertia = physicscontroller->GetRigidBody()->getInvInertiaDiagLocal(); @@ -473,7 +473,7 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, physicscontroller->GetRigidBody()->setInvInertiaDiagLocal(inertia); physicscontroller->GetRigidBody()->updateInertiaTensor(); - */ +#endif //env->createConstraint(physicscontroller,0,PHY_ANGULAR_CONSTRAINT,0,0,0,0,0,1); diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index 6bd30685696..6e989dd4d7d 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -1,26 +1,26 @@ /* ------------------------------------------------------------------------------ - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. - -Contributor(s): Dalai Felinto - -This code is originally inspired on some of the ideas and codes from Paul Bourke. -Developed as part of a Research and Development project for SAT - La Société des arts technologiques. ------------------------------------------------------------------------------ -*/ + * ----------------------------------------------------------------------------- + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307, USA, or go to + * http://www.gnu.org/copyleft/lesser.txt. + * + * Contributor(s): Dalai Felinto + * + * This code is originally inspired on some of the ideas and codes from Paul Bourke. + * Developed as part of a Research and Development project for SAT - La Société des arts technologiques. + * ----------------------------------------------------------------------------- + */ /** \file gameengine/Ketsji/KX_Dome.cpp * \ingroup ketsji @@ -218,20 +218,20 @@ void KX_Dome::CreateGLImages(void) void KX_Dome::ClearGLImages(void) { glDeleteTextures(m_numimages, (GLuint*)&domefacesId); -/* +#if 0 for (int i=0;iGetWidth(); canvasheight = m_canvas->GetHeight(); @@ -453,28 +453,28 @@ void KX_Dome::GLDrawWarpQuads(void) bool KX_Dome::ParseWarpMesh(STR_String text) { -/* -//Notes about the supported data format: -File example:: - mode - width height - n0_x n0_y n0_u n0_v n0_i - n1_x n1_y n1_u n1_v n1_i - n2_x n1_y n2_u n2_v n2_i - n3_x n3_y n3_u n3_v n3_i - (...) -First line is the image type the mesh is support to be applied to: 2 = fisheye, 1=radial -Tthe next line has the mesh dimensions -Rest of the lines are the nodes of the mesh. Each line has x y u v i - (x,y) are the normalised screen coordinates - (u,v) texture coordinates - i a multiplicative intensity factor - -x varies from -screen aspect to screen aspect -y varies from -1 to 1 -u and v vary from 0 to 1 -i ranges from 0 to 1, if negative don't draw that mesh node -*/ + /* + * //Notes about the supported data format: + * File example:: + * mode + * width height + * n0_x n0_y n0_u n0_v n0_i + * n1_x n1_y n1_u n1_v n1_i + * n2_x n1_y n2_u n2_v n2_i + * n3_x n3_y n3_u n3_v n3_i + * (...) + * First line is the image type the mesh is support to be applied to: 2 = fisheye, 1=radial + * Tthe next line has the mesh dimensions + * Rest of the lines are the nodes of the mesh. Each line has x y u v i + * (x,y) are the normalised screen coordinates + * (u,v) texture coordinates + * i a multiplicative intensity factor + * + * x varies from -screen aspect to screen aspect + * y varies from -1 to 1 + * u and v vary from 0 to 1 + * i ranges from 0 to 1, if negative don't draw that mesh node + */ int i; int nodeX=0, nodeY=0; @@ -532,16 +532,16 @@ i ranges from 0 to 1, if negative don't draw that mesh node void KX_Dome::CreateMeshDome180(void) { -/* -1)- Define the faces of half of a cube - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts -4) Flatten onto xz plane - - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image -*/ + /* + * 1)- Define the faces of half of a cube + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts + * 4) Flatten onto xz plane + * - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image + */ int i,j; float uv_ratio = (float)(m_buffersize-1) / m_imagesize; @@ -711,16 +711,16 @@ void KX_Dome::CreateMeshDome180(void) void KX_Dome::CreateMeshDome250(void) { -/* -1)- Define the faces of a cube without the back face - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts -4) Flatten onto xz plane - - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image -*/ + /* + * 1)- Define the faces of a cube without the back face + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts + * 4) Flatten onto xz plane + * - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image + */ int i,j; float uv_height, uv_base; @@ -730,20 +730,20 @@ void KX_Dome::CreateMeshDome250(void) float uv_ratio = (float)(m_buffersize-1) / m_imagesize; m_radangle = m_angle * M_PI/180.0;//calculates the radians angle, used for flattening -/* -verts_height is the exactly needed height of the cube faces (not always 1.0). -When we want some horizontal information (e.g. for horizontal 220deg domes) we don't need to create and tesselate the whole cube. -Therefore the lateral cube faces could be small, and the tesselate mesh would be completely used. -(if we always worked with verts_height = 1.0, we would be discarding a lot of the calculated and tesselated geometry). - -So I came out with this formula: -verts_height = tan((rad_ang/2) - (MT_PI/2))*sqrt(2.0); - -Here we take half the sphere(rad_ang/2) and subtract a quarter of it (MT_PI/2) -Therefore we have the length in radians of the dome/sphere over the horizon. -Once we take the tangent of that angle, you have the verts coordinate corresponding to the verts on the side faces. -Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on the diagonal of the original cube. -*/ + /* + * verts_height is the exactly needed height of the cube faces (not always 1.0). + * When we want some horizontal information (e.g. for horizontal 220deg domes) we don't need to create and tesselate the whole cube. + * Therefore the lateral cube faces could be small, and the tesselate mesh would be completely used. + * (if we always worked with verts_height = 1.0, we would be discarding a lot of the calculated and tesselated geometry). + * + * So I came out with this formula: + * verts_height = tan((rad_ang/2) - (MT_PI/2))*sqrt(2.0); + * + * Here we take half the sphere(rad_ang/2) and subtract a quarter of it (MT_PI/2) + * Therefore we have the length in radians of the dome/sphere over the horizon. + * Once we take the tangent of that angle, you have the verts coordinate corresponding to the verts on the side faces. + * Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on the diagonal of the original cube. + */ verts_height = tan((rad_ang/2) - (MT_PI/2))*M_SQRT2; uv_height = uv_ratio * ((verts_height/2) + 0.5); @@ -995,16 +995,16 @@ Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on t void KX_Dome::CreateMeshPanorama(void) { -/* -1)- Define the faces of a cube without the top and bottom faces - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts t -4) Flatten onto xz plane - - use spherical projection techniques to transform the sphere onto a flat panorama -*/ + /* + * 1)- Define the faces of a cube without the top and bottom faces + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts t + * 4) Flatten onto xz plane + * - use spherical projection techniques to transform the sphere onto a flat panorama + */ int i,j; float uv_ratio = (float)(m_buffersize-1) / m_imagesize; @@ -1432,10 +1432,10 @@ void KX_Dome::SplitFace(vector & face, int *nfaces) void KX_Dome::CalculateFrustum(KX_Camera * cam) { - /* +#if 0 // manually creating a 90deg Field of View Frustum - the original formula: + // the original formula: top = tan(fov*3.14159/360.0) * near [for fov in degrees] fov*0.5 = arctan ((top-bottom)*0.5 / near) [for fov in radians] bottom = -top @@ -1446,7 +1446,7 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam) glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(90.0,1.0,cam->GetCameraNear(),cam->GetCameraFar()); - */ +#endif RAS_FrameFrustum m_frustrum; //90 deg. Frustum @@ -1469,10 +1469,10 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam) void KX_Dome::CalculateCameraOrientation() { /* -Uses 4 cameras for angles up to 180deg -Uses 5 cameras for angles up to 250deg -Uses 6 cameras for angles up to 360deg -*/ + * Uses 4 cameras for angles up to 180deg + * Uses 5 cameras for angles up to 250deg + * Uses 6 cameras for angles up to 360deg + */ int i; float deg45 = MT_PI / 4; MT_Scalar c = cos(deg45); diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h index 922e2d4efb3..d4524d23d7d 100644 --- a/source/gameengine/Ketsji/KX_Dome.h +++ b/source/gameengine/Ketsji/KX_Dome.h @@ -26,8 +26,8 @@ Developed as part of a Research and Development project for SAT - La Soci�t� * \ingroup ketsji */ -#if !defined KX_DOME_H -#define KX_DOME_H +#ifndef __KX_DOME_H__ +#define __KX_DOME_H__ #include "KX_Scene.h" #include "KX_Camera.h" @@ -196,5 +196,4 @@ public: #endif }; -#endif - +#endif /* __KX_DOME_H__ */ diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 3739ad0d712..5a67b052a2b 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -92,8 +92,8 @@ KX_FontObject::KX_FontObject( void* sgReplicationInfo, m_fontid = GetFontId(text->vfont); /* initialize the color with the object color and store it in the KX_Object class - This is a workaround waiting for the fix: - [#25487] BGE: Object Color only works when it has a keyed frame */ + * This is a workaround waiting for the fix: + * [#25487] BGE: Object Color only works when it has a keyed frame */ copy_v4_v4(m_color, (const float*) ob->col); this->SetObjectColor((const MT_Vector4&) m_color); } diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index 2466a32dad4..affa882427f 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -69,13 +69,13 @@ protected: class RAS_IRenderTools* m_rendertools; //needed for drawing routine -/* +#if 0 // WHY COMMENTED? - campbell #ifdef WITH_CXX_GUARDEDALLOC public: void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_FontObject"); } void operator delete( void *mem ) { MEM_freeN(mem); } #endif -*/ +#endif #ifdef WITH_PYTHON static PyObject* pyattr_get_text(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 5c758379727..5db9958f269 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -540,8 +540,8 @@ void KX_GameObject::ApplyRotation(const MT_Vector3& drot,bool local) /** -GetOpenGL Matrix, returns an OpenGL 'compatible' matrix -*/ + * GetOpenGL Matrix, returns an OpenGL 'compatible' matrix + */ double* KX_GameObject::GetOpenGLMatrix() { // todo: optimize and only update if necessary @@ -2901,7 +2901,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 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) { diff --git a/source/gameengine/Ketsji/KX_IPhysicsController.h b/source/gameengine/Ketsji/KX_IPhysicsController.h index 5fc9f5c2473..68577f09414 100644 --- a/source/gameengine/Ketsji/KX_IPhysicsController.h +++ b/source/gameengine/Ketsji/KX_IPhysicsController.h @@ -41,11 +41,11 @@ struct KX_ClientObjectInfo; /** - Physics Controller, a special kind of Scene Graph Transformation Controller. - It get's callbacks from Physics in case a transformation change took place. - Each time the scene graph get's updated, the controller get's a chance - in the 'Update' method to reflect changed. -*/ + * Physics Controller, a special kind of Scene Graph Transformation Controller. + * It get's callbacks from Physics in case a transformation change took place. + * Each time the scene graph get's updated, the controller get's a chance + * in the 'Update' method to reflect changed. + */ class KX_IPhysicsController : public SG_Controller diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h index dce97ea039f..50390005f2b 100644 --- a/source/gameengine/Ketsji/KX_ISceneConverter.h +++ b/source/gameengine/Ketsji/KX_ISceneConverter.h @@ -49,11 +49,11 @@ public: virtual ~KX_ISceneConverter () {}; /* - scenename: name of the scene to be converted, - if the scenename is empty, convert the 'default' scene (whatever this means) - destinationscene: pass an empty scene, everything goes into this - dictobj: python dictionary (for pythoncontrollers) - */ + * scenename: name of the scene to be converted, + * if the scenename is empty, convert the 'default' scene (whatever this means) + * destinationscene: pass an empty scene, everything goes into this + * dictobj: python dictionary (for pythoncontrollers) + */ virtual void ConvertScene( class KX_Scene* destinationscene, class RAS_IRenderTools* rendertools, diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index a8b7a362bd9..58cdfc28742 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -40,13 +40,13 @@ class KX_IpoActuator : public SCA_IActuator Py_Header private: /** Computes the IPO start time from the current time - and the current frame. */ + * and the current frame. */ void SetStartTime(float curtime); /** Computes the current frame from the current time - and the IPO start time. */ + * and the IPO start time. */ void SetLocalTime(float curtime); /** Ensures the current frame is between the start and - end frames. */ + * end frames. */ bool ClampLocalTime(); protected: diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 1381dcb3607..facac230e05 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -599,9 +599,9 @@ else KX_Scene* scene = *sceneit; /* Suspension holds the physics and logic processing for an - * entire scene. Objects can be suspended individually, and - * the settings for that preceed the logic and physics - * update. */ + * entire scene. Objects can be suspended individually, and + * the settings for that preceed the logic and physics + * update. */ m_logger->StartLog(tc_logic, m_kxsystem->GetTimeInSeconds(), true); m_sceneconverter->resetNoneDynamicObjectToIpo();//this is for none dynamic objects with ipo @@ -1340,8 +1340,8 @@ void KX_KetsjiEngine::RenderFonts(KX_Scene* scene) } /* -To run once per scene -*/ + * To run once per scene + */ void KX_KetsjiEngine::PostRenderScene(KX_Scene* scene) { // We need to first make sure our viewport is correct (enabling multiple viewports can mess this up) diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index c8a916e85b6..0d81883104b 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -142,11 +142,11 @@ bool KX_MouseFocusSensor::RayHit(KX_ClientObjectInfo* client_info, KX_RayCast* r KX_GameObject* hitKXObj = client_info->m_gameobject; /* Is this me? In the ray test, there are a lot of extra checks - * for aliasing artefacts from self-hits. That doesn't happen - * here, so a simple test suffices. Or does the camera also get - * self-hits? (No, and the raysensor shouldn't do it either, since - * self-hits are excluded by setting the correct ignore-object.) - * Hitspots now become valid. */ + * for aliasing artefacts from self-hits. That doesn't happen + * here, so a simple test suffices. Or does the camera also get + * self-hits? (No, and the raysensor shouldn't do it either, since + * self-hits are excluded by setting the correct ignore-object.) + * Hitspots now become valid. */ KX_GameObject* thisObj = (KX_GameObject*) GetParent(); if ((m_focusmode == 2) || hitKXObj == thisObj) { diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index f8f5426dc8d..db9e3697492 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -120,7 +120,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor private: /** * The focus mode. 1 for handling focus, 0 for not handling, 2 for focus on any object - */ + */ int m_focusmode; /** diff --git a/source/gameengine/Ketsji/KX_NearSensor.h b/source/gameengine/Ketsji/KX_NearSensor.h index 1327f0aea37..8655d93d406 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.h +++ b/source/gameengine/Ketsji/KX_NearSensor.h @@ -55,7 +55,7 @@ public: bool bFindMaterial, const STR_String& touchedpropname, PHY_IPhysicsController* ctrl); -/* +#if 0 public: KX_NearSensor(class SCA_EventManager* eventmgr, class KX_GameObject* gameobj, @@ -64,7 +64,7 @@ public: bool bFindMaterial, const STR_String& touchedpropname, class KX_Scene* scene); -*/ +#endif virtual ~KX_NearSensor(); virtual void SynchronizeTransform(); virtual CValue* GetReplica(); diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index cbf08a674ef..82016e2fff3 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -2025,7 +2025,7 @@ PyObject* initRasterizer(RAS_IRasterizer* rasty,RAS_ICanvas* canvas) PyObject* item; /* Use existing module where possible - * be careful not to init any runtime vars after this */ + * be careful not to init any runtime vars after this */ m = PyImport_ImportModule( "Rasterizer" ); if(m) { Py_DECREF(m); diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index e367ef83eb8..6a60fc08244 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -168,9 +168,9 @@ void initPyTypes(void) { /* - initPyObjectPlusType(BL_ActionActuator::Parents); - ..... -*/ + * initPyObjectPlusType(BL_ActionActuator::Parents); + * ..... + */ /* For now just do PyType_Ready */ PyObject *mod= PyModule_New("GameTypes"); diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index f647189ab35..903413ca89b 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -36,8 +36,8 @@ #include "MT_Point3.h" /** -* Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used. -*/ + * Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used. + */ class KX_RadarSensor : public KX_NearSensor { protected: diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index 0cc0e7318c1..58ca847b617 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -151,7 +151,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 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) { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 2763dea04ec..74a0abe526d 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1574,8 +1574,8 @@ void KX_Scene::LogicEndFrame() /** - * UpdateParents: SceneGraph transformation update. - */ + * UpdateParents: SceneGraph transformation update. + */ void KX_Scene::UpdateParents(double curtime) { // we use the SG dynamic list diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 9f12d9473bc..7e3378bd13f 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -160,8 +160,8 @@ protected: // Used to deregister objects that are deleted class KX_BlenderSceneConverter* m_sceneConverter; /** - * physics engine abstraction - */ + * physics engine abstraction + */ //e_PhysicsEngine m_physicsEngine; //who needs this ? class PHY_IPhysicsEnvironment* m_physicsEnvironment; @@ -582,8 +582,8 @@ public: void SetNodeTree(SG_Tree* root); /** - * 2D Filters - */ + * 2D Filters + */ void Update2DFilter(std::vector& propNames, void* gameObj, RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text); void Render2DFilters(RAS_ICanvas* canvas); diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index 30344ce3a10..903ea14c5d2 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -356,11 +356,11 @@ void RAS_2DFilterManager::UpdateOffsetMatrix(RAS_ICanvas* canvas) void RAS_2DFilterManager::UpdateCanvasTextureCoord(unsigned int * viewport) { /* - This function update canvascoord[]. - These parameters are used to create texcoord[1] - That way we can access the texcoord relative to the canvas: - (0.0,0.0) bottom left, (1.0,1.0) top right, (0.5,0.5) center - */ + * This function update canvascoord[]. + * These parameters are used to create texcoord[1] + * That way we can access the texcoord relative to the canvas: + * (0.0,0.0) bottom left, (1.0,1.0) top right, (0.5,0.5) center + */ canvascoord[0] = (GLfloat) viewport[0] / viewport[2]; canvascoord[0] *= -1; canvascoord[1] = (GLfloat) (texturewidth - viewport[0]) / viewport[2]; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp index e5ca40c1354..4e4d70fac31 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp @@ -158,11 +158,11 @@ void RAS_ListRasterizer::RemoveListSlot(RAS_ListSlot* list) RAS_ListSlot* RAS_ListRasterizer::FindOrAdd(RAS_MeshSlot& ms) { /* - Keep a copy of constant lists submitted for rendering, - this guards against (replicated)new...delete every frame, - and we can reuse lists! - :: sorted by mesh slot - */ + * Keep a copy of constant lists submitted for rendering, + * this guards against (replicated)new...delete every frame, + * and we can reuse lists! + * :: sorted by mesh slot + */ RAS_ListSlot* localSlot = (RAS_ListSlot*)ms.m_DisplayList; if(!localSlot) { if (ms.m_pDerivedMesh) { diff --git a/source/gameengine/VideoTexture/BlendType.h b/source/gameengine/VideoTexture/BlendType.h index fad23af922e..22f0cd769d3 100644 --- a/source/gameengine/VideoTexture/BlendType.h +++ b/source/gameengine/VideoTexture/BlendType.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined BLENDTYPE_H +#ifndef BLENDTYPE_H #define BLENDTYPE_H diff --git a/source/gameengine/VideoTexture/Common.h b/source/gameengine/VideoTexture/Common.h index fe9632b02bb..e6e0ffa1ebc 100644 --- a/source/gameengine/VideoTexture/Common.h +++ b/source/gameengine/VideoTexture/Common.h @@ -28,31 +28,31 @@ http://www.gnu.org/copyleft/lesser.txt. #define WINDOWS_LEAN_AND_MEAN #endif -#if !defined NULL +#ifndef NULL #define NULL 0 #endif -#if !defined HRESULT +#ifndef HRESULT #define HRESULT long #endif -#if !defined DWORD +#ifndef DWORD #define DWORD unsigned long #endif -#if !defined S_OK +#ifndef S_OK #define S_OK ((HRESULT)0L) #endif -#if !defined BYTE +#ifndef BYTE #define BYTE unsigned char #endif -#if !defined WIN32 +#ifndef WIN32 #define Sleep(time) sleep(time) #endif -#if !defined FAILED +#ifndef FAILED #define FAILED(Status) ((HRESULT)(Status)<0) #endif diff --git a/source/gameengine/VideoTexture/Exception.h b/source/gameengine/VideoTexture/Exception.h index af226fab75d..115a5c48641 100644 --- a/source/gameengine/VideoTexture/Exception.h +++ b/source/gameengine/VideoTexture/Exception.h @@ -25,7 +25,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined EXCEPTION_H +#ifndef EXCEPTION_H #define EXCEPTION_H #include diff --git a/source/gameengine/VideoTexture/FilterBase.h b/source/gameengine/VideoTexture/FilterBase.h index bdb3106d58d..902c10de953 100644 --- a/source/gameengine/VideoTexture/FilterBase.h +++ b/source/gameengine/VideoTexture/FilterBase.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERBASE_H +#ifndef FILTERBASE_H #define FILTERBASE_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterBlueScreen.h b/source/gameengine/VideoTexture/FilterBlueScreen.h index 381941fdcca..c083b672717 100644 --- a/source/gameengine/VideoTexture/FilterBlueScreen.h +++ b/source/gameengine/VideoTexture/FilterBlueScreen.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERBLUESCREEN_H +#ifndef FILTERBLUESCREEN_H #define FILTERBLUESCREEN_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterColor.h b/source/gameengine/VideoTexture/FilterColor.h index aeca4d326b4..316135d6174 100644 --- a/source/gameengine/VideoTexture/FilterColor.h +++ b/source/gameengine/VideoTexture/FilterColor.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERCOLOR_H +#ifndef FILTERCOLOR_H #define FILTERCOLOR_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterNormal.h b/source/gameengine/VideoTexture/FilterNormal.h index 0b4574d4d1f..f0ba851ed94 100644 --- a/source/gameengine/VideoTexture/FilterNormal.h +++ b/source/gameengine/VideoTexture/FilterNormal.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERNORMAL_H +#ifndef FILTERNORMAL_H #define FILTERNORMAL_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterSource.h b/source/gameengine/VideoTexture/FilterSource.h index 5b73fcda947..95407f12367 100644 --- a/source/gameengine/VideoTexture/FilterSource.h +++ b/source/gameengine/VideoTexture/FilterSource.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERSOURCE_H +#ifndef FILTERSOURCE_H #define FILTERSOURCE_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/ImageBase.h b/source/gameengine/VideoTexture/ImageBase.h index cb2187f00ef..d027a549eee 100644 --- a/source/gameengine/VideoTexture/ImageBase.h +++ b/source/gameengine/VideoTexture/ImageBase.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEBASE_H +#ifndef IMAGEBASE_H #define IMAGEBASE_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/ImageBuff.h b/source/gameengine/VideoTexture/ImageBuff.h index 1fd2d3f9ee6..06422908bd1 100644 --- a/source/gameengine/VideoTexture/ImageBuff.h +++ b/source/gameengine/VideoTexture/ImageBuff.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEBUFF_H +#ifndef IMAGEBUFF_H #define IMAGEBUFF_H diff --git a/source/gameengine/VideoTexture/ImageMix.h b/source/gameengine/VideoTexture/ImageMix.h index d99f27576c1..049447927f4 100644 --- a/source/gameengine/VideoTexture/ImageMix.h +++ b/source/gameengine/VideoTexture/ImageMix.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEMIX_H +#ifndef IMAGEMIX_H #define IMAGEMIX_H diff --git a/source/gameengine/VideoTexture/ImageRender.h b/source/gameengine/VideoTexture/ImageRender.h index 61f441465c3..08b70d8ce1a 100644 --- a/source/gameengine/VideoTexture/ImageRender.h +++ b/source/gameengine/VideoTexture/ImageRender.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGERENDER_H +#ifndef IMAGERENDER_H #define IMAGERENDER_H diff --git a/source/gameengine/VideoTexture/ImageViewport.h b/source/gameengine/VideoTexture/ImageViewport.h index 4195847c9d0..c39c255b417 100644 --- a/source/gameengine/VideoTexture/ImageViewport.h +++ b/source/gameengine/VideoTexture/ImageViewport.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEVIEWPORT_H +#ifndef IMAGEVIEWPORT_H #define IMAGEVIEWPORT_H diff --git a/source/gameengine/VideoTexture/PyTypeList.h b/source/gameengine/VideoTexture/PyTypeList.h index 3f1523294aa..29c71ca3f4e 100644 --- a/source/gameengine/VideoTexture/PyTypeList.h +++ b/source/gameengine/VideoTexture/PyTypeList.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined PYTYPELIST_H +#ifndef PYTYPELIST_H #define PYTYPELIST_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/Texture.h b/source/gameengine/VideoTexture/Texture.h index 32801a2c38e..cab1f38c798 100644 --- a/source/gameengine/VideoTexture/Texture.h +++ b/source/gameengine/VideoTexture/Texture.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined TEXTURE_H +#ifndef TEXTURE_H #define TEXTURE_H #include diff --git a/source/gameengine/VideoTexture/VideoBase.h b/source/gameengine/VideoTexture/VideoBase.h index a1eae96be57..6599ef62c8e 100644 --- a/source/gameengine/VideoTexture/VideoBase.h +++ b/source/gameengine/VideoTexture/VideoBase.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined VIDEOBASE_H +#ifndef VIDEOBASE_H #define VIDEOBASE_H diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h index 2be86b6c535..9a24c0e5a5d 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.h +++ b/source/gameengine/VideoTexture/VideoFFmpeg.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined VIDEOFFMPEG_H +#ifndef VIDEOFFMPEG_H #define VIDEOFFMPEG_H #ifdef WITH_FFMPEG -- cgit v1.2.3