aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge
diff options
context:
space:
mode:
authoryinsimei2017-07-11 14:57:48 +0200
committerEugene Sandulenko2017-07-13 18:27:45 +0200
commit1cd6de22e409e3cdedbb909c0a71678252bb13ba (patch)
tree4c24a3a0f2aa9ea004f26d166e3ceb5396d0e8e5 /engines/sludge
parent800987ab95c4faa5532d735a85516fd09f5de724 (diff)
downloadscummvm-rg350-1cd6de22e409e3cdedbb909c0a71678252bb13ba.tar.gz
scummvm-rg350-1cd6de22e409e3cdedbb909c0a71678252bb13ba.tar.bz2
scummvm-rg350-1cd6de22e409e3cdedbb909c0a71678252bb13ba.zip
SLUDGE: remove debug code
Diffstat (limited to 'engines/sludge')
-rw-r--r--engines/sludge/loadsave.cpp15
-rw-r--r--engines/sludge/people.cpp16
-rw-r--r--engines/sludge/savedata.cpp19
-rw-r--r--engines/sludge/variable.cpp32
4 files changed, 1 insertions, 81 deletions
diff --git a/engines/sludge/loadsave.cpp b/engines/sludge/loadsave.cpp
index ccd22f06b2..04455bfe32 100644
--- a/engines/sludge/loadsave.cpp
+++ b/engines/sludge/loadsave.cpp
@@ -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:
diff --git a/engines/sludge/people.cpp b/engines/sludge/people.cpp
index 9453b21faf..45e7263671 100644
--- a/engines/sludge/people.cpp
+++ b/engines/sludge/people.cpp
@@ -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);
diff --git a/engines/sludge/savedata.cpp b/engines/sludge/savedata.cpp
index c4e1915750..a315963dc5 100644
--- a/engines/sludge/savedata.cpp
+++ b/engines/sludge/savedata.cpp
@@ -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();
diff --git a/engines/sludge/variable.cpp b/engines/sludge/variable.cpp
index 7d4ab0cdc0..d47e0b4f43 100644
--- a/engines/sludge/variable.cpp
+++ b/engines/sludge/variable.cpp
@@ -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;