diff options
author | Simei Yin | 2017-08-21 09:10:41 +0200 |
---|---|---|
committer | Simei Yin | 2017-08-21 10:19:19 +0200 |
commit | a9ee51d6ce79a6510a6f11b090e167e1047dd60d (patch) | |
tree | 5edf19337cc24e44bfe42110be8b1655a75715bf /engines | |
parent | d9a6791500eef13d64d7b3d11136b9c901af7f2f (diff) | |
download | scummvm-rg350-a9ee51d6ce79a6510a6f11b090e167e1047dd60d.tar.gz scummvm-rg350-a9ee51d6ce79a6510a6f11b090e167e1047dd60d.tar.bz2 scummvm-rg350-a9ee51d6ce79a6510a6f11b090e167e1047dd60d.zip |
SLUDGE: Some code cleaning
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sludge/main_loop.cpp | 2 | ||||
-rw-r--r-- | engines/sludge/moreio.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/newfatal.cpp | 4 | ||||
-rw-r--r-- | engines/sludge/newfatal.h | 1 | ||||
-rw-r--r-- | engines/sludge/sludger.cpp | 11 | ||||
-rw-r--r-- | engines/sludge/variable.cpp | 8 |
6 files changed, 0 insertions, 27 deletions
diff --git a/engines/sludge/main_loop.cpp b/engines/sludge/main_loop.cpp index 4524d02304..d00f6e42c4 100644 --- a/engines/sludge/main_loop.cpp +++ b/engines/sludge/main_loop.cpp @@ -57,8 +57,6 @@ int main_loop(Common::String filename) { g_sludge->_gfxMan->init(); - registerWindowForFatal(); - g_sludge->_gfxMan->blankAllScreen(); if (!initPeople()) return fatal("Couldn't initialise people stuff"); diff --git a/engines/sludge/moreio.cpp b/engines/sludge/moreio.cpp index 4a57000549..1512574207 100644 --- a/engines/sludge/moreio.cpp +++ b/engines/sludge/moreio.cpp @@ -46,7 +46,6 @@ Common::String readString(Common::SeekableReadStream *stream) { for (int a = 0; a < len; a++) { res += (char)(stream->readByte() - 1); } - debugC(3, kSludgeDebugDataLoad, "Read string of length %i: %s", len, res.c_str()); return res; } diff --git a/engines/sludge/newfatal.cpp b/engines/sludge/newfatal.cpp index 673fc023c8..70f6bd9209 100644 --- a/engines/sludge/newfatal.cpp +++ b/engines/sludge/newfatal.cpp @@ -53,10 +53,6 @@ bool hasFatal() { return false; } -void registerWindowForFatal() { - g_sludge->fatalInfo = "There's an error with this SLUDGE game! If you're designing this game, please turn on verbose error messages in the project manager and recompile. If not, please contact the author saying where and how this problem occured."; -} - int inFatal(const Common::String &str) { g_sludge->_soundMan->killSoundStuff(); error("%s", str.c_str()); diff --git a/engines/sludge/newfatal.h b/engines/sludge/newfatal.h index eb65db065b..fc91110758 100644 --- a/engines/sludge/newfatal.h +++ b/engines/sludge/newfatal.h @@ -33,7 +33,6 @@ bool hasFatal(); int fatal(const Common::String &str); int fatal(const Common::String &str1, const Common::String &str2); int checkNew(const void *mem); -void registerWindowForFatal(); void setFatalInfo(const Common::String &userFunc, const Common::String &BIF); void setResourceForFatal(int n); const Common::String resourceNameFromNum(int i); diff --git a/engines/sludge/sludger.cpp b/engines/sludge/sludger.cpp index a63b8b9923..91c78b08f0 100644 --- a/engines/sludge/sludger.cpp +++ b/engines/sludge/sludger.cpp @@ -405,27 +405,16 @@ bool continueFunction(LoadedFunction *fun) { return true; } -// if (numBIFNames) newDebug ("*** Function:", allUserFunc[fun->originalNumber]); - - //debugOut ("SLUDGER: continueFunction\n"); - while (keepLooping) { advanceNow = true; debugC(1, kSludgeDebugStackMachine, "Executing command line %i : ", fun->runThisLine); param = fun->compiledLines[fun->runThisLine].param; com = fun->compiledLines[fun->runThisLine].theCommand; -// fprintf (stderr, "com: %d param: %d (%s)\n", com, param, -// (com < numSludgeCommands) ? sludgeText[com] : ERROR_UNKNOWN_MCODE); fflush(stderr); if (numBIFNames) { setFatalInfo((fun->originalNumber < numUserFunc) ? allUserFunc[fun->originalNumber] : "Unknown user function", (com < numSludgeCommands) ? sludgeText[com] : ERROR_UNKNOWN_MCODE); -// newDebug ( -// (com < numSludgeCommands) ? sludgeText[com] : "Unknown SLUDGE machine code", -// param); } - //debugOut ("SLUDGER: continueFunction - in da loop: %s\n", sludgeText[com]); - switch (com) { case SLU_RETURN: if (fun->calledBy) { diff --git a/engines/sludge/variable.cpp b/engines/sludge/variable.cpp index fb4f191025..510c6f4607 100644 --- a/engines/sludge/variable.cpp +++ b/engines/sludge/variable.cpp @@ -430,14 +430,6 @@ bool makeFastArrayFromStack(Variable &to, const StackHandler *stacky) { return true; } -/* - bool moveVariable (Variable & from, Variable & to) { - unlinkVar (to); - memcpy (& to, & from, sizeof (variable)); - from.varType = SVT_NULL; - } - */ - bool addVarToStack(const Variable &va, VariableStack *&thisStack) { VariableStack *newStack = new VariableStack; if (!checkNew(newStack)) |