Open main menu

Difference between revisions of "HOWTO-Engines"

45 bytes added ,  15:08, 25 October 2018
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
m (Text replacement - "</source>" to "</syntaxhighlight>")
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Line 115: Line 115:


=== Example: engines/quux/quux.h ===
=== Example: engines/quux/quux.h ===
<source lang="cpp">
<syntaxhighlight lang="cpp">
#ifndef QUUX_H
#ifndef QUUX_H
#define QUUX_H
#define QUUX_H
Line 162: Line 162:


=== Example: engines/quux/quux.cpp ===
=== Example: engines/quux/quux.cpp ===
<source lang="cpp">
<syntaxhighlight lang="cpp">
#include "common/scummsys.h"
#include "common/scummsys.h"
   
   
Line 254: Line 254:
=== Example: engines/quux/detection.cpp ===
=== Example: engines/quux/detection.cpp ===
The following example implements a custom MetaEngine instead of using the AdvancedMetaEngine.
The following example implements a custom MetaEngine instead of using the AdvancedMetaEngine.
<source lang="cpp">
<syntaxhighlight lang="cpp">
#include "quux/quux.h"
#include "quux/quux.h"
   
   
Line 354: Line 354:


=== Example: engines/quux/module.mk ===
=== Example: engines/quux/module.mk ===
<source lang="make">
<syntaxhighlight lang="make">
MODULE := engines/quux
MODULE := engines/quux
   
   
Line 374: Line 374:


=== Example: engines/quux/configure.engine ===
=== Example: engines/quux/configure.engine ===
<source lang="bash">
<syntaxhighlight lang="bash">
# This file is included from the main "configure" script
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
add_engine quux "Quux" no
add_engine quux "Quux" no
</syntaxhighlight>
</syntaxhighlight>
TrustedUser
2,147

edits