NGI: move debug channels to metaEngineDetection

This commit is contained in:
ysj1173886760 2021-05-16 19:58:26 +08:00 committed by Eugene Sandulenko
parent 04d03fe7f0
commit 9c7718465e
2 changed files with 20 additions and 11 deletions

View file

@ -26,6 +26,22 @@
#include "common/file.h"
#include "ngi/detection.h"
#include "ngi/ngi.h"
static const DebugChannelDef debugFlagList[] = {
{NGI::kDebugPathfinding, "path", "Pathfinding"},
{NGI::kDebugDrawing, "drawing", "Drawing"},
{NGI::kDebugLoading, "loading", "Scene loading"},
{NGI::kDebugAnimation, "animation", "Animation"},
{NGI::kDebugBehavior, "behavior", "Behavior"},
{NGI::kDebugMemory, "memory", "Memory management"},
{NGI::kDebugEvents, "events", "Event handling"},
{NGI::kDebugInventory, "inventory", "Inventory"},
{NGI::kDebugSceneLogic, "scenelogic", "Scene Logic"},
{NGI::kDebugInteractions, "interactions", "Interactions"},
{NGI::kDebugXML, "xml", "XML"},
DEBUG_CHANNEL_END
};
static const PlainGameDescriptor ngiGames[] = {
{"ngi", "Nikita Game Interface game"},
@ -171,6 +187,10 @@ public:
const char *getOriginalCopyright() const override {
return "Full Pipe (C) Pipe Studio";
}
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
};
REGISTER_PLUGIN_STATIC(NGI_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, NGIMetaEngineDetection);

View file

@ -57,17 +57,6 @@ NGIEngine::NGIEngine(OSystem *syst, const NGIGameDescription *gameDesc) :
_modalObject(nullptr),
_currSoundList1(),
_mapTable() {
DebugMan.addDebugChannel(kDebugPathfinding, "path", "Pathfinding");
DebugMan.addDebugChannel(kDebugDrawing, "drawing", "Drawing");
DebugMan.addDebugChannel(kDebugLoading, "loading", "Scene loading");
DebugMan.addDebugChannel(kDebugAnimation, "animation", "Animation");
DebugMan.addDebugChannel(kDebugBehavior, "behavior", "Behavior");
DebugMan.addDebugChannel(kDebugMemory, "memory", "Memory management");
DebugMan.addDebugChannel(kDebugEvents, "events", "Event handling");
DebugMan.addDebugChannel(kDebugInventory, "inventory", "Inventory");
DebugMan.addDebugChannel(kDebugSceneLogic, "scenelogic", "Scene Logic");
DebugMan.addDebugChannel(kDebugInteractions, "interactions", "Interactions");
DebugMan.addDebugChannel(kDebugXML, "xml", "XML");
// Setup mixer
if (!_mixer->isReady()) {