From 4a6489b14eb4b282bd48909af1dab7c2ded83705 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 23 May 2021 19:11:06 +0200 Subject: [PATCH] QUUX: Update to the latest changes with debug flags --- engines/quux/detection.cpp | 13 +++++++++++++ engines/quux/quux.cpp | 4 ---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/engines/quux/detection.cpp b/engines/quux/detection.cpp index 42ff1596e22..e37cf4d6d5b 100644 --- a/engines/quux/detection.cpp +++ b/engines/quux/detection.cpp @@ -22,6 +22,15 @@ #include "base/plugins.h" #include "engines/advancedDetector.h" +#include "quux/quux.h" + +// Here is the right place to set up the engine specific debug channels. +// The list must be terminated by the DEBUG_CHANNEL_END macro +static const DebugChannelDef debugFlagList[] = { + { Quux::kQuuxDebugExample, "example", "this is just an example for a engine specific debug channel" }, + { Quux::kQuuxDebugExample2, "example2", "also an example" }, + DEBUG_CHANNEL_END +}; namespace Quux { static const PlainGameDescriptor quuxGames[] = { @@ -61,6 +70,10 @@ public: const char *getOriginalCopyright() const override { return "Copyright (C) Quux Entertainment Ltd."; } + + const DebugChannelDef *getDebugChannels() const override { + return debugFlagList; + } }; REGISTER_PLUGIN_STATIC(QUUX_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, QuuxMetaEngineDetection); diff --git a/engines/quux/quux.cpp b/engines/quux/quux.cpp index 6803c46b2f3..8d422342d2a 100644 --- a/engines/quux/quux.cpp +++ b/engines/quux/quux.cpp @@ -50,10 +50,6 @@ QuuxEngine::QuuxEngine(OSystem *syst) const Common::FSNode gameDataDir(ConfMan.get("path")); SearchMan.addSubDirectoryMatching(gameDataDir, "sound"); - // Here is the right place to set up the engine specific debug channels - DebugMan.addDebugChannel(kQuuxDebugExample, "example", "this is just an example for a engine specific debug channel"); - DebugMan.addDebugChannel(kQuuxDebugExample2, "example2", "also an example"); - // Don't forget to register your random source _rnd = new Common::RandomSource("quux");