Platforms/

From ENIGMA
Revision as of 08:44, 30 May 2011 by Polygone (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This directory contains additionally directories implementing several functions, including the all-important main().

As in other modular SHELL/ directories, this directory contains a _mandatory header. Its specification follows.


Role

Systems under this directory are required to implement the game's main() function. It should call enigma::initialize_everything() once, then set up its displays and input methods before entering its main loop, in which it should invoke enigma::ENIGMA_events(). At the end of the main loop, before disposing everything and before program close, it should make one final call to enigma::game_ending().


Mandatory

void windowsystem_write_exename(char* exenamehere);
  • This method should write the name of the running module to exenamehere.


void sleep_for_framerate(int framerate);
  • This method should take an integer framerate and perform the necessary operations to limit fps to that rate.


void input_initialize();
  • This method is called at load time. It allows for initializing arrays for input.


These next functions are standard GML that are an integral part of the system. Each instance must implement these, even if they are unable to do anything on the target platform.


void show_error(string, const bool);
  • This obviously displays an error message.
  • It should offer a button to end the game.


void window_set_caption(string caption);
  • This function sets the game window caption, if there is a place reserved for such.


void window_set_size(unsigned int width, unsigned int height);</code>
  • This function should resize the window, meaning a lowered resolution if the device displays all windows full screen.