grammar proto1
[henge/webcc.git] / src / core / main.c
index 5e18ac5..a14ce6a 100644 (file)
@@ -90,12 +90,13 @@ main (int argc, char** argv)
 #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)                                                   \
@@ -120,18 +121,17 @@ main_init()
   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;