Skip to content

Commit 14eb890

Browse files
committed
UPBGE: Remove commented debug messages.
These message are removed for some reasons: - they doesn't use a standardized message format. - they are no lounguer usefull - removing these message will obligate to rewrite them with a standardized format later if needed.
1 parent fa2a451 commit 14eb890

21 files changed

+19
-97
lines changed

source/gameengine/Converter/BL_BlenderDataConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ static void UNUSED_FUNCTION(print_active_constraints2)(Object *ob) //not used, u
12041204

12051205
if (conlist) {
12061206
for (curcon = (bConstraint *)conlist->first; curcon; curcon = (bConstraint *)curcon->next) {
1207-
printf("%i\n",curcon->type);
1207+
CM_Debug(curcon->type);
12081208
}
12091209
}
12101210
}

source/gameengine/Converter/KX_BlenderSceneConverter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
172172
#ifdef WITH_CXX_GUARDEDALLOC
173173
MEM_printmemlist_pydict();
174174
#endif
175-
// /printf("\t m_ketsjiEngine->m_scenes: %d\n", m_ketsjiEngine->CurrentScenes()->GetCount());
176175
}
177176

178177
/* LibLoad Options */

source/gameengine/Converter/KX_ConvertActuators.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,6 @@ void BL_ConvertActuators(const char* maggiename,
11071107
mouAct->limit_x,
11081108
mouAct->limit_y);
11091109
baseact = tmpbaseact;
1110-
} else {
1111-
//cout << "\n Couldn't find mouse event manager..."; - should throw an error here...
11121110
}
11131111
break;
11141112
}

source/gameengine/Converter/KX_ConvertSensors.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,6 @@ void BL_ConvertSensors(struct Object* blenderobject,
343343
kxengine,
344344
gameobj);
345345
}
346-
} else {
347-
// cout << "\n Could't find mouse event manager..."; - should throw an error here...
348346
}
349347
break;
350348
}

source/gameengine/Expressions/intern/IntValue.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
*
1616
*/
1717

18-
#include <stdio.h>
19-
2018
#include "EXP_IntValue.h"
2119
#include "EXP_ErrorValue.h"
2220
#include "EXP_FloatValue.h"
2321
#include "EXP_BoolValue.h"
2422
#include "EXP_StringValue.h"
2523
#include "EXP_VoidValue.h"
2624

25+
#include "CM_Message.h"
26+
2727
//////////////////////////////////////////////////////////////////////
2828
// Construction/Destruction
2929
//////////////////////////////////////////////////////////////////////
@@ -176,7 +176,7 @@ CValue* CIntValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *v
176176
ret = new CBoolValue(m_int == 0);
177177
break;
178178
default:
179-
printf("Found op: %d\n", op);
179+
CM_Error("found op: " << op);
180180
ret = new CErrorValue("illegal operator. please send a bug report.");
181181
break;
182182
}

source/gameengine/Expressions/intern/PyObjectPlus.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,9 +1136,7 @@ PyObject *PyObjectPlus::GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, v
11361136
BGE_PROXY_WKREF(self->m_proxy) = NULL;
11371137
#endif
11381138
}
1139-
//PyObject_Print(self->m_proxy, stdout, 0);
1140-
//printf("ref %d\n", self->m_proxy->ob_refcnt);
1141-
1139+
11421140
BGE_PROXY_REF(self->m_proxy) = self; /* Its possible this was set to NULL, so set it back here */
11431141
BGE_PROXY_PTR(self->m_proxy) = ptr;
11441142
Py_INCREF(self->m_proxy); /* we own one, thos ones fore the return */

source/gameengine/GameLogic/SCA_PropertySensor.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,6 @@ bool SCA_PropertySensor::CheckPropertyCondition()
172172

173173
case KX_PROPSENSOR_EXPRESSION:
174174
{
175-
#if 0
176-
if (m_rightexpr)
177-
{
178-
CValue* resultval = m_rightexpr->Calculate();
179-
if (resultval->IsError())
180-
{
181-
int i=0;
182-
STR_String errortest = resultval->GetText();
183-
printf(errortest);
184-
185-
} else
186-
{
187-
result = resultval->GetNumber() != 0;
188-
}
189-
}
190-
#endif
191175
break;
192176
}
193177
case KX_PROPSENSOR_INTERVAL:
@@ -226,7 +210,6 @@ bool SCA_PropertySensor::CheckPropertyCondition()
226210
}
227211
orgprop->Release();
228212

229-
//cout << " \nSens:Prop:changed!"; /* need implementation here!!! */
230213
break;
231214
}
232215
case KX_PROPSENSOR_LESSTHAN:

source/gameengine/GameLogic/SCA_PythonController.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,10 @@ SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj, int mode)
6767

6868
}
6969

70-
#if 0
71-
//debugging
72-
CValue *SCA_PythonController::AddRef()
73-
{
74-
//printf("AddRef refcount = %i\n",GetRefCount());
75-
return CValue::AddRef();
76-
}
77-
int SCA_PythonController::Release()
78-
{
79-
//printf("Release refcount = %i\n",GetRefCount());
80-
return CValue::Release();
81-
}
82-
#endif
83-
8470
SCA_PythonController::~SCA_PythonController()
8571
{
8672

8773
#ifdef WITH_PYTHON
88-
//printf("released python byte script\n");
89-
9074
Py_XDECREF(m_bytecode);
9175
Py_XDECREF(m_function);
9276

@@ -278,7 +262,6 @@ void SCA_PythonController::ErrorPrint(const char *error_msg)
278262

279263
bool SCA_PythonController::Compile()
280264
{
281-
//printf("py script modified '%s'\n", m_scriptName.Ptr());
282265
m_bModified= false;
283266

284267
// if a script already exists, decref it before replace the pointer to a new script
@@ -300,7 +283,6 @@ bool SCA_PythonController::Compile()
300283

301284
bool SCA_PythonController::Import()
302285
{
303-
//printf("py module modified '%s'\n", m_scriptName.Ptr());
304286
m_bModified= false;
305287

306288
/* in case we re-import */

source/gameengine/GamePlayer/GPG_ghost.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@ static void get_filename(int argc, char **argv, char *filename)
524524
gamefile = new char [len + 1];
525525
::strcpy(gamefile, argv[0]);
526526
::strcpy(gamefile + srclen, "Resources/game.blend");
527-
//::printf("looking for file: %s\n", filename);
528527

529528
if (BLI_exists(gamefile))
530529
BLI_strncpy(filename, gamefile, FILE_MAX);
@@ -814,7 +813,7 @@ int main(
814813
else if (strcmp(argv[i], "memory") == 0) {
815814
G.debug |= G_DEBUG;
816815

817-
std::cout << "Switching to fully guarded memory allocator." << std::endl;
816+
CM_Debug("Switching to fully guarded memory allocator.");
818817
MEM_use_guarded_allocator();
819818

820819
MEM_set_memory_debug();
@@ -824,7 +823,7 @@ int main(
824823
++i;
825824
}
826825
else {
827-
std::cout << "error: debug mode '" << argv[i] << "' unrecognized." << std::endl;
826+
CM_Error("debug mode '" << argv[i] << "' unrecognized.");
828827
}
829828

830829
break;
@@ -1125,7 +1124,6 @@ int main(
11251124
if ((!fullScreenParFound) && (!windowParFound)) {
11261125
// Only use file settings when command line did not override
11271126
if ((scene->gm.playerflag & GAME_PLAYER_FULLSCREEN)) {
1128-
//printf("fullscreen option found in Blender file\n");
11291127
fullScreen = true;
11301128
fullScreenWidth= scene->gm.xplay;
11311129
fullScreenHeight= scene->gm.yplay;

source/gameengine/Ketsji/BL_Action.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,12 @@ void BL_Action::BlendShape(Key* key, float srcweight, std::vector<float>& blends
367367
KeyBlock *kb;
368368

369369
dstweight = 1.0F - srcweight;
370-
//printf("Dst: %f\tSrc: %f\n", srcweight, dstweight);
371370
for (it=blendshape.begin(), kb = (KeyBlock *)key->block.first;
372371
kb && it != blendshape.end();
373372
kb = (KeyBlock *)kb->next, it++)
374373
{
375-
//printf("OirgKeys: %f\t%f\n", kb->curval, (*it));
376374
kb->curval = kb->curval * dstweight + (*it) * srcweight;
377-
//printf("NewKey: %f\n", kb->curval);
378375
}
379-
//printf("\n");
380376
}
381377

382378
void BL_Action::Update(float curtime, bool applyToObject)

0 commit comments

Comments
 (0)