PETKA: move debug channels to metaEngineDetection

This commit is contained in:
ysj1173886760 2021-05-16 20:02:56 +08:00 committed by Eugene Sandulenko
parent 3909daf6a2
commit e955e588d0
2 changed files with 14 additions and 5 deletions

View File

@ -24,6 +24,8 @@
#include "engines/advancedDetector.h"
#include "petka/petka.h"
static const PlainGameDescriptor petkaGames[] = {
{"petka_demo", "Red Comrades Demo"},
{"petka1", "Red Comrades 1: Save the Galaxy"},
@ -31,6 +33,14 @@ static const PlainGameDescriptor petkaGames[] = {
{0, 0}
};
static const DebugChannelDef debugFlagList[] = {
{Petka::kPetkaDebugGeneral, "general", "General issues"},
{Petka::kPetkaDebugResources, "resources", "Resources"},
{Petka::kPetkaDebugMessagingSystem, "message_system", "Engine message system"},
{Petka::kPetkaDebugDialogs, "dialogs", "Dialogs"},
DEBUG_CHANNEL_END
};
#include "petka/detection_tables.h"
class PetkaMetaEngineDetection : public AdvancedMetaEngineDetection {
@ -51,6 +61,10 @@ public:
virtual const char *getOriginalCopyright() const override {
return "Red Comrades (C) S.K.I.F.";
}
virtual const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
};
REGISTER_PLUGIN_STATIC(PETKA_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, PetkaMetaEngineDetection);

View File

@ -53,11 +53,6 @@ PetkaEngine::PetkaEngine(OSystem *system, const ADGameDescription *desc)
: Engine(system), _console(nullptr), _fileMgr(nullptr), _resMgr(nullptr),
_qsystem(nullptr), _vsys(nullptr), _desc(desc), _videoDec(nullptr), _rnd("petka") {
DebugMan.addDebugChannel(kPetkaDebugGeneral, "general", "General issues");
DebugMan.addDebugChannel(kPetkaDebugResources, "resources", "Resources");
DebugMan.addDebugChannel(kPetkaDebugMessagingSystem, "message_system", "Engine message system");
DebugMan.addDebugChannel(kPetkaDebugDialogs, "dialogs", "Dialogs");
_part = 0xFF;
_chapter = 0;
_shouldChangePart = false;