#pragma once #include #include "entity.h" typedef char * name_T; struct blob { void *data; size_t size; }; void res_init(void); void res_init_texture(void); void res_free_texture(void); struct blob res_get_texture(name_T const name); void res_init_map(void); void res_free_map(void); struct blob res_get_map(name_T const name); void res_init_collision(void); void res_free_collision(void); struct blob res_get_collision(name_T const name); void res_free_newfun(void); void res_push_newfun(struct entity *(*newfun)(void), name_T name); struct entity *(*res_get_newfun(name_T const name))(void); void res_free_setfun(void); void res_push_setfun(int (*setfun)(struct entity *const restrict self, char const *const restrict key, char const *const restrict value), name_T name); int (*res_get_setfun(name_T const name))(struct entity *const restrict self, char const *const restrict key, char const *const restrict value); int loadResources(char *filename);