MACVENTURE: move debug channels to metaEngineDetection

This commit is contained in:
ysj1173886760 2021-05-16 16:45:09 +08:00 committed by Eugene Sandulenko
parent acc86e6140
commit eb0412c21f
3 changed files with 16 additions and 13 deletions

View File

@ -23,6 +23,7 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
#include "macventure/macventure.h"
namespace MacVenture {
@ -39,6 +40,17 @@ static const ADGameDescription gameDescriptions[] = {
} // End of namespace MacVenture
static const DebugChannelDef debugFlagList[] = {
{MacVenture::kMVDebugMain, "main", "Engine state"},
{MacVenture::kMVDebugGUI, "gui", "Gui"},
{MacVenture::kMVDebugText, "text", "Text decoders and printers"},
{MacVenture::kMVDebugImage, "image", "Image decoders and renderers"},
{MacVenture::kMVDebugScript, "script", "Script engine"},
{MacVenture::kMVDebugSound, "sound", "Sound decoders"},
{MacVenture::kMVDebugContainer, "container", "Containers"},
DEBUG_CHANNEL_END
};
static const PlainGameDescriptor macventureGames[] = {
{ "shadowgate", "Shadowgate" },
{ "deja_vu", "Deja Vu"},
@ -68,6 +80,10 @@ public:
const char *getOriginalCopyright() const override {
return "(C) ICOM Simulations";
}
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
};
} // End of namespace MacVenture

View File

@ -64,8 +64,6 @@ MacVentureEngine::MacVentureEngine(OSystem *syst, const ADGameDescription *gameD
_gameDescription = gameDesc;
_rnd = new Common::RandomSource("macventure");
initDebugChannels();
_resourceManager = NULL;
_globalSettings = NULL;
_gui = NULL;
@ -130,16 +128,6 @@ MacVentureEngine::~MacVentureEngine() {
delete _dataBundle;
}
void MacVentureEngine::initDebugChannels() {
DebugMan.addDebugChannel(kMVDebugMain, "main", "Engine state");
DebugMan.addDebugChannel(kMVDebugGUI, "gui", "Gui");
DebugMan.addDebugChannel(kMVDebugText, "text", "Text decoders and printers");
DebugMan.addDebugChannel(kMVDebugImage, "image", "Image decoders and renderers");
DebugMan.addDebugChannel(kMVDebugScript, "script", "Script engine");
DebugMan.addDebugChannel(kMVDebugSound, "sound", "Sound decoders");
DebugMan.addDebugChannel(kMVDebugContainer, "container", "Containers");
}
Common::Error MacVentureEngine::run() {
debug("MacVenture::MacVentureEngine::init()");
initGraphics(kScreenWidth, kScreenHeight);

View File

@ -205,7 +205,6 @@ public:
void setInitialFlags();
void setNewGameState();
void initDebugChannels();
void reset();
void resetInternals();
void resetGui();