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>2011-12-30 11:55:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-30 11:55:15 +0400
commit6d965f4493871c9bd4550939b8263d0c509b7c41 (patch)
treeeb5fecdc3fc376d056d9e4ea7366c3a8e0dea8b7 /source/gameengine
parentca629d5ccc65da456babba6c5bdbfa0de737ac7b (diff)
style edits for function declarations
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp3
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp6
-rw-r--r--source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp3
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp4
-rw-r--r--source/gameengine/Converter/KX_IpoConvert.cpp3
-rw-r--r--source/gameengine/Expressions/InputParser.cpp18
-rw-r--r--source/gameengine/Expressions/Operator1Expr.cpp5
-rw-r--r--source/gameengine/Expressions/Operator2Expr.cpp11
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h3
-rw-r--r--source/gameengine/Expressions/Value.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.cpp30
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp9
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.cpp3
14 files changed, 66 insertions, 38 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 1bfe5945bbc..2aab0498765 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -123,7 +123,8 @@ void BL_ActionActuator::ProcessReplica()
}
-void BL_ActionActuator::SetBlendTime (float newtime){
+void BL_ActionActuator::SetBlendTime (float newtime)
+{
m_blendframe = newtime;
}
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index c6a1105124c..d472cce2a44 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1852,7 +1852,8 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
-static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) {
+static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter)
+{
RAS_LightObject lightobj;
KX_LightObject *gamelight;
@@ -1896,7 +1897,8 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
return gamelight;
}
-static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_BlenderSceneConverter *converter) {
+static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_BlenderSceneConverter *converter)
+{
Camera* ca = static_cast<Camera*>(ob->data);
RAS_CameraData camdata(ca->lens, ca->ortho_scale, ca->sensor_x, ca->sensor_y, ca->sensor_fit, ca->clipsta, ca->clipend, ca->type == CAM_PERSP, ca->YF_dofdist);
KX_Camera *gamecamera;
diff --git a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
index a7ef518336a..343cf023417 100644
--- a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
+++ b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
@@ -66,7 +66,8 @@ BL_InterpolatorList::~BL_InterpolatorList() {
}
}
-KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index) {
+KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index)
+{
for(BL_InterpolatorList::iterator i = begin(); (i != end()) ; i++ )
{
FCurve *fcu= (static_cast<BL_ScalarInterpolator *>(*i))->GetFCurve();
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 2f5125a63dd..4fe436d634c 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -703,8 +703,8 @@ void KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
}
-void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(){
-
+void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo()
+{
if (addInitFromFrame){
KX_SceneList* scenes = m_ketsjiEngine->CurrentScenes();
int numScenes = scenes->size();
diff --git a/source/gameengine/Converter/KX_IpoConvert.cpp b/source/gameengine/Converter/KX_IpoConvert.cpp
index 1db5f1114c2..a56fbe5bef2 100644
--- a/source/gameengine/Converter/KX_IpoConvert.cpp
+++ b/source/gameengine/Converter/KX_IpoConvert.cpp
@@ -72,7 +72,8 @@
#include "STR_HashedString.h"
-static BL_InterpolatorList *GetAdtList(struct bAction *for_act, KX_BlenderSceneConverter *converter) {
+static BL_InterpolatorList *GetAdtList(struct bAction *for_act, KX_BlenderSceneConverter *converter)
+{
BL_InterpolatorList *adtList= converter->FindInterpolatorList(for_act);
if (!adtList) {
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp
index 27f4f0b10cb..726fea795ba 100644
--- a/source/gameengine/Expressions/InputParser.cpp
+++ b/source/gameengine/Expressions/InputParser.cpp
@@ -346,7 +346,8 @@ void CParser::NextSym()
}
#if 0
-int CParser::MakeInt() {
+int CParser::MakeInt()
+{
// returns the integer representation of the value in the global
// variable const_as_string
// pre: const_as_string contains only numercal chars
@@ -354,7 +355,8 @@ int CParser::MakeInt() {
}
#endif
-STR_String CParser::Symbol2Str(int s) {
+STR_String CParser::Symbol2Str(int s)
+{
// returns a string representation of of symbol s,
// for use in Term when generating an error
switch(s) {
@@ -373,7 +375,8 @@ STR_String CParser::Symbol2Str(int s) {
}
}
-void CParser::Term(int s) {
+void CParser::Term(int s)
+{
// generates an error if the next symbol isn't the specified symbol s
// otherwise, skip the symbol
if(s == sym) NextSym();
@@ -387,7 +390,8 @@ void CParser::Term(int s) {
}
}
-int CParser::Priority(int optorkind) {
+int CParser::Priority(int optorkind)
+{
// returns the priority of an operator
// higher number means higher priority
switch(optorkind) {
@@ -409,7 +413,8 @@ int CParser::Priority(int optorkind) {
return 0; // should not happen
}
-CExpression *CParser::Ex(int i) {
+CExpression *CParser::Ex(int i)
+{
// parses an expression in the imput, starting at priority i, and
// returns an CExpression, containing the parsed input
CExpression *e1 = NULL, *e2 = NULL;
@@ -551,7 +556,8 @@ CExpression *CParser::Ex(int i) {
return e1;
}
-CExpression *CParser::Expr() {
+CExpression *CParser::Expr()
+{
// parses an expression in the imput, and
// returns an CExpression, containing the parsed input
return Ex(1);
diff --git a/source/gameengine/Expressions/Operator1Expr.cpp b/source/gameengine/Expressions/Operator1Expr.cpp
index 0ef35108233..4e93ee0cb09 100644
--- a/source/gameengine/Expressions/Operator1Expr.cpp
+++ b/source/gameengine/Expressions/Operator1Expr.cpp
@@ -98,10 +98,9 @@ bool COperator1Expr::IsInside(float x, float y, float z,bool bBorderInclude)
}
*/
-bool COperator1Expr::NeedsRecalculated() {
-
+bool COperator1Expr::NeedsRecalculated()
+{
return m_lhs->NeedsRecalculated();
-
}
CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) {
diff --git a/source/gameengine/Expressions/Operator2Expr.cpp b/source/gameengine/Expressions/Operator2Expr.cpp
index 7a012c4165c..11a509e59d0 100644
--- a/source/gameengine/Expressions/Operator2Expr.cpp
+++ b/source/gameengine/Expressions/Operator2Expr.cpp
@@ -168,17 +168,18 @@ bool COperator2Expr::IsInside(float x, float y, float z,bool bBorderInclude)
-bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude) {
-
+bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude)
+{
return m_rhs->IsInside(x,y,z,bBorderInclude) ;
-
}
-bool COperator2Expr::IsLeftInside(float x, float y, float z,bool bBorderInclude) {
+bool COperator2Expr::IsLeftInside(float x, float y, float z,bool bBorderInclude)
+{
return m_lhs->IsInside(x,y,z,bBorderInclude);
}
*/
-bool COperator2Expr::NeedsRecalculated() {
+bool COperator2Expr::NeedsRecalculated()
+{
// added some lines, just for debugging purposes, it could be a one-liner :)
//bool modleft
//bool modright;
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 3e1c54b0cc7..b1072dd8336 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -54,7 +54,8 @@ extern "C" {
}
#endif
-static inline void Py_Fatal(const char *M) {
+static inline void Py_Fatal(const char *M)
+{
fprintf(stderr, "%s\n", M);
exit(-1);
};
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index 91fdbb0dabc..49150fc775f 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -530,7 +530,8 @@ PyAttributeDef CValue::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef) {
+PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef)
+{
CValue * self = static_cast<CValue *> (self_v);
return PyUnicode_From_STR_String(self->GetName());
}
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp
index 336150b2d6d..2a903e4f8b6 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ISensor.cpp
@@ -86,7 +86,8 @@ void SCA_ISensor::ProcessReplica()
m_linkedcontrollers.clear();
}
-bool SCA_ISensor::IsPositiveTrigger() {
+bool SCA_ISensor::IsPositiveTrigger()
+{
bool result = false;
if (m_eventval) {
@@ -107,40 +108,49 @@ void SCA_ISensor::SetPulseMode(bool posmode,
m_pulse_frequency = freq;
}
-void SCA_ISensor::SetInvert(bool inv) {
+void SCA_ISensor::SetInvert(bool inv)
+{
m_invert = inv;
}
-void SCA_ISensor::SetLevel(bool lvl) {
+void SCA_ISensor::SetLevel(bool lvl)
+{
m_level = lvl;
}
-void SCA_ISensor::SetTap(bool tap) {
+void SCA_ISensor::SetTap(bool tap)
+{
m_tap = tap;
}
-double SCA_ISensor::GetNumber() {
+double SCA_ISensor::GetNumber()
+{
return GetState();
}
-void SCA_ISensor::Suspend() {
+void SCA_ISensor::Suspend()
+{
m_suspended = true;
}
-bool SCA_ISensor::IsSuspended() {
+bool SCA_ISensor::IsSuspended()
+{
return m_suspended;
}
-void SCA_ISensor::Resume() {
+void SCA_ISensor::Resume()
+{
m_suspended = false;
}
-void SCA_ISensor::Init() {
+void SCA_ISensor::Init()
+{
printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name.Ptr());
}
-void SCA_ISensor::DecLink() {
+void SCA_ISensor::DecLink()
+{
m_links--;
if (m_links < 0)
{
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index b055a7b1603..430326cbce0 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -266,7 +266,8 @@ bool SCA_RandomActuator::Update()
return false;
}
-void SCA_RandomActuator::enforceConstraints() {
+void SCA_RandomActuator::enforceConstraints()
+{
/* The constraints that are checked here are the ones fundamental to */
/* the various distributions. Limitations of the algorithms are checked */
/* elsewhere (or they should be... ). */
diff --git a/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp b/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
index c3a8ba0e467..a12619aa925 100644
--- a/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
@@ -65,7 +65,8 @@ SCA_RandomNumberGenerator::~SCA_RandomNumberGenerator() {
/* intentionally empty */
}
-void SCA_RandomNumberGenerator::SetStartVector(void) {
+void SCA_RandomNumberGenerator::SetStartVector(void)
+{
/* setting initial seeds to mt[N] using */
/* the generator Line 25 of Table 1 in */
/* [KNUTH 1981, The Art of Computer Programming */
@@ -85,7 +86,8 @@ void SCA_RandomNumberGenerator::SetSeed(long newseed)
/**
* This is the important part: copied verbatim :)
*/
-unsigned long SCA_RandomNumberGenerator::Draw() {
+unsigned long SCA_RandomNumberGenerator::Draw()
+{
static unsigned long mag01[2] = { 0x0, MATRIX_A };
/* mag01[x] = x * MATRIX_A for x=0,1 */
@@ -121,7 +123,8 @@ unsigned long SCA_RandomNumberGenerator::Draw() {
return y;
}
-float SCA_RandomNumberGenerator::DrawFloat() {
+float SCA_RandomNumberGenerator::DrawFloat()
+{
return ( (float) Draw()/ (unsigned long) 0xffffffff );
}
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp
index b30e674e821..aa864349035 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.cpp
+++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp
@@ -55,7 +55,8 @@ void KX_TouchSensor::SynchronizeTransform()
}
-void KX_TouchSensor::EndFrame() {
+void KX_TouchSensor::EndFrame()
+{
m_colliders->ReleaseAndRemoveAll();
m_hitObject = NULL;
m_bTriggered = false;