TrustedUser
2,147
edits
(language changes) |
(Fix syntax highlighting) |
||
Line 29: | Line 29: | ||
When you look into your .scummvmrc or scummvm.ini (depending on the platform), you will find that generally it has following structure | When you look into your .scummvmrc or scummvm.ini (depending on the platform), you will find that generally it has following structure | ||
< | <source lang="INI"> | ||
[scummvm] | [scummvm] | ||
globalkey1=foo | globalkey1=foo | ||
Line 41: | Line 41: | ||
language=en | language=en | ||
platform=pc | platform=pc | ||
</ | </source> | ||
What you see here is several sections designated by identifiers in square brackets and set of key/value pairs belonging to each such section. | What you see here is several sections designated by identifiers in square brackets and set of key/value pairs belonging to each such section. | ||
Line 81: | Line 81: | ||
== PlainGameDescriptor table == | == PlainGameDescriptor table == | ||
< | <source lang="cpp"> | ||
struct PlainGameDescriptor { | struct PlainGameDescriptor { | ||
const char *gameid; | const char *gameid; | ||
const char *description; | const char *description; | ||
}; | }; | ||
</ | </source> | ||
This table contains all gameids which are known by the engine. Also each gameid contains a full human-readable description, which is used to provide the '''description''' field in the ScummVM configuration file. | This table contains all gameids which are known by the engine. Also each gameid contains a full human-readable description, which is used to provide the '''description''' field in the ScummVM configuration file. | ||
Line 94: | Line 94: | ||
Typical PlainGameDescriptor table: | Typical PlainGameDescriptor table: | ||
< | <source lang="cpp"> | ||
static const PlainGameDescriptor cineGames[] = { | static const PlainGameDescriptor cineGames[] = { | ||
{"cine", "Cinematique evo.1 engine game"}, | {"cine", "Cinematique evo.1 engine game"}, | ||
Line 101: | Line 101: | ||
{0, 0} | {0, 0} | ||
}; | }; | ||
</ | </source> | ||
Please note that it is NULL-terminated, and also contains the generic gameid ''cine'' which is used by fallback detection. | Please note that it is NULL-terminated, and also contains the generic gameid ''cine'' which is used by fallback detection. | ||
Line 109: | Line 109: | ||
ADGameDescription table has the following structure: | ADGameDescription table has the following structure: | ||
< | <source lang="cpp"> | ||
struct ADGameDescription { | struct ADGameDescription { | ||
const char *gameid; | const char *gameid; | ||
Line 119: | Line 119: | ||
const char *guioptions; | const char *guioptions; | ||
}; | }; | ||
</ | </source> | ||
'''gameid''' -- This is the gameid. Mainly it is used for taking the game description from the ''PlainGameDescriptor'' table. | '''gameid''' -- This is the gameid. Mainly it is used for taking the game description from the ''PlainGameDescriptor'' table. | ||
Line 138: | Line 138: | ||
Typical ADGameDescription table will look as follows: | Typical ADGameDescription table will look as follows: | ||
< | <source lang="cpp"> | ||
static const ADGameDescription gameDescriptions[] = { | static const ADGameDescription gameDescriptions[] = { | ||
{ | { | ||
Line 151: | Line 151: | ||
{ AD_TABLE_END_MARKER, 0, 0 } | { AD_TABLE_END_MARKER, 0, 0 } | ||
}; | }; | ||
</ | </source> | ||
== ADGameFileDescription structure == | == ADGameFileDescription structure == | ||
< | <source lang="cpp"> | ||
struct ADGameFileDescription { | struct ADGameFileDescription { | ||
const char *fileName; ///< Name of described file. | const char *fileName; ///< Name of described file. | ||
Line 162: | Line 162: | ||
int32 fileSize; ///< Size of the described file. Set to -1 to ignore. | int32 fileSize; ///< Size of the described file. Set to -1 to ignore. | ||
}; | }; | ||
</ | </source> | ||
'''fileName''' -- name of the file. It is case insensitive, but historically we use lowercase names. | '''fileName''' -- name of the file. It is case insensitive, but historically we use lowercase names. | ||
Line 204: | Line 204: | ||
== Upgrading obsolete gameids == | == Upgrading obsolete gameids == | ||
< | <source lang="cpp"> | ||
static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = { | static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = { | ||
{"simon1acorn", "simon1", Common::kPlatformAcorn}, | {"simon1acorn", "simon1", Common::kPlatformAcorn}, | ||
Line 213: | Line 213: | ||
{0, 0, Common::kPlatformUnknown} | {0, 0, Common::kPlatformUnknown} | ||
}; | }; | ||
</ | </source> | ||
= AdvancedMetaEngine = | = AdvancedMetaEngine = | ||
Line 221: | Line 221: | ||
== Engine constructor == | == Engine constructor == | ||
< | <source lang="cpp"> | ||
AdvancedMetaEngine(const void *descs, uint descItemSize, const PlainGameDescriptor *gameids); | AdvancedMetaEngine(const void *descs, uint descItemSize, const PlainGameDescriptor *gameids); | ||
</ | </source> | ||
'''descs''' must point to a list of ''ADGameDescription'' structures, or their supersets. | '''descs''' must point to a list of ''ADGameDescription'' structures, or their supersets. |