project_files/frontlib/frontlib.h
changeset 7320 e704706008d4
parent 7316 f7b49b2c5d84
child 7482 d70a5b0d1190
equal deleted inserted replaced
7318:a446eafcddeb 7320:e704706008d4
    27 #define FRONTLIB_H_
    27 #define FRONTLIB_H_
    28 
    28 
    29 #include "ipc/gameconn.h"
    29 #include "ipc/gameconn.h"
    30 #include "ipc/mapconn.h"
    30 #include "ipc/mapconn.h"
    31 #include "net/netconn.h"
    31 #include "net/netconn.h"
    32 
    32 #include "util/logging.h"
    33 #define FRONTLIB_SDL_ALREADY_INITIALIZED 1
       
    34 
    33 
    35 /**
    34 /**
    36  * Call this function before anything else in this library.
    35  * Call this function before anything else in this library.
    37  *
       
    38  * If the calling program uses SDL, it needs to call SDL_Init before initializing
       
    39  * this library and then pass FRONTLIB_SDL_ALREADY_INITIALIZED as flag to this function.
       
    40  *
       
    41  * Otherwise, pass 0 to let this library handle SDL_Init an SDL_Quit itself.
       
    42  *
       
    43  * Returns 0 on success, -1 on error.
    36  * Returns 0 on success, -1 on error.
    44  */
    37  */
    45 int flib_init(int flags);
    38 int flib_init();
    46 
    39 
    47 /**
    40 /**
    48  * Free resources associated with the library. Call this function once
    41  * Free resources associated with the library. Call this function once
    49  * the library is no longer needed. You can re-initialize the library by calling
    42  * the library is no longer needed. You can re-initialize the library by calling
    50  * flib_init again.
    43  * flib_init again.