#undef main_loop
#endif
-/** subsystem initializer
- Calling main_init() boots the system, and may be called multiple
- times to cause a system-wide reboot.
+/*@
+ subsystem initializer
+ Calling main_init() boots the system, and may be called multiple times to
+ cause a system-wide reboot.
@return 0 if successful, -1 SDL, -2 IMG, -3 TTF, -4 STATE.
SDL and logging is available after this is called
- ******************************************************************************/
+*/
#define INIT(_cond,_errorstring,_quit) \
do { \
if (_cond) \
INIT(IMG_Init(IMG_INIT_PNG) != IMG_INIT_PNG, IMG_GetError, IMG_Quit);
INIT(TTF_Init() == -1, TTF_GetError, TTF_Quit);
INIT(state_init(), state_get_error, state_quit);
-
-/*TODO:
- INIT(io_init(), io_get_error, io_quit);
- INIT(render_init(), io_get_error, io_quit);
-*/
+ INIT(fs_init(), fs_get_error, fs_quit);
SDL_Log("Initialization Complete.");
return 0;
}
-/** main loop.
- *******************************************************************************/
+/*@
+ The main loop may be compiled in blocking or non-blocking mode, and
+ synchronizes time in ticks (milliseconds) as established by SDL anchored
+ on the state_tick() event.
+*/
void
main_loop()
{ static uint32_t state_last_ticks = 0;