1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #include "engines/advancedDetector.h"
24 
25 #include "base/plugins.h"
26 #include "testbed/testbed.h"
27 
28 static const PlainGameDescriptor testbed_setting[] = {
29 	{ "testbed", "Testbed: The Backend Testing Framework" },
30 	{ 0, 0 }
31 };
32 
33 static const DebugChannelDef debugFlagList[] = {
34 	{Testbed::kTestbedLogOutput, "LOG", "Log of test results generated by testbed"},
35 	{Testbed::kTestbedEngineDebug, "Debug", "Engine-specific debug statements"},
36 	DEBUG_CHANNEL_END
37 };
38 
39 static const ADGameDescription testbedDescriptions[] = {
40 	{
41 		"testbed",
42 		"",
43 		AD_ENTRY1("TESTBED", 0),	// Game-data file for detection
44 		Common::EN_ANY,
45 		Common::kPlatformDOS,
46 		ADGF_NO_FLAGS,
47 		GUIO1(GUIO_NOLAUNCHLOAD)
48 	},
49 	AD_TABLE_END_MARKER
50 };
51 
52 class TestbedMetaEngineDetection : public AdvancedMetaEngineDetection {
53 public:
TestbedMetaEngineDetection()54 	TestbedMetaEngineDetection() : AdvancedMetaEngineDetection(testbedDescriptions, sizeof(ADGameDescription), testbed_setting) {
55 		_md5Bytes = 512;
56 	}
57 
getEngineId() const58 	const char *getEngineId() const override {
59 		return "testbed";
60 	}
61 
getName() const62 	const char *getName() const override {
63 		return "TestBed: The Backend Testing Framework";
64 	}
65 
getOriginalCopyright() const66 	const char *getOriginalCopyright() const override {
67 		return "Copyright (C) ScummVM";
68 	}
69 
getDebugChannels() const70 	const DebugChannelDef *getDebugChannels() const override {
71 		return debugFlagList;
72 	}
73 };
74 
75 REGISTER_PLUGIN_STATIC(TESTBED_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, TestbedMetaEngineDetection);
76