Difference between revisions of "HOWTO-Engines"

Jump to navigation Jump to search
537 bytes added ,  09:59, 19 September 2007
Added a brief section about infrastructure and scummsys.h, update source code.
(Mention music.cpp in file name conventions)
(Added a brief section about infrastructure and scummsys.h, update source code.)
Line 55: Line 55:


Important: If you're using the ScummVM GUI (g_gui and stuff) you have always to call g_gui.handleScreenChanged() if you recived 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 recived a OSystem::EVENT_SCREEN_CHANGED event, else it could be that your gui looks strange or even crashes ScummVM.
=== Infrastructure services ===
Header file common/scummsys.h provides services needed by virtually any source file:
* defines platform endianness
* defines portable types
* defines common constants and macros
Moreover, it deals with providing suitable building environment for different platforms:
* provides common names for non-standard library functions
* disables bogus and/or annoying warnings
* provides a lean environment to build win32 executables/libraries
TODO: give descriptions for other commonly used header files.


=== Example: engines/quux/quux.h ===
=== Example: engines/quux/quux.h ===
Line 100: Line 115:
=== Example: engines/quux/quux.cpp ===
=== Example: engines/quux/quux.cpp ===
<pre>
<pre>
#include "common/stdafx.h"
#include "common/scummsys.h"


#include "backends/fs/fs.h"
#include "backends/fs/fs.h"
56

edits

Navigation menu