Subsystems
Overview
To access any of the subsystem singletons, inherit from EM_SHARED_SUBSYSTEMS. Since EM_APPLICATION inherits from EM_SHARED_SUBSYSTEMS, the root class normally has access to all subsystems.
Audio Subsystem
If you want to use audio in your application - sound effects or music - call audio_subsystem.enable.
CD-Rom Subsystem
If you want to use audio CDs in your application call cdrom_subsystem.enable.
Joystick Subsystem
If you want to use a joystick in your application call joystick_subsystem.enable.
Network Subsystem
If you want to use network support in your application call network_subsystem.enable.
Video Subsystem
Before enabling the video subsystem - which is needed for all graphics output - you will have to set the options for the video surface. A complete list of settings can be seen in class description of EM_VIDEO_SUBSYSTEM. The most important are:
- Screen width - video_subsystem.set_video_surface_width
- Screen height - video_subsystem.set_video_surface_height
-
Fullscreen yes/no - video_subsystem.set_fullscreen
There is a toggle_fullscreen command, but it doesn't work reliably yet. The best is to set it at the beginning and not change it afterwards. -
OpenGL yes/no - video_subsystem.set_opengl
If you want to use OpenGL in the application, set this option to true.
When you have set the options call video_subsystem.enable.