Difference between revisions of "HOWTO-Engines"

Jump to navigation Jump to search
Update with the latest debug flags changes
(Missing metaengine filename)
(Update with the latest debug flags changes)
 
Line 204: Line 204:
const Common::FSNode gameDataDir(ConfMan.get("path"));
const Common::FSNode gameDataDir(ConfMan.get("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "sound");
SearchMan.addSubDirectoryMatching(gameDataDir, "sound");
// Here is the right place to set up the engine specific debug channels
DebugMan.addDebugChannel(kQuuxDebugExample, "example", "this is just an example for a engine specific debug channel");
DebugMan.addDebugChannel(kQuuxDebugExample2, "example2", "also an example");


// Don't forget to register your random source
// Don't forget to register your random source
Line 302: Line 298:
#include "base/plugins.h"
#include "base/plugins.h"
#include "engines/advancedDetector.h"
#include "engines/advancedDetector.h"
#include "quux/quux.h"
// Here is the right place to set up the engine specific debug channels.
// The list must be terminated by the DEBUG_CHANNEL_END macro
static const DebugChannelDef debugFlagList[] = {
{ Quux::kQuuxDebugExample, "example", "this is just an example for a engine specific debug channel" },
{ Quux::kQuuxDebugExample2, "example2", "also an example" },
DEBUG_CHANNEL_END
};


namespace Quux {
namespace Quux {
Line 328: Line 333:
public:
public:
QuuxMetaEngineDetection() : AdvancedMetaEngineDetection(Quux::gameDescriptions, sizeof(ADGameDescription), Quux::quuxGames) {
QuuxMetaEngineDetection() : AdvancedMetaEngineDetection(Quux::gameDescriptions, sizeof(ADGameDescription), Quux::quuxGames) {
}
}


const char *getEngineId() const override {
const char *getEngineId() const override {
Line 340: Line 345:
const char *getOriginalCopyright() const override {
const char *getOriginalCopyright() const override {
return "Copyright (C) Quux Entertainment Ltd.";
return "Copyright (C) Quux Entertainment Ltd.";
}
const DebugChannelDef *getDebugChannels() const override {
return debugFlagList;
}
}
};
};

Navigation menu