AGS: Move debug channels to detection

This fixes build with older compiler which don't support C++11 when
building detection code.
This commit is contained in:
Le Philousophe 2021-05-22 13:45:21 +02:00
parent ec7c5bec6d
commit 799bf8aafa
3 changed files with 20 additions and 18 deletions

View file

@ -33,6 +33,7 @@
#include "engines/savestate.h"
#include "graphics/surface.h"
#include "ags/detection.h"
#include "ags/shared/gfx/bitmap.h"
#include "ags/lib/allegro/system.h"
#include "ags/engine/util/mutex_std.h"
@ -51,14 +52,6 @@ namespace AGS {
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 200
enum AGSDebugChannels {
kDebugGraphics = 1 << 0,
kDebugPath = 1 << 1,
kDebugScan = 1 << 2,
kDebugFilePath = 1 << 3,
kDebugScript = 1 << 4
};
struct AGSGameDescription;
struct PluginVersion;
class EventsManager;

View file

@ -164,6 +164,15 @@ bool AGSOptionsWidget::save() {
} // namespace AGS3
const DebugChannelDef AGSMetaEngineDetection::debugFlagList[] = {
{AGS::kDebugGraphics, "Graphics", "Graphics debug level"},
{AGS::kDebugPath, "Path", "Pathfinding debug level"},
{AGS::kDebugFilePath, "FilePath", "File path debug level"},
{AGS::kDebugScan, "Scan", "Scan for unrecognised games"},
{AGS::kDebugScript, "Script", "Enable debug script dump"},
DEBUG_CHANNEL_END
};
AGSMetaEngineDetection::AGSMetaEngineDetection() : AdvancedMetaEngineDetection(AGS::GAME_DESCRIPTIONS,
sizeof(AGS::AGSGameDescription), AGS::GAME_NAMES) {
}

View file

@ -24,19 +24,17 @@
#define AGS_DETECTION_H
#include "engines/advancedDetector.h"
#include "ags/ags.h"
static const DebugChannelDef debugFlagList[] = {
{AGS::kDebugGraphics, "Graphics", "Graphics debug level"},
{AGS::kDebugPath, "Path", "Pathfinding debug level"},
{AGS::kDebugFilePath, "FilePath", "File path debug level"},
{AGS::kDebugScan, "Scan", "Scan for unrecognised games"},
{AGS::kDebugScript, "Script", "Enable debug script dump"},
DEBUG_CHANNEL_END
};
namespace AGS {
enum AGSDebugChannels {
kDebugGraphics = 1 << 0,
kDebugPath = 1 << 1,
kDebugScan = 1 << 2,
kDebugFilePath = 1 << 3,
kDebugScript = 1 << 4
};
struct PluginVersion {
const char *_plugin;
int _version;
@ -63,6 +61,8 @@ class AGSMetaEngineDetection : public AdvancedMetaEngineDetection {
mutable Common::String _filename;
mutable Common::String _md5;
static const DebugChannelDef debugFlagList[];
public:
AGSMetaEngineDetection();
~AGSMetaEngineDetection() override {}