Open main menu

Difference between revisions of "HOWTO-Engines"

263 bytes added ,  20:22, 18 May 2022
→‎Automated Method: added description for *nixes
m (Minor semantic fixes in automated method section)
(→‎Automated Method: added description for *nixes)
Line 12: Line 12:


== Automated Method ==
== Automated Method ==
If you're using Visual Studio in Windows, there is a tool that automates creating new skeleton engines. If you go to the devtools/create_engine/ folder, you'll see a create_engine.sln solution which you should open and compile. This will create a create_engine.exe executable in the same folder. From the command line prompt, you should then run create_engine with the desired engine name provided as a single parameter. This will create a folder for your new engine as well as set up a batch file in the dists/msvc/ folder with the engine name that you can use as a shortcut to create a ScummVM solution with only that engine enabled.
There is a tool that automates creating new skeleton engines which works both with make-based systems like *nix/Mac and with Microsoft Visual Studio.
 
=== Make-based Systems ===
Run `make devtools/create_engine`, then run the `devtools/create_engine <engine name>`, where `engine name` is the desired engine name.
 
=== Visual Studio ===
 
If you go to the devtools/create_engine/ folder, you'll see a create_engine.sln solution which you should open and compile. This will create a create_engine.exe executable in the same folder. From the command line prompt, you should then run create_engine with the desired engine name provided as a single parameter. This will create a folder for your new engine as well as set up a batch file in the dists/msvc/ folder with the engine name that you can use as a shortcut to create a ScummVM solution with only that engine enabled.
 
=== Common Instructions ===


Once you've got the skeleton engine compiling, your next step should be to update the placeholder detection entry in detection_tables.h. The easiest way is to choose a file in your game's folder that you think is unique, and change the filename in the detection entry to it. If you then run ScummVM and try to add the game, it should prompt you that an unrecognised md5 for the game has been found, and give you the option to copy it to clipboard. You can do so, and then paste it to extract the md5 and filesize for the file, which can be used to update the detection entry. With this done you should be able to add your game, and run the skeleton engine.
Once you've got the skeleton engine compiling, your next step should be to update the placeholder detection entry in detection_tables.h. The easiest way is to choose a file in your game's folder that you think is unique, and change the filename in the detection entry to it. If you then run ScummVM and try to add the game, it should prompt you that an unrecognised md5 for the game has been found, and give you the option to copy it to clipboard. You can do so, and then paste it to extract the md5 and filesize for the file, which can be used to update the detection entry. With this done you should be able to add your game, and run the skeleton engine.