#ifndef __object_h__ #define __object_h__ #include #include "world.h" typedef struct Object { World* world; void* data; int x, y; void (*logic)(struct Object* obj); void (*render)(struct Object* obj); void (*free)(struct Object* obj); struct Object* next; } Object; extern void logic(Object*); extern void render(Object*); extern Object* make_object_list(void); extern void dealloc_object_list(Object*); extern void append_obj(Object* pos, Object* obj); extern void remove_obj(Object* list, Object* obj); #endif