This function is used to initialize the spritesheet.
dg_spritesheet_t *dg_spritesheet_create(char *filepath, int x, int y);
dg_spritesheet_t *sheet = dg_spritesheet_create("res/bat.png", 32, 32);
dg_spritesheet_t *dg_spritesheet_create(char *filepath, int x, int y)
{
dg_spritesheet_t *spritesheet = malloc(sizeof(dg_spritesheet_t));
sfImage *file = sfImage_createFromFile(filepath);
sfTexture *sheet = sfTexture_createFromImage(file, 0);
if (!spritesheet)
return 0;
spritesheet->sheet = sheet;
spritesheet->x = x;
spritesheet->y = y;
return spritesheet;
}