SLUDGE: remove debug code

This commit is contained in:
yinsimei 2017-07-11 14:57:48 +02:00 committed by Eugene Sandulenko
parent 800987ab95
commit 1cd6de22e4
4 changed files with 0 additions and 80 deletions

View file

@ -227,14 +227,6 @@ stackHandler *loadStackRef(Common::SeekableReadStream *stream) {
// For saving and loading variables...
//----------------------------------------------------------------------
bool saveVariable(variable *from, Common::WriteStream *stream) {
#if DEBUG_STACKINESS
{
char *str = getTextFromAnyVar(*from);
stackDebug((stackfp, "in saveVariable, type %d, %s\n", from->varType, str));
delete str;
}
#endif
stream->writeByte(from->varType);
switch (from->varType) {
case SVT_INT:
@ -286,13 +278,6 @@ bool loadVariable(variable *to, Common::SeekableReadStream *stream) {
case SVT_STACK:
to->varData.theStack = loadStackRef(stream);
#if DEBUG_STACKINESS
{
char *str = getTextFromAnyVar(*to);
stackDebug((stackfp, "just loaded %s\n", str));
delete str;
}
#endif
return true;
case SVT_COSTUME:

View file

@ -1001,21 +1001,7 @@ bool loadAnim(personaAnimation *p, Common::SeekableReadStream *stream) {
}
return true;
}
/*
void debugCostume (char * message, persona * cossy) {
FILE * db = fopen ("debuTURN.txt", "at");
fprintf (db, " %s costume with %i directions...\n", message, cossy->numDirections);
for (int a = 0; a < cossy->numDirections * 3; a++) {
fprintf (db, " %i frames:", cossy->animation[a]->numFrames);
for (int b = 0; b < cossy->animation[a]->numFrames; b ++) {
fprintf (db, " %i", cossy->animation[a]->frames[b]);
}
fprintf (db, "\n");
}
fclose (db);
}
*/
bool saveCostume(persona *cossy, Common::WriteStream *stream) {
int a;
stream->writeUint16BE(cossy->numDirections);

View file

@ -37,25 +37,6 @@ char encode2 = 0;
extern Common::String gamePath;
/*
void loadSaveDebug (char * com) {
FILE * ffpp = fopen ("debuggy.txt", "at");
fprintf (ffpp, "%s\n", com);
fclose (ffpp);
}
void loadSaveDebug (char com) {
FILE * ffpp = fopen ("debuggy.txt", "at");
fprintf (ffpp, "%c\n", com);
fclose (ffpp);
}
void loadSaveDebug (int com) {
FILE * ffpp = fopen ("debuggy.txt", "at");
fprintf (ffpp, "%d\n", com);
fclose (ffpp);
}
*/
void writeStringEncoded(const Common::String &s, Common::WriteStream *stream) {
int len = s.size();

View file

@ -37,8 +37,6 @@ const char *typeName[] = { "undefined", "number", "user function", "string",
"built-in function", "file", "stack", "object type", "animation",
"costume" };
extern char *outputDir;
void unlinkVar(variable &thisVar) {
switch (thisVar.varType) {
case SVT_STRING:
@ -184,43 +182,14 @@ bool copyStack(const variable &from, variable &to) {
to.varData.theStack->timesUsed = 1;
variableStack *a = from.varData.theStack->first;
#if DEBUG_STACKINESS
{
char *str = getTextFromAnyVar(from);
stackDebug((stackfp, "in copyStack, copying %s\n", str));
delete[] str;
}
#endif
while (a) {
addVarToStack(a->thisVar, to.varData.theStack->first);
if (to.varData.theStack->last == NULL) {
#if DEBUG_STACKINESS
stackDebug((stackfp, "LAST"));
#endif
to.varData.theStack->last = to.varData.theStack->first;
}
#if DEBUG_STACKINESS
{
char *str = getTextFromAnyVar(a->thisVar);
stackDebug((stackfp, "\ta->thisVar = %s (%p)\n", str, to.varData.theStack->first));
delete[] str;
}
#endif
a = a->next;
}
#if DEBUG_STACKINESS
{
char *str = getTextFromAnyVar(to);
stackDebug((stackfp, "finished copy, got %s\n", str));
delete[] str;
stackDebug((stackfp, "first = %p\n", to.varData.theStack->first));
stackDebug((stackfp, "last = %p\n", to.varData.theStack->last));
}
#endif
return true;
}
@ -260,7 +229,6 @@ int compareVars(const variable &var1, const variable &var2) {
break;
case SVT_STRING:
re = (strcmp(var1.varData.theString, var2.varData.theString) == 0);
break;