X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fwebcc.git;a=blobdiff_plain;f=src%2Fcore%2Fmain.c;h=a14ce6a72fd2ed1ab728eace70f342de76ea1543;hp=5e18ac5b49804f247ea114aaf0dada6be8970f2e;hb=cc8aed5b4a92dcd55e376e263090e0640b049351;hpb=b363cb566b9d21b6c607d18579232f9c79b15f4b diff --git a/src/core/main.c b/src/core/main.c index 5e18ac5..a14ce6a 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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;