XEEN: move debug channels to metaEngineDetection

This commit is contained in:
ysj1173886760 2021-05-16 21:23:17 +08:00 committed by Eugene Sandulenko
parent a8afd02783
commit 5bdaf49328
2 changed files with 13 additions and 5 deletions

View File

@ -25,6 +25,7 @@
#include "common/translation.h"
#include "xeen/detection.h"
#include "xeen/xeen.h"
static const PlainGameDescriptor XeenGames[] = {
{ "cloudsofxeen", "Might and Magic IV: Clouds of Xeen" },
@ -34,6 +35,14 @@ static const PlainGameDescriptor XeenGames[] = {
{0, 0}
};
static const DebugChannelDef debugFlagList[] = {
{Xeen::kDebugPath, "Path", "Pathfinding debug level"},
{Xeen::kDebugScripts, "scripts", "Game scripts"},
{Xeen::kDebugGraphics, "graphics", "Graphics handling"},
{Xeen::kDebugSound, "sound", "Sound processing"},
DEBUG_CHANNEL_END
};
#define GAMEOPTION_SHOW_ITEM_COSTS GUIO_GAMEOPTIONS1
#define GAMEOPTION_DURABLE_ARMOR GUIO_GAMEOPTIONS2
@ -82,6 +91,10 @@ public:
const char *getOriginalCopyright() const override {
return "Xeen (C) 1992-1993 New World Computing, Inc.";
}
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
};
REGISTER_PLUGIN_STATIC(XEEN_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, XeenMetaEngineDetection);

View File

@ -35,11 +35,6 @@ XeenEngine *g_vm = nullptr;
XeenEngine::XeenEngine(OSystem *syst, const XeenGameDescription *gameDesc)
: Engine(syst), _gameDescription(gameDesc), _randomSource("Xeen") {
// Set up debug channels
DebugMan.addDebugChannel(kDebugPath, "Path", "Pathfinding debug level");
DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics handling");
DebugMan.addDebugChannel(kDebugSound, "sound", "Sound processing");
_combat = nullptr;
_debugger = nullptr;