MAIN macro

The __MAIN__ macro is defined in the main  file being compiled. In all other files included by this file, __MAIN__ is not defined.

The purpose of this is for library writers to package a small demo of their library directly in the library source code. When users compile the library directly, the library's own  is the main file and can include extra files that are not normally part of the library.

Example

 * 1) ifdef __MAIN__
 * 2) include "demo.dm"
 * 3) include "demo.dmm"
 * 4) endif

If the demo requires a lot of extra resources, it is probably better to package the demo as a separate project. Small demos, however, are nice and convenient using this "auto-demo" technique--especially since Dream Seeker automatically launches Dream Maker after installing a library containing a file.