Difference between revisions of "HOWTO-Engines"

Jump to navigation Jump to search
89 bytes added ,  19:22, 13 October 2008
add link to HOWTO-Open Pages, fix some typos
(Use GeSHi syntax coloring extension)
(add link to HOWTO-Open Pages, fix some typos)
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: [http://doxygen.scummvm.org/d1/db6/classEngine.html Engine class] .  
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: [http://doxygen.scummvm.org/d1/db6/classEngine.html Engine class].  


You also must hook yourself into the regular ScummVM main build system. Actually, some ports use 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 by updating a couple source files (see below).
Line 27: Line 27:


=== File name conventions ===
=== File name conventions ===
Since of the course of its existence, many people will have to deal with the source code of a given engine (be it to fix bugs in it, modify it to still compile after changes made to tbe backend code, or to simply add new functionality), it is useful to adhere to various conventions used throughout all engines. Besides source code conventions (see [[Code Formatting Conventions]]), this affects filenames. We suggest you use the following names for specific parts of your engine:
Since of the course of its existence, many people will have to deal with the source code of a given engine (be it to fix bugs in it, modify it to still compile after changes made to the backend code, or to simply add new functionality), it is useful to adhere to various conventions used throughout all engines. Besides source code conventions (see [[Code Formatting Conventions]]), this affects filenames. We suggest you use the following names for specific parts of your engine:


{| border="1" cellpadding="2" width=100%
{| border="1" cellpadding="2" width=100%
Line 59: Line 59:


Important: If you're using the ScummVM GUI (g_gui and stuff) you have always to call g_gui.handleScreenChanged() if you received a OSystem::EVENT_SCREEN_CHANGED event, else it could be that your gui looks strange or even crashes ScummVM.
Important: If you're using the ScummVM GUI (g_gui and stuff) you have always to call g_gui.handleScreenChanged() if you received a OSystem::EVENT_SCREEN_CHANGED event, else it could be that your gui looks strange or even crashes ScummVM.
For opening files in your engine, see the [[HOWTO-Open Files|how to open files]] page.


=== Infrastructure services ===
=== Infrastructure services ===
2,051

edits

Navigation menu