SLUDGE: remove debug code
This commit is contained in:
parent
800987ab95
commit
1cd6de22e4
4 changed files with 0 additions and 80 deletions
|
@ -227,14 +227,6 @@ stackHandler *loadStackRef(Common::SeekableReadStream *stream) {
|
||||||
// For saving and loading variables...
|
// For saving and loading variables...
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool saveVariable(variable *from, Common::WriteStream *stream) {
|
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);
|
stream->writeByte(from->varType);
|
||||||
switch (from->varType) {
|
switch (from->varType) {
|
||||||
case SVT_INT:
|
case SVT_INT:
|
||||||
|
@ -286,13 +278,6 @@ bool loadVariable(variable *to, Common::SeekableReadStream *stream) {
|
||||||
|
|
||||||
case SVT_STACK:
|
case SVT_STACK:
|
||||||
to->varData.theStack = loadStackRef(stream);
|
to->varData.theStack = loadStackRef(stream);
|
||||||
#if DEBUG_STACKINESS
|
|
||||||
{
|
|
||||||
char *str = getTextFromAnyVar(*to);
|
|
||||||
stackDebug((stackfp, "just loaded %s\n", str));
|
|
||||||
delete str;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case SVT_COSTUME:
|
case SVT_COSTUME:
|
||||||
|
|
|
@ -1001,21 +1001,7 @@ bool loadAnim(personaAnimation *p, Common::SeekableReadStream *stream) {
|
||||||
}
|
}
|
||||||
return true;
|
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) {
|
bool saveCostume(persona *cossy, Common::WriteStream *stream) {
|
||||||
int a;
|
int a;
|
||||||
stream->writeUint16BE(cossy->numDirections);
|
stream->writeUint16BE(cossy->numDirections);
|
||||||
|
|
|
@ -37,25 +37,6 @@ char encode2 = 0;
|
||||||
|
|
||||||
extern Common::String gamePath;
|
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) {
|
void writeStringEncoded(const Common::String &s, Common::WriteStream *stream) {
|
||||||
int len = s.size();
|
int len = s.size();
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,6 @@ const char *typeName[] = { "undefined", "number", "user function", "string",
|
||||||
"built-in function", "file", "stack", "object type", "animation",
|
"built-in function", "file", "stack", "object type", "animation",
|
||||||
"costume" };
|
"costume" };
|
||||||
|
|
||||||
extern char *outputDir;
|
|
||||||
|
|
||||||
void unlinkVar(variable &thisVar) {
|
void unlinkVar(variable &thisVar) {
|
||||||
switch (thisVar.varType) {
|
switch (thisVar.varType) {
|
||||||
case SVT_STRING:
|
case SVT_STRING:
|
||||||
|
@ -184,43 +182,14 @@ bool copyStack(const variable &from, variable &to) {
|
||||||
to.varData.theStack->timesUsed = 1;
|
to.varData.theStack->timesUsed = 1;
|
||||||
variableStack *a = from.varData.theStack->first;
|
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) {
|
while (a) {
|
||||||
addVarToStack(a->thisVar, to.varData.theStack->first);
|
addVarToStack(a->thisVar, to.varData.theStack->first);
|
||||||
if (to.varData.theStack->last == NULL) {
|
if (to.varData.theStack->last == NULL) {
|
||||||
#if DEBUG_STACKINESS
|
|
||||||
stackDebug((stackfp, "LAST"));
|
|
||||||
#endif
|
|
||||||
to.varData.theStack->last = to.varData.theStack->first;
|
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;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +229,6 @@ int compareVars(const variable &var1, const variable &var2) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SVT_STRING:
|
case SVT_STRING:
|
||||||
|
|
||||||
re = (strcmp(var1.varData.theString, var2.varData.theString) == 0);
|
re = (strcmp(var1.varData.theString, var2.varData.theString) == 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue