TSAGE: move debug channels to metaEngineDetection

This commit is contained in:
ysj1173886760 2021-05-16 21:13:31 +08:00 committed by Eugene Sandulenko
parent f91930091b
commit f1a242d44e
2 changed files with 10 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#include "base/plugins.h"
#include "tsage/detection.h"
#include "tsage/tsage.h"
static const PlainGameDescriptor tSageGameTitles[] = {
{ "ringworld", "Ringworld: Revenge of the Patriarch" },
@ -34,6 +35,11 @@ static const PlainGameDescriptor tSageGameTitles[] = {
{ 0, 0 }
};
static const DebugChannelDef debugFlagList[] = {
{TsAGE::kRingDebugScripts, "scripts", "Scripts debugging"},
DEBUG_CHANNEL_END
};
#include "tsage/detection_tables.h"
class TSageMetaEngineDetection : public AdvancedMetaEngineDetection {
@ -52,6 +58,10 @@ public:
const char *getOriginalCopyright() const override {
return "(C) Tsunami Media";
}
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
};
REGISTER_PLUGIN_STATIC(TSAGE_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, TSageMetaEngineDetection);

View File

@ -37,7 +37,6 @@ TSageEngine *g_vm = NULL;
TSageEngine::TSageEngine(OSystem *system, const tSageGameDescription *gameDesc) : Engine(system),
_gameDescription(gameDesc) {
g_vm = this;
DebugMan.addDebugChannel(kRingDebugScripts, "scripts", "Scripts debugging");
if (g_vm->getGameID() == GType_Ringworld) {
if (g_vm->getFeatures() & GF_DEMO)