Download Tutorial C Files H Files

dg_system_create

This function is used to create a system.

Usage

dg_system_t *dg_system_create(dg_sysf_t action);

Example

dg_system_t *render = dg_system_create(&dg_sys_render)

Source code

dg_system_t *dg_system_create(dg_sysf_t action)
{
    dg_system_t *system = 0;

    if (!action)
        return 0;
    system = malloc(sizeof(dg_system_t));
    if (!system)
        return 0;
    system->system = action;
    return system;
}