SLUDGE: Some code cleaning

This commit is contained in:
Simei Yin 2017-08-21 09:10:41 +02:00
parent d9a6791500
commit a9ee51d6ce
6 changed files with 0 additions and 27 deletions

View File

@ -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");

View File

@ -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;
}

View File

@ -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());

View File

@ -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);

View File

@ -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) {

View File

@ -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))