Difference between revisions of "HOWTO-Engines"

Jump to navigation Jump to search
264 bytes added ,  13:15, 12 February 2006
Added example module.mk
m
(Added example module.mk)
Line 1: Line 1:
=== Introduction ===
== Introduction ==
This page is meant as a mini-HOWTO which roughly outlines the steps needed to add a new engine to ScummVM. It does '''not''' tell you how to create an engine for a given game; rather it is meant to tell a developer how to properly "hook" into ScummVM.  
This page is meant as a mini-HOWTO which roughly outlines the steps needed to add a new engine to ScummVM. It does '''not''' tell you how to create an engine for a given game; rather it is meant to tell a developer how to properly "hook" into ScummVM.  


Line 5: Line 5:




=== Overview ===
== Overview ==
Essentially, you will have to implement a subclass of the Engine class. Our Doxygen documentation is your friend and should hopefully explain enough about this, see here: http://scummvm.org/docs/doxygen/html/class Engine.php.  
Essentially, you will have to implement a subclass of the Engine class. Our Doxygen documentation is your friend and should hopefully explain enough about this, see here: http://scummvm.org/docs/doxygen/html/class Engine.php.  


Line 13: Line 13:




=== Steps ===
== Steps ==
In the following I assume your engine is called "quux".
In the following I assume your engine is called "quux".


Line 26: Line 26:


Important note: Use a C++ namespace for all your work, e.g. "namespace Quux" in this case.
Important note: Use a C++ namespace for all your work, e.g. "namespace Quux" in this case.
=== Example: engines/quux/module.mk ===
<pre>
MODULE := engines/quux
MODULE_OBJS := \
quux.o
MODULE_DIRS += \
engines/quux
# This module can be built as a plugin
ifdef BUILD_PLUGINS
PLUGIN := 1
endif
# Include common rules
include $(srcdir)/common.rules
</pre>




1,079

edits

Navigation menu