AGS: move debug channels to metaEngineDetection

This commit is contained in:
ysj1173886760 2021-05-15 19:42:25 +08:00 committed by Eugene Sandulenko
parent 7dcf259006
commit 29e39e0d55
2 changed files with 14 additions and 5 deletions

View File

@ -74,11 +74,6 @@ AGSEngine::AGSEngine(OSystem *syst, const AGSGameDescription *gameDesc) : Engine
_rawScreen(nullptr), _screen(nullptr), _gfxDriver(nullptr),
_globals(nullptr), _forceTextAA(false) {
g_vm = this;
DebugMan.addDebugChannel(kDebugGraphics, "Graphics", "Graphics debug level");
DebugMan.addDebugChannel(kDebugPath, "Path", "Pathfinding debug level");
DebugMan.addDebugChannel(kDebugFilePath, "FilePath", "File path debug level");
DebugMan.addDebugChannel(kDebugScan, "Scan", "Scan for unrecognised games");
DebugMan.addDebugChannel(kDebugScript, "Script", "Enable debug script dump");
_events = new EventsManager();
_music = new Music();

View File

@ -24,6 +24,16 @@
#define AGS_DETECTION_H
#include "engines/advancedDetector.h"
#include "ags/ags.h"
static const DebugChannelDef debugFlagList[] = {
{AGS::kDebugGraphics, "Graphics", "Graphics debug level"},
{AGS::kDebugPath, "Path", "Pathfinding debug level"},
{AGS::kDebugFilePath, "FilePath", "File path debug level"},
{AGS::kDebugScan, "Scan", "Scan for unrecognised games"},
{AGS::kDebugScript, "Script", "Enable debug script dump"},
DEBUG_CHANNEL_END
};
namespace AGS {
@ -69,6 +79,10 @@ public:
return "AGS Engine (C) Chris Jones";
}
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
DetectedGames detectGames(const Common::FSList &fslist) const override;
ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;