Difference between revisions of "HOWTO-Engines"

Jump to navigation Jump to search
68 bytes added ,  12:42, 27 August 2008
Use GeSHi syntax coloring extension
(Updated the included common rules as suggested by mattn2|home on #scummvm)
(Use GeSHi syntax coloring extension)
Line 100: Line 100:


=== Example: engines/quux/quux.h ===
=== Example: engines/quux/quux.h ===
<pre>
<syntax type="C++">
#ifndef QUUX_H
#ifndef QUUX_H
#define QUUX_H
#define QUUX_H
Line 144: Line 144:


#endif
#endif
</pre>
</syntax>


=== Example: engines/quux/quux.cpp ===
=== Example: engines/quux/quux.cpp ===
<pre>
<syntax type="C++">
#include "common/scummsys.h"
#include "common/scummsys.h"


Line 223: Line 223:


} // End of namespace Quux
} // End of namespace Quux
</pre>
</syntax>


=== 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.
<pre>
<syntax type="C++">
#include "quux/quux.h"
#include "quux/quux.h"


Line 322: Line 322:
REGISTER_PLUGIN_STATIC(QUUX, PLUGIN_TYPE_ENGINE, QuuxMetaEngine);
REGISTER_PLUGIN_STATIC(QUUX, PLUGIN_TYPE_ENGINE, QuuxMetaEngine);
#endif
#endif
</pre>
</syntax>


=== Example: engines/quux/module.mk ===
=== Example: engines/quux/module.mk ===
<pre>
<syntax type="C++">
MODULE := engines/quux
MODULE := engines/quux


Line 341: Line 341:
# Include common rules  
# Include common rules  
include $(srcdir)/rules.mk
include $(srcdir)/rules.mk
</pre>
</syntax>
1,079

edits

Navigation menu