Download Tutorial C Files H Files

dg_scene_create

This function is used to create a scene.

Usage

dg_scene_t *dg_scene_create(void);

Example

dg_scene_t *scene = dg_scene_create();

Source code

dg_scene_t *dg_scene_create(void)
{
    dg_scene_t *scene = malloc(sizeof(dg_scene_t));

    if (!scene)
        return 0;
    scene->camera.x = 0;
    scene->camera.y = 0;
    scene->entities = 0;
    scene->systems = 0;
    return scene;
}