From 04d03fe7f0ecf04efd3a18066ce2c15291c4d211 Mon Sep 17 00:00:00 2001 From: ysj1173886760 <1173886760@qq.com> Date: Sun, 16 May 2021 19:55:37 +0800 Subject: [PATCH] NANCY: move debug channels to metaEngineDetection --- engines/nancy/detection.cpp | 12 ++++++++++++ engines/nancy/nancy.cpp | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/engines/nancy/detection.cpp b/engines/nancy/detection.cpp index e8b4ee52501..1ae095c280b 100644 --- a/engines/nancy/detection.cpp +++ b/engines/nancy/detection.cpp @@ -23,6 +23,7 @@ #include "common/config-manager.h" #include "engines/nancy/detection.h" +#include "engines/nancy/nancy.h" //#include "engines/nancy/dialogs.h" const char *const directoryGlobs[] = { @@ -32,6 +33,13 @@ const char *const directoryGlobs[] = { 0 }; +static const DebugChannelDef debugFlagList[] = { + {Nancy::kDebugEngine, "Engine", "Engine debug level"}, + {Nancy::kDebugActionRecord, "ActionRecord", "Action Record debug level"}, + {Nancy::kDebugScene, "Scene", "Scene debug level"}, + DEBUG_CHANNEL_END +}; + static const PlainGameDescriptor nancyGames[] = { // Games {"vampirediaries", "The Vampire Diaries"}, @@ -236,6 +244,10 @@ public: return "Nancy Drew Engine copyright Her Interactive, 1995-2012"; } + virtual const DebugChannelDef *getDebugChannels() const override { + return debugFlagList; + } + virtual void registerDefaultSettings(const Common::String &target) const override; //virtual GUI::OptionsContainerWidget *buildEngineOptionsWidgetStatic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override; }; diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp index 002424d5f75..c5d9a78195e 100644 --- a/engines/nancy/nancy.cpp +++ b/engines/nancy/nancy.cpp @@ -55,10 +55,6 @@ NancyEngine *g_nancy; NancyEngine::NancyEngine(OSystem *syst, const NancyGameDescription *gd) : Engine(syst), _gameDescription(gd), _system(syst) { g_nancy = this; - DebugMan.addDebugChannel(kDebugEngine, "Engine", "Engine debug level"); - DebugMan.addDebugChannel(kDebugActionRecord, "ActionRecord", "Action Record debug level"); - DebugMan.addDebugChannel(kDebugScene, "Scene", "Scene debug level"); - _randomSource = new Common::RandomSource("Nancy"); _randomSource->setSeed(_randomSource->getSeed());