Difference between revisions of "HOWTO-Engines"

Jump to navigation Jump to search
1,438 bytes added ,  04:29, 9 May 2022
Add section for the new create_engine tool
(→‎Example: engines/quux/quux.cpp: Remove obsolete code)
(Add section for the new create_engine tool)
Line 9: Line 9:
You also must hook yourself into the regular ScummVM main build system. Actually, some ports use a custom build system, but their maintainers will usually add your new engine once it has been added to ScummVM.
You also must hook yourself into the regular ScummVM main build system. Actually, some ports use a custom build system, but their maintainers will usually add your new engine once it has been added to ScummVM.


Finally, you need to make ScummVM aware of your new engine by updating a couple source files (see below).
Finally, you need to make ScummVM aware of your new engine.


== Steps ==
== Automated Method ==
In the following I assume your engine is called "quux".
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.
 
Once you've got the skeleton engine compiling, your first 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 engine, 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 filename 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.
 
== Manual Steps ==
The remainder of this page primarily focuses on if you're trying to create an engine manually from scratch, such as if you don't have access to Visual Studio. For this, we'll assume your engine is called "quux".


# Add a new directory <tt>engines/quux/</tt>
# Add a new directory <tt>engines/quux/</tt>
272

edits

Navigation menu