Adding systems


Jump to: navigation, search

So, you want to add support for a new graphics system? A new audio system? A new operating system? ENIGMA is designed to make this as painless as possible.

General System Development

Systems are organized into separate category folders under EnigmaSystem/SHELL/. These include a folder for supported platforms, graphics systems, audio systems, collision systems, etc.

Each of these category folders contains a header, *_mandatory.h, where the asterisk matches the system name. For instance, there is a platforms_mandatory.h, a graphics_mandatory.h, an audio_mandatory.h, etc. Systems under each folder MUST implement these functions, as they are used by the core system for initialization and cleanup, or by other functions in other systems.

Each category folder also contains a series of subdirectories containing each system implementation. This is where you will add your own code. In each of those directories is another subdirectory called info/, which contains an About.ey descriptor, and an information header called *_info.h, where * is the category name, such as platform_info.h, graphics_info.h, audio_info.h, etc. The purpose of that header is simply to provide constants for other systems to use to tell what system is in use.

So, essentially, to implement a new system you must do the following:

Adding an Operating System

If you are looking to add support for a new operating system, bear in mind that you may need to add support for any native graphics and audio systems to that platform as well, depending on whether or not the OS supports an already-supported library.

Compiler Descriptor

LateralGM can detect the current operating system, but the expected values are Windows, Linux, or MacOSX. These are the platforms on which LateralGM actually runs, and therefore are the platforms which receive their own folder under /Compilers/ and object file directories. When LateralGM loads, the appropriate folder under /Compilers/ is traversed for available compilers. In order to support a new operating system, you must add a compiler descriptor file for it so that appropriate binary files can be built for that system. By default, ENIGMA uses the GCC. As such, you will notice a descriptor file called gcc.ey under each system.

Adding a New Platform

The file platforms_mandatory.h describes functions which must be implemented by any API.

Personal tools