mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
SLUDGE: Add debug channel for fatal msg
This commit is contained in:
parent
733e758fcb
commit
00b64e01d4
@ -35,6 +35,7 @@
|
||||
#include "stringy.h"
|
||||
#include "errors.h"
|
||||
#include "graphics.h"
|
||||
#include "sludge.h"
|
||||
|
||||
namespace Sludge {
|
||||
|
||||
@ -133,7 +134,7 @@ void setFatalInfo(const char *userFunc, const char *BIF) {
|
||||
if (fatalInfo)
|
||||
sprintf(fatalInfo, "Currently in this sub: %s\nCalling: %s", userFunc,
|
||||
BIF);
|
||||
debug("%s", fatalInfo);
|
||||
debug(kSludgeDebugFatal, "%s", fatalInfo);
|
||||
}
|
||||
|
||||
void setResourceForFatal(int n) {
|
||||
|
@ -40,7 +40,7 @@ SludgeEngine::SludgeEngine(OSystem *syst, const SludgeGameDescription *gameDesc)
|
||||
_rnd = new Common::RandomSource("sludge");
|
||||
|
||||
// Add debug channels
|
||||
DebugMan.addDebugChannel(kSludgeDebugScript, "Script", "Script debug level");
|
||||
DebugMan.addDebugChannel(kSludgeDebugFatal, "Script", "Script debug level");
|
||||
DebugMan.addDebugChannel(kSludgeDebugDataLoad, "Data Load", "Data loading debug level");
|
||||
DebugMan.addDebugChannel(kSludgeDebugStackMachine, "Stack Machine", "Stack Machine debug level");
|
||||
DebugMan.addDebugChannel(kSludgeDebugBuiltin, "Built-in", "Built-in debug level");
|
||||
|
@ -37,7 +37,7 @@ struct SludgeGameDescription;
|
||||
|
||||
// debug channels
|
||||
enum {
|
||||
kSludgeDebugScript = 1 << 0,
|
||||
kSludgeDebugFatal = 1 << 0,
|
||||
kSludgeDebugDataLoad = 1 << 1,
|
||||
kSludgeDebugStackMachine = 1 << 2,
|
||||
kSludgeDebugBuiltin = 1 << 3,
|
||||
|
@ -172,9 +172,9 @@ Common::File *openAndVerify(char *filename, char extra1, char extra2,
|
||||
}
|
||||
char c;
|
||||
c = fp->readByte();
|
||||
debug("%c", c);
|
||||
debug(kSludgeDebugDataLoad, "%c", c);
|
||||
while ((c = fp->readByte())) {
|
||||
debug("%c", c);
|
||||
debug(kSludgeDebugDataLoad, "%c", c);
|
||||
}
|
||||
|
||||
int majVersion = fp->readByte();
|
||||
@ -519,7 +519,7 @@ bool initSludge(char *filename) {
|
||||
}
|
||||
|
||||
numGlobals = fp->readUint16BE();
|
||||
debug("numGlobals : %i", numGlobals);
|
||||
debug(kSludgeDebugDataLoad, "numGlobals : %i", numGlobals);
|
||||
|
||||
globalVars = new variable[numGlobals];
|
||||
if (!checkNew(globalVars))
|
||||
|
Loading…
x
Reference in New Issue
Block a user