GOB: move debug channels to metaEngineDetection

This commit is contained in:
ysj1173886760 2021-05-16 16:06:25 +08:00 committed by Eugene Sandulenko
parent e42e1bcb25
commit 3f74a19d81
2 changed files with 21 additions and 13 deletions

View File

@ -26,6 +26,23 @@
#include "gob/dataio.h"
#include "gob/detection/detection.h"
#include "gob/detection/tables.h"
#include "gob/gob.h"
static const DebugChannelDef debugFlagList[] = {
{Gob::kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level"},
{Gob::kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level"},
{Gob::kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level"},
{Gob::kDebugSound, "Sound", "Sound output debug level"},
{Gob::kDebugExpression, "Expression", "Expression parser debug level"},
{Gob::kDebugGameFlow, "Gameflow", "Gameflow debug level"},
{Gob::kDebugFileIO, "FileIO", "File Input/Output debug level"},
{Gob::kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level"},
{Gob::kDebugGraphics, "Graphics", "Graphics debug level"},
{Gob::kDebugVideo, "Video", "IMD/VMD video debug level"},
{Gob::kDebugHotspots, "Hotspots", "Hotspots debug level"},
{Gob::kDebugDemo, "Demo", "Demo script debug level"},
DEBUG_CHANNEL_END
};
class GobMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
@ -38,6 +55,10 @@ public:
const char *getName() const override;
const char *getOriginalCopyright() const override;
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
private:

View File

@ -116,19 +116,6 @@ void PauseDialog::handleKeyDown(Common::KeyState state) {
GobEngine::GobEngine(OSystem *syst) : Engine(syst), _rnd("gob") {
DebugMan.addDebugChannel(kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level");
DebugMan.addDebugChannel(kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level");
DebugMan.addDebugChannel(kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level");
DebugMan.addDebugChannel(kDebugSound, "Sound", "Sound output debug level");
DebugMan.addDebugChannel(kDebugExpression, "Expression", "Expression parser debug level");
DebugMan.addDebugChannel(kDebugGameFlow, "Gameflow", "Gameflow debug level");
DebugMan.addDebugChannel(kDebugFileIO, "FileIO", "File Input/Output debug level");
DebugMan.addDebugChannel(kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level");
DebugMan.addDebugChannel(kDebugGraphics, "Graphics", "Graphics debug level");
DebugMan.addDebugChannel(kDebugVideo, "Video", "IMD/VMD video debug level");
DebugMan.addDebugChannel(kDebugHotspots, "Hotspots", "Hotspots debug level");
DebugMan.addDebugChannel(kDebugDemo, "Demo", "Demo script debug level");
_sound = 0; _mult = 0; _game = 0;
_global = 0; _dataIO = 0; _goblin = 0;
_vidPlayer = 0; _init = 0; _inter = 0;