Exemplo n.º 1
0
namespace Made {

static const MadeGameDescription gameDescriptions[] = {
	{
		// NOTE: Return to Zork entries with *.dat are used to detect the game via rtzcd.dat,
		// which is packed inside rtzcd.red. Entries with *.red refer to the packed file
		// directly, which is the "official" way.

		// Return to Zork - English CD version 1.0 9/15/93 (installed)
		// Patch #1953654 submitted by spookypeanut
		{
			"rtz",
			"V1.0, 9/15/93, installed, CD",
			AD_ENTRY1("rtzcd.dat", "e95c38ded389e39cfbf87a8cb250b12e"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - English CD version 1.0 9/15/93
		// Patch #1953654 submitted by spookypeanut
		{
			"rtz",
			"V1.0, 9/15/93, CD",
			AD_ENTRY1("rtzcd.red", "cd8b62ece4677c438688c1de3f5379b9"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD_COMPRESSED,
		3,
	},

	{
		// Return to Zork - English CD version 1.1 12/7/93 (installed)
		{
			"rtz",
			"V1.1, 12/7/93, installed, CD",
			AD_ENTRY1s("rtzcd.dat", "a1db8c97a78dae10f91d356f16ad07b8", 536064),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - English CD version 1.1 12/7/93
		{
			"rtz",
			"V1.1, 12/7/93, CD",
			AD_ENTRY1s("rtzcd.red", "c4e2430e6b6c6ff1562a80fb4a9df24c", 276177),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD_COMPRESSED,
		3,
	},

	{
		// Return to Zork - English CD version 1.2 9/29/94 (installed)
		// Supplied by Dark-Star in the ScummVM forums
		{
			"rtz",
			"V1.2, 9/29/94, installed, CD",
			AD_ENTRY1("rtzcd.dat", "9d740378da2d16e83d0d0efff01bf83a"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - English CD version 1.2 9/29/94
		{
			"rtz",
			"V1.2, 9/29/94, CD",
			AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 276584),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD_COMPRESSED,
		3,
	},

	{
		// Return to Zork - German CD version 1.2 9/29/94 (installed)
		// Supplied by Dark-Star in the ScummVM forums
		{
			"rtz",
			"V1.2, 9/29/94, installed, CD",
			AD_ENTRY1s("rtzcd.dat", "9d740378da2d16e83d0d0efff01bf83a", 525824),
			Common::DE_DEU,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - German CD version 1.2 4/18/95
		// Supplied by Dark-Star in the ScummVM forums
		{
			"rtz",
			"V1.2, 4/18/95, CD",
			AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 355442),
			Common::DE_DEU,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD_COMPRESSED,
		3,
	},

	{
		// Return to Zork - Italian CD version 1.2 3/31/95 (installed)
		// Patch #2685032 submitted by goodoldgeorg
		{
			"rtz",
			"V1.2, 3/31/95, installed, CD",
			AD_ENTRY1s("rtzcd.dat", "5b86035aed0277f96e3d173542b5364a", 523776),
			Common::IT_ITA,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - Italian CD version 1.2 3/31/95
		// Patch #2685032 submitted by goodoldgeorg
		{
			"rtz",
			"V1.2, 3/31/95, CD",
			AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354971),
			Common::IT_ITA,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD_COMPRESSED,
		3,
	},

	{
		// Return to Zork - French CD version 1.2 5/13/95 (installed)
		// Patch #2685032 submitted by goodoldgeorg
		{
			"rtz",
			"V1.2, 5/13/95, installed, CD",
			AD_ENTRY1s("rtzcd.dat", "bde8251a8e34e87c54e3f93147d56c9e", 523776),
			Common::FR_FRA,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - French CD version 1.2 5/13/95
		// Patch #2685032 submitted by goodoldgeorg
		{
			"rtz",
			"V1.2, 3/31/95, CD",
			AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354614),
			Common::FR_FRA,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD_COMPRESSED,
		3,
	},

	{
		// Return to Zork - English floppy version
		{
			"rtz",
			"Floppy",
			AD_ENTRY1("rtz.prj", "764d02f52ce1c219f2c0066677fba4ce"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_RTZ,
		0,
		GF_FLOPPY,
		3,
	},

	{
		// Return to Zork - Demo
		{
			"rtz",
			"Demo",
			AD_ENTRY1("demo.dat", "2a6a1354bd5346fad4aee08e5b56caaa"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_DEMO,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_DEMO,
		3,
	},

	{
		// Return to Zork - Japanese DOS
		// This is the RTZCD.DAT in the base directory of the FM-Towns CD
		{
			"rtz",
			"",
			AD_ENTRY1("rtzcd.dat", "c4fccf67ad247f09b94c3c808b138576"),
			Common::JA_JPN,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - Japanese FM-Towns
		// This is in the RTZFM folder of the FM-Towns CD
		{
			"rtz",
			"",
			AD_ENTRY1("rtzcd.dat", "e949a6a42d82daabfa7d4dc0a87a9843"),
			Common::JA_JPN,
			Common::kPlatformFMTowns,
			ADGF_CD,
			GUIO1(GUIO_NOASPECT)
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// Return to Zork - Japanese PC-98
		// This is in the RTZ9821 folder of the FM-Towns CD
		{
			"rtz",
			"",
			AD_ENTRY1("rtzcd.dat", "0c0117e98530c736a141c2aad6834dc5"),
			Common::JA_JPN,
			Common::kPlatformPC98,
			ADGF_CD,
			GUIO0()
		},
		GID_RTZ,
		0,
		GF_CD,
		3,
	},

	{
		// The Manhole: New and Enhanced
		{
			"manhole",
			"",
			AD_ENTRY1("manhole.dat", "cb21e31ed35c963208343bc995225b73"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_CD,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_MANHOLE,
		0,
		GF_CD,
		2,
	},

	{
		// The Manhole (EGA, 5.25")
		{
			"manhole",
			"EGA",
			AD_ENTRY1("manhole.dat", "2b1658292599a861c4cd3cf6cdb3c581"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_MANHOLE,
		0,
		GF_FLOPPY,
		1,
	},

	{
		// Leather Goddesses of Phobos 2 (English)
		{
			"lgop2",
			"",
			AD_ENTRY1("lgop2.dat", "8137996db200ff67e8f172ff106f2e48"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_LGOP2,
		0,
		GF_FLOPPY,
		2,
	},

	{
		// Leather Goddesses of Phobos 2 (German)
		// Supplied by windlepoons (bug tracker #2675695)
		{
			"lgop2",
			"",
			AD_ENTRY1s("lgop2.dat", "a0ffea6a3b7e39bd861edd00c397641c", 299466),
			Common::DE_DEU,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_LGOP2,
		0,
		GF_FLOPPY,
		2,
	},

	{
		// Leather Goddesses of Phobos 2 (French)
		// Supplied by goodoldgeorg (bug tracker #2675759)
		{
			"lgop2",
			"",
			AD_ENTRY1s("lgop2.dat", "f9e974087af7cf4b7ec2d8dc45d01e0c", 295366),
			Common::FR_FRA,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_LGOP2,
		0,
		GF_FLOPPY,
		2,
	},

	{
		// Leather Goddesses of Phobos 2 (Spanish)
		// Supplied by goodoldgeorg (bug tracker #2675759)
		{
			"lgop2",
			"",
			AD_ENTRY1s("lgop2.dat", "96eb95b4d75b9a3da0b0d67e3b4a787d", 288984),
			Common::ES_ESP,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_LGOP2,
		0,
		GF_FLOPPY,
		2,
	},

	{
		// Rodney's Funscreen
		{
			"rodney",
			"",
			AD_ENTRY1("rodneys.dat", "a79887dbaa47689facd7c6f09258ba5a"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOSPEECH)
		},
		GID_RODNEY,
		0,
		GF_FLOPPY,
		2,
	},

	{ AD_TABLE_END_MARKER, 0, 0, 0, 0 }
};

/**
 * The fallback game descriptor used by the Made engine's fallbackDetector.
 * Contents of this struct are to be overwritten by the fallbackDetector.
 */
static MadeGameDescription g_fallbackDesc = {
	{
		"",
		"",
		AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
		Common::UNK_LANG,
		Common::kPlatformDOS,
		ADGF_NO_FLAGS,
		GUIO0()
	},
	0,
	0,
	0,
	0,
};

} // End of namespace Made
namespace Lure {

static const LureGameDescription gameDescriptions[] = {
	{
		{
			"lure",
			"VGA",
			AD_ENTRY1("disk1.vga", "b2a8aa6d7865813a17a3c636e063572e"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY,
	},

	{
		{
			"lure",
			"EGA",
			AD_ENTRY1("disk1.ega", "e9c9fdd8a19f7910d68e53cb84651273"),
			Common::EN_ANY,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY | GF_EGA,
	},

	{
		{
			"lure",
			"VGA",
			AD_ENTRY1("disk1.vga", "cf69d5ada228dd74f89046691c16aafb"),
			Common::IT_ITA,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY,
	},

	{
		{
			"lure",
			"EGA",
			AD_ENTRY1("disk1.ega", "b80aced0321f64c58df2c7d3d74dfe79"),
			Common::IT_ITA,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY | GF_EGA,
	},

	{
		{
			"lure",
			"",
			AD_ENTRY1("disk1.vga", "7aa19e444dab1ac7194d9f7a40ffe54a"),
			Common::DE_DEU,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY,
	},

	{
		{
			"lure",
			"",
			AD_ENTRY1("disk1.vga", "894a2c2caeccbad2fc2f4a79a8ee47b0"),
			Common::DE_DEU,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY,
	},

	{
		{
			"lure",
			"",
			AD_ENTRY1("disk1.vga", "1c94475c1bb7e0e88c1757d3b5377e94"),
			Common::FR_FRA,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY,
	},

	{
		{
			"lure",
			"",
			AD_ENTRY1("disk1.vga", "1751145b653959f7a64fe1618d6b97ac"),
			Common::ES_ESP,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY,
	},

//add ScummVM OG Edition
//Rusian fan translation v1.0 (Old-Games.ru)
	{
		{
			"lure",
			"",
			AD_ENTRY1("disk1.vga", "04cdcaa9f0cadca492f7aff0c8adfe06"),
			Common::RU_RUS,
			Common::kPlatformDOS,
			ADGF_NO_FLAGS,
			GUIO0()
		},
		GF_FLOPPY,
	},
	{ AD_TABLE_END_MARKER, 0 }
};
//add end
} // End of namespace Lure
Exemplo n.º 3
0
namespace Wintermute {

/**
 * The fallback game descriptor used by the Wintermute engine's fallbackDetector.
 * Contents of this struct are overwritten by the fallbackDetector. (logic copied partially
 * from the SCI-engine).
 */
static ADGameDescription s_fallbackDesc = {
	"",
	"",
	AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
	Common::UNK_LANG,
	Common::kPlatformWindows,
	ADGF_UNSTABLE,
	GUIO0()
};
static char s_fallbackGameIdBuf[256];

static const char *directoryGlobs[] = {
	"language", // To detect the various languages
	0
};

class WintermuteMetaEngine : public AdvancedMetaEngine {
public:
	WintermuteMetaEngine() : AdvancedMetaEngine(Wintermute::gameDescriptions, sizeof(ADGameDescription), Wintermute::wintermuteGames) {
		_singleid = "wintermute";
		_maxScanDepth = 2;
		_directoryGlobs = directoryGlobs;
	}
	virtual const char *getName() const {
		return "Wintermute";
	}

	virtual const char *getOriginalCopyright() const {
		return "Copyright (c) 2011 Jan Nedoma";
	}

	virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
		// Set some defaults
		s_fallbackDesc.extra = "";
		s_fallbackDesc.language = Common::UNK_LANG;
		s_fallbackDesc.flags = ADGF_UNSTABLE;
		s_fallbackDesc.platform = Common::kPlatformWindows; // default to Windows
		s_fallbackDesc.gameid = "wintermute";
		s_fallbackDesc.guioptions = GUIO0();

		if (allFiles.contains("data.dcp")) {
			Common::String name, caption;
			if (WintermuteEngine::getGameInfo(fslist, name, caption)) {
				for (uint32 i = 0; i < name.size(); i++) {
					// Replace spaces (and other non-alphanumerics) with underscores
					if (!Common::isAlnum(name[(int32)i])) {
						name.setChar('_', (uint32)i);
					}
				}
				// Prefix to avoid collisions with actually known games
				name = "wmefan-" + name;
				Common::strlcpy(s_fallbackGameIdBuf, name.c_str(), sizeof(s_fallbackGameIdBuf) - 1);
				s_fallbackDesc.gameid = s_fallbackGameIdBuf;
				if (caption != name) {
					caption += " (fangame) ";
					char *offset = s_fallbackGameIdBuf + name.size() + 1;
					uint32 remainingLength = (sizeof(s_fallbackGameIdBuf) - 1) - (name.size() + 1);
					Common::strlcpy(offset, caption.c_str(), remainingLength);
					s_fallbackDesc.extra = offset;
					s_fallbackDesc.flags |= ADGF_USEEXTRAASTITLE;
				}
				return &s_fallbackDesc;
			} // Fall through to return 0;
		}
		return 0;
	}

	virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
		assert(syst);
		assert(engine);

		*engine = new Wintermute::WintermuteEngine(syst, desc);
		return true;
	}

	bool hasFeature(MetaEngineFeature f) const {
		switch (f) {
		case MetaEngine::kSupportsListSaves:
			return true;
		case MetaEngine::kSupportsLoadingDuringStartup:
			return true;
		case MetaEngine::kSupportsDeleteSave:
			return true;
		case MetaEngine::kSavesSupportCreationDate:
			return true;
		case MetaEngine::kSavesSupportMetaInfo:
			return true;
		case MetaEngine::kSavesSupportThumbnail:
			return true;
		default:
			return false;
		}
	}

	SaveStateList listSaves(const char *target) const {
		SaveStateList saves;
		Wintermute::BasePersistenceManager pm(target, true);
		for (int i = 0; i < getMaximumSaveSlot(); i++) {
			if (pm.getSaveExists(i)) {
				SaveStateDescriptor desc;
				pm.getSaveStateDesc(i, desc);
				saves.push_back(desc);
			}
		}
		return saves;
	}

	int getMaximumSaveSlot() const {
		return 100;
	}

	void removeSaveState(const char *target, int slot) const {
		Wintermute::BasePersistenceManager pm(target, true);
		pm.deleteSaveSlot(slot);
	}

	virtual SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const {
		Wintermute::BasePersistenceManager pm(target, true);
		SaveStateDescriptor retVal;
		retVal.setDescription("Invalid savegame");
		pm.getSaveStateDesc(slot, retVal);
		return retVal;
	}
};

} // end of namespace Wintermute
Exemplo n.º 4
0
		return "qfg3";
	}

	return sierraId;
}

#include "sci/detection_tables.h"

/**
 * The fallback game descriptor used by the SCI engine's fallbackDetector.
 * Contents of this struct are overwritten by the fallbackDetector.
 */
static ADGameDescription s_fallbackDesc = {
	"",
	"",
	AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
	Common::UNK_LANG,
	Common::kPlatformPC,
	ADGF_NO_FLAGS,
	Common::GUIO_NONE
};

static char s_fallbackGameIdBuf[256];

class SciMetaEngine : public AdvancedMetaEngine {
public:
	SciMetaEngine() : AdvancedMetaEngine(Sci::SciGameDescriptions, sizeof(ADGameDescription), s_sciGameTitles) {
		_singleid = "sci";
	}

	virtual const char *getName() const {
Exemplo n.º 5
0
namespace CGE {

#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF  GUIO_GAMEOPTIONS1

static const PlainGameDescriptor CGEGames[] = {
	{ "soltys", "Soltys" },
	{ 0, 0 }
};

static const ADGameDescription gameDescriptions[] = {
	{
		"soltys", "Freeware",
		{
			{"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
			{"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
			AD_LISTEND
		},
		Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
	},
	{
		"soltys", "Demo (not supported)",
		{
			{"vol.cat", 0, "1e077c8ff58109a187f07ac54b0c873a", 18788},
			{"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
			AD_LISTEND
		},
		Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
	},
	{
		"soltys", "Demo (not supported)",
		{
			{"vol.cat", 0, "f17987487fab1ebddd781d8d02fedecc", 7168},
			{"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
			AD_LISTEND
		},
		Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
	},
	{
		"soltys", "Freeware v1.0",
		{
			{"vol.cat", 0, "f1675684c68ab90272f5776f8f2c3974", 50176},
			{"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
			AD_LISTEND
		},
		Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
	},
	{
		"soltys", "Freeware v1.0",
		{
			{"vol.cat", 0, "20fdce799adb618100ef9ee2362be875", 50176},
			{"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
			AD_LISTEND
		},
		Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
	},
	{
		"soltys", "Freeware v1.0",
		{
			{"vol.cat", 0, "fcae86b20eaa5cedec17b24fa5e85eb4", 50176},
			{"vol.dat", 0, "ff10d54acc2c95696c57e05819b6906f", 8450151},
			AD_LISTEND
		},
		Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
	},

	AD_TABLE_END_MARKER
};

static const ADExtraGuiOptionsMap optionsList[] = {
	{
		GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
		{
			_s("Color Blind Mode"),
			_s("Enable Color Blind Mode by default"),
			"enable_color_blind",
			false
		}
	},

	AD_EXTRA_GUI_OPTIONS_TERMINATOR
};

class CGEMetaEngine : public AdvancedMetaEngine {
public:
	CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames, optionsList) {
		_singleId = "soltys";
	}

	virtual const char *getName() const {
		return "CGE";
	}

	virtual const char *getOriginalCopyright() const {
		return "Soltys (C) 1994-1996 L.K. Avalon";
	}

	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
	virtual bool hasFeature(MetaEngineFeature f) const;
	virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
	virtual int getMaximumSaveSlot() const;
	virtual SaveStateList listSaves(const char *target) const;
	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
	virtual void removeSaveState(const char *target, int slot) const;
};

static ADGameDescription s_fallbackDesc = {
	"soltys",
	"Unknown version",
	AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
	Common::UNK_LANG,
	Common::kPlatformDOS,
	ADGF_NO_FLAGS,
	GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
};

static const ADFileBasedFallback fileBasedFallback[] = {
	{ &s_fallbackDesc, { "vol.cat", "vol.dat", 0 } },
	{ 0, { 0 } }
};

ADDetectedGame CGEMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
	ADDetectedGame game = detectGameFilebased(allFiles, fslist, CGE::fileBasedFallback);

	if (!game.desc)
		return ADDetectedGame();

	SearchMan.addDirectory("CGEMetaEngine::fallbackDetect", fslist.begin()->getParent());
	ResourceManager *resman;
	resman = new ResourceManager();
	bool sayFileFound = resman->exist("CGE.SAY");
	delete resman;

	SearchMan.remove("CGEMetaEngine::fallbackDetect");

	if (!sayFileFound)
		return ADDetectedGame();

	return game;
}

bool CGEMetaEngine::hasFeature(MetaEngineFeature f) const {
	return
		(f == kSupportsListSaves) ||
		(f == kSupportsLoadingDuringStartup) ||
		(f == kSupportsDeleteSave) ||
		(f == kSavesSupportMetaInfo) ||
		(f == kSavesSupportThumbnail) ||
		(f == kSavesSupportCreationDate) ||
		(f == kSavesSupportPlayTime) ||
		(f == kSimpleSavesNames);
}

void CGEMetaEngine::removeSaveState(const char *target, int slot) const {
	Common::String fileName = Common::String::format("%s.%03d", target, slot);
	g_system->getSavefileManager()->removeSavefile(fileName);
}

int CGEMetaEngine::getMaximumSaveSlot() const {
	return 99;
}

SaveStateList CGEMetaEngine::listSaves(const char *target) const {
	Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
	Common::StringArray filenames;
	Common::String pattern = target;
	pattern += ".###";

	filenames = saveFileMan->listSavefiles(pattern);

	SaveStateList saveList;
	for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
		// Obtain the last 3 digits of the filename, since they correspond to the save slot
		int slotNum = atoi(filename->c_str() + filename->size() - 3);

		if (slotNum >= 0 && slotNum <= 99) {

			Common::InSaveFile *file = saveFileMan->openForLoading(*filename);
			if (file) {
				CGE::SavegameHeader header;

				// Check to see if it's a ScummVM savegame or not
				char buffer[kSavegameStrSize + 1];
				file->read(buffer, kSavegameStrSize + 1);

				if (!strncmp(buffer, CGE::savegameStr, kSavegameStrSize + 1)) {
					// Valid savegame
					if (CGE::CGEEngine::readSavegameHeader(file, header)) {
						saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
					}
				} else {
					// Must be an original format savegame
					saveList.push_back(SaveStateDescriptor(slotNum, "Unknown"));
				}

				delete file;
			}
		}
	}

	// Sort saves based on slot number.
	Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
	return saveList;
}

SaveStateDescriptor CGEMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
	Common::String fileName = Common::String::format("%s.%03d", target, slot);
	Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);

	if (f) {
		CGE::SavegameHeader header;

		// Check to see if it's a ScummVM savegame or not
		char buffer[kSavegameStrSize + 1];
		f->read(buffer, kSavegameStrSize + 1);

		bool hasHeader = !strncmp(buffer, CGE::savegameStr, kSavegameStrSize + 1) &&
			CGE::CGEEngine::readSavegameHeader(f, header, false);
		delete f;

		if (!hasHeader) {
			// Original savegame perhaps?
			SaveStateDescriptor desc(slot, "Unknown");
			return desc;
		} else {
			// Create the return descriptor
			SaveStateDescriptor desc(slot, header.saveName);
			desc.setThumbnail(header.thumbnail);
			desc.setSaveDate(header.saveYear, header.saveMonth, header.saveDay);
			desc.setSaveTime(header.saveHour, header.saveMinutes);

			if (header.playTime) {
				desc.setPlayTime(header.playTime * 1000);
			}

			// Slot 0 is used for the 'automatic save on exit' save in Soltys, thus
			// we prevent it from being deleted or overwritten by accident.
			desc.setDeletableFlag(slot != 0);
			desc.setWriteProtectedFlag(slot == 0);

			return desc;
		}
	}

	return SaveStateDescriptor();
}

bool CGEMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
	if (desc) {
		*engine = new CGE::CGEEngine(syst, desc);
	}
	return desc != 0;
}
} // End of namespace CGE
Exemplo n.º 6
0
namespace Composer {

static const ComposerGameDescription gameDescriptions[] = {
	// Magic Tales: Baba Yaga and the Magic Geese - from bug #3485018
	{
		{
			"babayaga",
			"",
			AD_ENTRY1s("book.ini", "412b7f4b0ef07f442009d28e3a819974", 3852),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV1
	},

	// Magic Tales: Baba Yaga and the Magic Geese Mac - from bug #3466402
	{
		{
			"babayaga",
			"",
			AD_ENTRY1("Baba Yaga", "ae3a4445f42fe10253da7ee4ea0d37"),
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV1
	},

	// Magic Tales: Imo and the King - from bug #3485018
	{
		{
			"imoking",
			"",
			AD_ENTRY1s("book.ini", "62b52a1763cce7d7d6ccde9f9d32fd4b", 3299),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV1
	},

	// Magic Tales: Imo and the King Mac - from bug #3466402
	{
		{
			"imoking",
			"",
			AD_ENTRY1("imo and the king", "b0277885fec943b5f19409f35b33964c"),
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV1
	},

	// Magic Tales: The Little Samurai - from bug #3485018
	{
		{
			"littlesamurai",
			"",
			AD_ENTRY1s("book.ini", "7a851869d022a9041e0dd11e5bace09b", 3747),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV1
	},

	// Magic Tales: The Little Samurai Mac - from bug #3466402
	{
		{
			"littlesamurai",
			"",
			AD_ENTRY1("The Little Samurai", "38121dd649c24e8676aa108cf35d44b5"),
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV1
	},

	// from Liam Finds a Story CD
	{
		{
			"magictales",
			"Magic Tales Demo: Baby Yaga, Samurai, Imo",
			AD_ENTRY1("book.ini", "dbc98c566f4ac61b544443524585dccb"),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_USEEXTRAASTITLE | ADGF_DEMO,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV1
	},

	{
		{
			"liam",
			0,
			AD_ENTRY1s("book.ini", "fc9d9b9e72e7301d011b808606eaa15b", 834),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	// Liam Finds a Story Mac - from bug #3463201
	{
		{
			"liam",
			0,
			{
				{"liam finds a story.ini", 0, "85a1ca6002ded8572920bbdb73d35b0a", -1},
				{"page99.rsc", 0, "11b0a19c6b6d73c39e2bd289a457c1dc", -1},
				AD_LISTEND
			},
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	// from Liam Finds a Story CD
	{
		{
			"magictales",
			"Magic Tales Demo: Sleeping Cub, Princess & Crab",
			AD_ENTRY1("book.ini", "3dede2522bb0886c95667b082987a87f"),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_USEEXTRAASTITLE | ADGF_DEMO,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{
		{
			"darby",
			0,
			{
				{"book.ini", 0, "7e3404c559d058521fff2aebe5c427a8", 2545},
				{"page99.rsc", 0, "49cc6b16caa1c5ec7d94a3c47eed9a02", 1286480},
				AD_LISTEND
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{
		{
			"darby",
			0,
			AD_ENTRY1("Darby the Dragon.ini", "d81f9214936fa70d42fc578908d4bb3d"),
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{ // Provided by Strangerke, "CD-Rom 100% Malin" Pack
		{
			"darby",
			0,
			AD_ENTRY1("book.ini", "285308372f7dddff2ca5a25c9192cf5c"),
			Common::FR_FRA,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{
		{
			"gregory",
			0,
			{
				{"book.ini", 0, "14a562dcf361773445255af9f3e94790", 2234},
				{"page99.rsc", 0, "01f9381162467e052dfd4c704169ef3e", 388644},
				AD_LISTEND
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{
		{
			"gregory",
			0,
			AD_ENTRY1("Gregory.ini", "fa82f14731f28c7379c5a106df07a0d6"),
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{ // Provided by Strangerke, "CD-Rom 100% Malin" Pack
		{
			"gregory",
			0,
			AD_ENTRY1("book.ini", "e54fc5c00de5f94e908a969e445af5d0"),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{ // Provided by sev
		{
			"princess",
			0,
			{
				{"book.ini", 0, "fb32572577b9a41ba299825ef1e3181e", 966},
				{"page99.rsc", 0, "fd5ebd3b5e36c4651c50241619525355", 45418},
				AD_LISTEND
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	// The Princess and the Crab Mac - From Bug #3461984
	{
		{
			"princess",
			0,
			{
				{"the princess and the crab.ini", 0, "f6b551a7304643004bd5e4df7ac1e76e", -1},
				{"page99.rsc", 0, "fd5ebd3b5e36c4651c50241619525355", -1},
				AD_LISTEND
			},
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{ // Provided by sev
		{
			"sleepingcub",
			0,
			{
				{"book.ini", 0, "0d329e592387009c6387a733a3ea2235", 964},
				{"page99.rsc", 0, "219fbd9bd2ff87c7023814405d753145", 46916},
				AD_LISTEND
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	// Sleeping Cub Mac - From Bug #3461369
	{
		{
			"sleepingcub",
			0,
			{
				{"sleeping cub.ini", 0, "39642a4036cb51443f5e90052c3ad0b2", -1},
				{"page99.rsc", 0, "219fbd9bd2ff87c7023814405d753145", -1},
				AD_LISTEND
			},
			Common::EN_ANY,
			Common::kPlatformMacintosh,
			ADGF_NO_FLAGS,
			GUIO1(GUIO_NOASPECT)
		},
		GType_ComposerV2
	},

	{ AD_TABLE_END_MARKER, 0 }
};

} // End of namespace Composer
Exemplo n.º 7
0
namespace Buried {

static const BuriedGameDescription gameDescriptions[] = {
	// English Windows 3.11 8BPP
	// Installed
	// v1.01
	{
		{
			"buried",
			"v1.01 8BPP",
			{
				{ "BIT816.EXE",  0, "57a14461c77d9c77534bd418043db1ec", 1163776 },
				{ "BIT8LIB.DLL", 0, "31bcd9e5cc32df00b09ce626e6d9106e", 2420480 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO0()
		},
	},

	// English Windows 3.11 24BPP
	// Installed
	// v1.01
	{
		{
			"buried",
			"v1.01 24BPP",
			{
				{ "BIT2416.EXE",  0, "dcbfb3f2916ad902043942fc00d2017f", 1159680 },
				{ "BIT24LIB.DLL", 0, "74ac9dae92f415fea8cdbd220ba8795c", 5211648 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			GF_TRUECOLOR,
			GUIO0()
		},
	},

	// Japanese Windows 3.11 8BPP
	// Installed
	// v1.051
	{
		{
			"buried",
			"v1.051 8BPP",
			{
				{ "BIT816.EXE",  0, "decbf9a7d91803525137ffd980d16708", 1163264 },
				{ "BIT8LIB.DLL", 0, "f5ccde0efccb95afe902627a35262568", 2418816 },
				{ 0, 0, 0, 0 },
			},
			Common::JA_JPN,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO0()
		},
	},

	// Japanese Windows 3.11 24BPP
	// Installed
	// v1.051
	{
		{
			"buried",
			"v1.051 24BPP",
			{
				{ "BIT2416.EXE",  0, "9435b9a40e3ac83e6fa1e83caaf57792", 1157632 },
				{ "BIT24LIB.DLL", 0, "4d55802259d9648b9aa396461bfd53a3", 6576896 },
				{ 0, 0, 0, 0 },
			},
			Common::JA_JPN,
			Common::kPlatformWindows,
			GF_TRUECOLOR,
			GUIO0()
		},
	},

	// English Windows 3.11 8BPP
	// Not Installed
	// v1.01
	{
		{
			"buried",
			"v1.01 8BPP",
			{
				{ "BIT816.EX_",  0, "166b44e53350c19bb25ef93d2c2b8f79", 364490 },
				{ "BIT8LIB.DL_", 0, "8a345993f60f6bed7c17fa9e7f2bc37d", 908854 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			GF_COMPRESSED,
			GUIO0()
		},
	},

	// English Windows 3.11 24BPP
	// Not Installed
	// v1.01
	{
		{
			"buried",
			"v1.01 24BPP",
			{
				{ "BIT2416.EX_",  0, "a9ac76610ba614b59235a7d5e00e4a62", 361816 },
				{ "BIT24LIB.DL_", 0, "00e6eedbcef824988fbb01a87ca8f7fd", 2269314 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			GF_COMPRESSED | GF_TRUECOLOR,
			GUIO0()
		},
	},

	// German Windows 3.11 8BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 8BPP",
			{
				{ "BIT816.EXE",  0, "a039e9f1c569acc1cf80f6b549ce1e37", 1178112 },
				{ "BIT8LIB.DLL", 0, "6b22f0b47efb29e45e9b2a336185d924", 2420608 },
				{ 0, 0, 0, 0 },
			},
			Common::DE_DEU,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO0()
		},
	},

	// German Windows 3.11 24BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 24BPP",
			{
				{ "BIT2416.EXE",  0, "fbfd453cced2b14069fa32e3c8dd69e2", 1172480 },
				{ "BIT24LIB.DLL", 0, "30e56210d3150b5fa41c9bd2c90754fe", 6581376 },
				{ 0, 0, 0, 0 },
			},
			Common::DE_DEU,
			Common::kPlatformWindows,
			GF_TRUECOLOR,
			GUIO0()
		},
	},

	// French Windows 3.11 8BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 8BPP",
			{
				{ "BIT816.EXE",  0, "edea5331dc7cb0f3da7322691e12a18a", 1182720 },
				{ "BIT8LIB.DLL", 0, "6b22f0b47efb29e45e9b2a336185d924", 2420608 },
				{ 0, 0, 0, 0 },
			},
			Common::FR_FRA,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO0()
		},
	},

	// French Windows 3.11 24BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 24BPP",
			{
				{ "BIT2416.EXE",  0, "0adea8e1ad6fddad3b861be8a7bab340", 1177088 },
				{ "BIT24LIB.DLL", 0, "30e56210d3150b5fa41c9bd2c90754fe", 6581376 },
				{ 0, 0, 0, 0 },
			},
			Common::FR_FRA,
			Common::kPlatformWindows,
			GF_TRUECOLOR,
			GUIO0()
		},
	},

	// Italian Windows 3.11 8BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 8BPP",
			{
				{ "BIT816.EXE",  0, "fb3e5c9198503bbb45b79150b511af5e", 1175040 },
				{ "BIT8LIB.DLL", 0, "6b22f0b47efb29e45e9b2a336185d924", 2420608 },
				{ 0, 0, 0, 0 },
			},
			Common::IT_ITA,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO0()
		},
	},

	// Italian Windows 3.11 24BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 24BPP",
			{
				{ "BIT2416.EXE",  0, "56bdd481b063c91b95c21f02faa450bb", 1169408 },
				{ "BIT24LIB.DLL", 0, "30e56210d3150b5fa41c9bd2c90754fe", 6581376 },
				{ 0, 0, 0, 0 },
			},
			Common::IT_ITA,
			Common::kPlatformWindows,
			GF_TRUECOLOR,
			GUIO0()
		},
	},

	// Spanish Windows 3.11 8BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 8BPP",
			{
				{ "BIT816.EXE",  0, "f08c96347fcb83d92ae57de1fb578234", 1174528 },
				{ "BIT8LIB.DLL", 0, "a80afdc20264e764e831ef5099cde623", 2420992 },
				{ 0, 0, 0, 0 },
			},
			Common::ES_ESP,
			Common::kPlatformWindows,
			ADGF_NO_FLAGS,
			GUIO0()
		},
	},

	// Spanish Windows 3.11 24BPP
	// Installed
	// v1.05
	{
		{
			"buried",
			"v1.05 24BPP",
			{
				{ "BIT2416.EXE",  0, "d409b59f124babc9b423793e762b7e03", 1168896 },
				{ "BIT24LIB.DLL", 0, "c864bcd69d05532e0066b8db173a939b", 6582784 },
				{ 0, 0, 0, 0 },
			},
			Common::ES_ESP,
			Common::kPlatformWindows,
			GF_TRUECOLOR,
			GUIO0()
		},
	},

	// English Windows 95 8BPP
	// v1.1
	{
		{
			"buried",
			"v1.1 8BPP",
			{
				{ "BIT832.EXE",  0, "f4f8007f49197ba40ea633eb113c0b6d", 1262592 },
				{ "BIT8L32.DLL", 0, "addfef0420e1f41a7766ecc6baa58553", 2424832 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			GF_WIN95,
			GUIO0()
		},
	},

	// English Windows 95 24BPP
	// v1.1
	{
		{
			"buried",
			"v1.1 24BPP",
			{
				{ "BIT2432.EXE",  0, "4086a8200938eac3e72d238a84f65618", 1257472 },
				{ "BIT24L32.DLL", 0, "198bfd476d5228c4a7a63c029cffadfc", 5216256 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			GF_TRUECOLOR | GF_WIN95,
			GUIO0()
		},
	},

	// English Windows Demo 8BPP
	{
		{
			"buried",
			"Demo 8BPP",
			AD_ENTRY1("BIT816.EXE", "a5bca831dac0903a304c29c320f881c5"),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_DEMO,
			GUIO1(GUIO_NOLAUNCHLOAD)
		},
	},

	// English Windows Demo 24BPP
	{
		{
			"buried",
			"Demo 24BPP",
			AD_ENTRY1("BIT2416.EXE", "9857e2d2b7a63b1304058dabc5098249"),
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_DEMO | GF_TRUECOLOR,
			GUIO1(GUIO_NOLAUNCHLOAD)
		},
	},

	// English Windows 3.11 Trial 8BPP
	// v1.1
	{
		{
			"buried",
			"Trial 8BPP",
			{
				{ "BTV816.EXE",  0, "a3551483329816d8ddc8fa877113762c", 1170432 },
				{ "BIT8LIB.DLL", 0, "6b22f0b47efb29e45e9b2a336185d924", 2420608 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_DEMO | GF_TRIAL,
			GUIO0()
		},
	},

	// English Windows 3.11 Trial 24BPP
	// v1.1
	{
		{
			"buried",
			"Trial 24BPP",
			{
				{ "BTV2416.EXE",  0, "e0783c5eda09176d414d3df4ada8fe89", 1164288 },
				{ "BIT24LIB.DLL", 0, "74ac9dae92f415fea8cdbd220ba8795c", 5211648 },
				{ 0, 0, 0, 0 },
			},
			Common::EN_ANY,
			Common::kPlatformWindows,
			ADGF_DEMO | GF_TRUECOLOR | GF_TRIAL,
			GUIO0()
		},
	},

	{ AD_TABLE_END_MARKER }
};

static const char *directoryGlobs[] = {
	"win31",
	"manual",
	0
};

} // End of namespace Buried
Exemplo n.º 8
0
	{"willy","",
		AD_ENTRY1s("volume.rmf", "ba5cf24ec4b6dc044b03115a0cd5f3ff", 9896),
		Common::EN_ANY,
		Common::kPlatformPC,
		ADGF_NO_FLAGS,
		Common::GUIO_NONE
	},

	AD_TABLE_END_MARKER
};

} // End of namespace Dgds

static const ADGameDescription DgdsGameGeneric[] = {
	{"dgds", 0,
		AD_ENTRY1("volume.rmf", NULL),
		Common::UNK_LANG,
		Common::kPlatformUnknown,
		0,
		Common::GUIO_NONE
	},
	AD_TABLE_END_MARKER
};

static const ADFileBasedFallback DgdsGameFallback[] = {
	{(const void*)&DgdsGameGeneric[0], {"volume.rmf", NULL} },
	{(const void*)&DgdsGameGeneric[0], {"volume.vga", NULL} },
	{(const void*)&DgdsGameGeneric[0], {"resource.map", NULL} },
	{0, {NULL}}
};
Exemplo n.º 9
0
    // List of files for file-based fallback detection (optional)
    0,
    // Flags
    0,
    // Additional GUI options (for every game}
    Common::GUIO_NOLAUNCHLOAD,
    // Maximum directory depth
    1,
    // List of directory globs
    0
};

static const ADGameDescription tuckerDemoGameDescription = {
    "tucker",
    "Non-Interactive Demo",
    AD_ENTRY1(0, 0),
    Common::EN_ANY,
    Common::kPlatformPC,
    ADGF_DEMO | Tucker::kGameFlagDemo | Tucker::kGameFlagIntroOnly,
    Common::GUIO_NONE
};

class TuckerMetaEngine : public AdvancedMetaEngine {
public:
    TuckerMetaEngine() : AdvancedMetaEngine(detectionParams) {
    }

    virtual const char *getName() const {
        return "Tucker Engine";
    }
Exemplo n.º 10
0
namespace CGE2 {

#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF  GUIO_GAMEOPTIONS1

static const PlainGameDescriptor CGE2Games[] = {
		{ "sfinx", "Sfinx" },
		{ 0, 0 }
};

static const ADGameDescription gameDescriptions[] = {
		{
			"sfinx", "Freeware",
			{
				{ "vol.cat", 0, "21197b287d397c53261b6616bf0dd880", 129024 },
				{ "vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844 },
				AD_LISTEND
			},
			Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
		},

		{
			"sfinx", "Freeware v1.0",
			{
				{"vol.cat", 0, "aa402aed24a72c53a4d1211c456b79dd", 129024},
				{"vol.dat", 0, "5966ac26d91d664714349669f9dd09b5", 34180164},
				AD_LISTEND
			},
			Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
		},

		{
			"sfinx", "Freeware v1.1",
			{
				{"vol.cat", 0, "aa402aed24a72c53a4d1211c456b79dd", 129024},
				{"vol.dat", 0, "5966ac26d91d664714349669f9dd09b5", 34180367},
				AD_LISTEND
			},
			Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
		},

		{
			"sfinx", "Freeware v0.3",
			{
				{"vol.cat", 0, "f158e469dccbebc5a632eb848df89779", 129024},
				{"vol.dat", 0, "d40a6b4ae173d6930be54ba56bee15d5", 34183430},
				AD_LISTEND
			},
			Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
		},

		{
			"sfinx", "Freeware v1.0",
			{
				{"vol.cat", 0, "f158e469dccbebc5a632eb848df89779", 129024},
				{"vol.dat", 0, "d40a6b4ae173d6930be54ba56bee15d5", 34183443},
				AD_LISTEND
			},
			Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
		},

		{
			"sfinx", "Freeware v1.1",
			{
				{"vol.cat", 0, "f158e469dccbebc5a632eb848df89779", 129024},
				{"vol.dat", 0, "d40a6b4ae173d6930be54ba56bee15d5", 34182773},
				AD_LISTEND
			},
			Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
		},

		AD_TABLE_END_MARKER
};

static const ADExtraGuiOptionsMap optionsList[] = {
		{
			GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
			{
				_s("Color Blind Mode"),
				_s("Enable Color Blind Mode by default"),
				"enable_color_blind",
				false
			}
		},

		AD_EXTRA_GUI_OPTIONS_TERMINATOR
};

class CGE2MetaEngine : public AdvancedMetaEngine {
public:
	CGE2MetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), CGE2Games, optionsList) {
		_singleId = "sfinx";
	}

	virtual const char *getName() const {
		return "CGE2";
	}

	virtual const char *getOriginalCopyright() const {
		return "Sfinx (C) 1994-1997 Janus B. Wisniewski and L.K. Avalon";
	}

	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
	virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
	virtual bool hasFeature(MetaEngineFeature f) const;
	virtual int getMaximumSaveSlot() const;
	virtual SaveStateList listSaves(const char *target) const;
	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
	virtual void removeSaveState(const char *target, int slot) const;
};

static ADGameDescription s_fallbackDesc = {
	"sfinx",
	"Unknown version",
	AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
	Common::UNK_LANG,
	Common::kPlatformDOS,
	ADGF_NO_FLAGS,
	GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
};

static const ADFileBasedFallback fileBasedFallback[] = {
	{ &s_fallbackDesc, { "vol.cat", "vol.dat", 0 } },
	{ 0, { 0 } }
};

// This fallback detection looks identical to the one used for CGE. In fact, the difference resides
// in the ResourceManager which handles a different archive format. The rest of the detection is identical.
ADDetectedGame CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
	ADDetectedGame game = detectGameFilebased(allFiles, fslist, CGE2::fileBasedFallback);

	if (!game.desc)
		return ADDetectedGame();

	SearchMan.addDirectory("CGE2MetaEngine::fallbackDetect", fslist.begin()->getParent());
	ResourceManager *resman;
	resman = new ResourceManager();
	bool sayFileFound = resman->exist("CGE.SAY");
	delete resman;

	SearchMan.remove("CGE2MetaEngine::fallbackDetect");

	if (!sayFileFound)
		return ADDetectedGame();

	return game;
}

bool CGE2MetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
	if (desc)
		*engine = new CGE2::CGE2Engine(syst, desc);

	return desc != 0;
}

bool CGE2MetaEngine::hasFeature(MetaEngineFeature f) const {
	return
		(f == kSupportsDeleteSave) ||
		(f == kSavesSupportMetaInfo) ||
		(f == kSavesSupportThumbnail) ||
		(f == kSavesSupportCreationDate) ||
		(f == kSavesSupportPlayTime) ||
		(f == kSupportsListSaves) ||
		(f == kSupportsLoadingDuringStartup) ||
		(f == kSimpleSavesNames);
}

int CGE2MetaEngine::getMaximumSaveSlot() const {
	return 99;
}

SaveStateList CGE2MetaEngine::listSaves(const char *target) const {
	Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
	Common::StringArray filenames;
	Common::String pattern = target;
	pattern += ".###";

	filenames = saveFileMan->listSavefiles(pattern);

	SaveStateList saveList;
	for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
		// Obtain the last 3 digits of the filename, since they correspond to the save slot
		int slotNum = atoi(filename->c_str() + filename->size() - 3);

		if (slotNum >= 0 && slotNum <= 99) {

			Common::InSaveFile *file = saveFileMan->openForLoading(*filename);
			if (file) {
				CGE2::SavegameHeader header;

				// Check to see if it's a ScummVM savegame or not
				char buffer[kSavegameStrSize + 1];
				file->read(buffer, kSavegameStrSize + 1);

				if (!strncmp(buffer, kSavegameStr, kSavegameStrSize + 1)) {
					// Valid savegame
					if (CGE2::CGE2Engine::readSavegameHeader(file, header)) {
						saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
					}
				} else {
					// Must be an original format savegame
					saveList.push_back(SaveStateDescriptor(slotNum, "Unknown"));
				}

				delete file;
			}
		}
	}

	// Sort saves based on slot number.
	Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
	return saveList;
}

SaveStateDescriptor CGE2MetaEngine::querySaveMetaInfos(const char *target, int slot) const {
	Common::String fileName = Common::String::format("%s.%03d", target, slot);
	Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);

	if (f) {
		CGE2::SavegameHeader header;

		// Check to see if it's a ScummVM savegame or not
		char buffer[kSavegameStrSize + 1];
		f->read(buffer, kSavegameStrSize + 1);

		bool hasHeader = !strncmp(buffer, kSavegameStr, kSavegameStrSize + 1) &&
			CGE2::CGE2Engine::readSavegameHeader(f, header, false);
		delete f;

		if (!hasHeader) {
			// Original savegame perhaps?
			SaveStateDescriptor desc(slot, "Unknown");
			return desc;
		} else {
			// Create the return descriptor
			SaveStateDescriptor desc(slot, header.saveName);
			desc.setThumbnail(header.thumbnail);
			desc.setSaveDate(header.saveYear, header.saveMonth, header.saveDay);
			desc.setSaveTime(header.saveHour, header.saveMinutes);

			if (header.playTime) {
				desc.setPlayTime(header.playTime * 1000);
			}

			// Slot 0 is used for the 'automatic save on exit' save in Soltys, thus
			// we prevent it from being deleted or overwritten by accident.
			desc.setDeletableFlag(slot != 0);
			desc.setWriteProtectedFlag(slot == 0);

			return desc;
		}
	}

	return SaveStateDescriptor();
}

void CGE2MetaEngine::removeSaveState(const char *target, int slot) const {
	Common::String fileName = Common::String::format("%s.%03d", target, slot);
	g_system->getSavefileManager()->removeSavefile(fileName);
}

} // End of namespace CGE2
Exemplo n.º 11
0
#include "common/system.h"

#include "base/plugins.h"

#include "testbed/testbed.h"

static const PlainGameDescriptor testbed_setting[] = {
	{ "testbed", "Testbed: The Backend Testing Framework" },
	{ 0, 0 }
};

static const ADGameDescription testbedDescriptions[] = {
	{
		"testbed",
		"",
		AD_ENTRY1("TESTBED", 0),	// Game-data file for detection
		Common::EN_ANY,
		Common::kPlatformPC,
		ADGF_NO_FLAGS,
		GUIO1(GUIO_NONE)
	},
	AD_TABLE_END_MARKER
};

class TestbedMetaEngine : public AdvancedMetaEngine {
public:
	TestbedMetaEngine() : AdvancedMetaEngine(testbedDescriptions, sizeof(ADGameDescription), testbed_setting) {
		_md5Bytes = 512;
		_singleid = "testbed";
	}