62
edits
m (OneEightHundred moved page MTropolis/Detection Guidelines to MTropolis/Adding Games: File manifests are handled differently now) |
|||
Line 1: | Line 1: | ||
This page describes | This page describes the process for adding support for new mTropolis titles. | ||
Reading [[MTropolis/Common_Files_in_mTropolis_Software]] is recommended. | Reading [[MTropolis/Common_Files_in_mTropolis_Software]] is recommended. Unfortunately, while the file organization of mTropolis is fairly well-understood, there is significant variation in how those files are organized on CD-ROMs. Most mTropolis games are designed to have an installed part and an on-disc part instead of launching the game executable from the CD-ROM, and the installed part can have renamed extensions (such as replacing the last character with an underscore) or be inside of archives. | ||
Additionally, it appears that mFactory may have been more hands-on with customers than, say, Director, and provided pre-release versions and plug-ins, so there are significant variations in plug-in usage. | |||
To handle this, all mTropolis games added to detection must have a "boot ID" that points to a boot table entry that determines how to boot the game. There is not currently a "generic" boot process for unsupported games because every game identified so far has required custom handling. All boot handling is done in engines/mtropolis/boot.cpp. | |||
==Types of files== | ==Types of files== | ||
mTropolis games are loaded using a mTropolis Player executable combined with a "resource" folder containing plug-ins and the title data segments. | mTropolis games are loaded using a mTropolis Player executable combined with a "resource" folder containing plug-ins and the title data segments. | ||
Line 41: | Line 44: | ||
If an extension does not have standard resources, but has some other use, then you should include the extension, but you should set the file type to MTFT_SPECIAL. | If an extension does not have standard resources, but has some other use, then you should include the extension, but you should set the file type to MTFT_SPECIAL. | ||
If an extension is only used for code, then it should not be included in | If an extension is only used for code, then it should not be included in the boot table. | ||
If a file is | If a file is required for some reason other than mentioned above (including things like installer archives), then you should specify its type as MTFT_SPECIAL. | ||
==Data handlers== | |||
Data handlers can be used to unpack files and add plug-ins required to start the game. The most important things are the overrides for "unpackAdditionalFiles" and "addPlugIns" | |||
To unpack files from an installer, you should unpack the files and add FileIdentifications, which can contain MacResManagers and/or SeekableReadStreams for the file contents. | |||
If an | You can also add persistent resources to the persistent resources list, which are arbitrary things that persist until the game is completely unloaded. If, for example, the SeekableReadStream for a file requires that an installer archive object stays alive, you can use a persistent resource wrapper to keep it alive. | ||
==Adding a boot table entry== | |||
The boot table is MTropolis::Boot::games in boot.cpp. Table entries consist of 5 fields: | |||
===The boot ID=== | |||
The boot ID is a unique identifier that corresponds to an entry in MTropolisGameBootID in detection.h. There should only be one boot table entry per boot ID. All detected games must specify a boot ID, but if multiple games have identical boot handling, they can share a boot ID. | |||
===The file manifest=== | |||
This points to a list of ManifestFiles naming each file to load. The list should end with {nullptr,MTFT_AUTO} | |||
===The directories list=== | |||
This points to a list of subdirectories to search for files in. It should end with nullptr. | |||
===The subtitles definition=== | |||
This points to a subtitle definition. Subtitles are not a standard mTropolis feature, so there will only be subtitles if someone adds them. If there is no subtitles definition, this should be nullptr. | |||
If | ===The data handler factory=== | ||
If the game has special data handling or plug-ins, then this should be filled in with the "create" method of a specialization of GameDataHandlerFactory that creates a data handler for the game. |
edits