From 37e313bada5cfb59120c6531616955ed281bcdfb Mon Sep 17 00:00:00 2001 From: ysj1173886760 <1173886760@qq.com> Date: Sun, 16 May 2021 19:52:11 +0800 Subject: [PATCH] MYST3: move debug channels to metaEngineDetection --- engines/myst3/detection.cpp | 13 +++++++++++++ engines/myst3/myst3.cpp | 4 ---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/engines/myst3/detection.cpp b/engines/myst3/detection.cpp index bd0782743fe..3c343501adf 100644 --- a/engines/myst3/detection.cpp +++ b/engines/myst3/detection.cpp @@ -24,6 +24,7 @@ #include "engines/advancedDetector.h" #include "engines/myst3/detection.h" +#include "engines/myst3/myst3.h" namespace Myst3 { @@ -33,6 +34,14 @@ static const PlainGameDescriptor myst3Games[] = { { 0, 0 } }; +static const DebugChannelDef debugFlagList[] = { + {Myst3::kDebugVariable, "Variable", "Track Variable Accesses"}, + {Myst3::kDebugSaveLoad, "SaveLoad", "Track Save/Load Function"}, + {Myst3::kDebugScript, "Script", "Track Script Execution"}, + {Myst3::kDebugNode, "Node", "Track Node Changes"}, + DEBUG_CHANNEL_END +}; + static const char *directoryGlobs[] = { "bin", "M3Data", @@ -208,6 +217,10 @@ public: const char *getOriginalCopyright() const override { return "Myst III Exile (C) Presto Studios"; } + + const DebugChannelDef *getDebugChannels() const override { + return debugFlagList; + } }; } // End of namespace Myst3 diff --git a/engines/myst3/myst3.cpp b/engines/myst3/myst3.cpp index b4a84335763..3dd74f2cc26 100644 --- a/engines/myst3/myst3.cpp +++ b/engines/myst3/myst3.cpp @@ -77,10 +77,6 @@ Myst3Engine::Myst3Engine(OSystem *syst, const Myst3GameDescription *version) : _backgroundSoundScriptLastRoomId(0), _backgroundSoundScriptLastAgeId(0), _transition(0), _frameLimiter(0), _inventoryManualHide(false) { - DebugMan.addDebugChannel(kDebugVariable, "Variable", "Track Variable Accesses"); - DebugMan.addDebugChannel(kDebugSaveLoad, "SaveLoad", "Track Save/Load Function"); - DebugMan.addDebugChannel(kDebugScript, "Script", "Track Script Execution"); - DebugMan.addDebugChannel(kDebugNode, "Node", "Track Node Changes"); // Add subdirectories to the search path to allow running from a full HDD install const Common::FSNode gameDataDir(ConfMan.get("path"));