123456789101112131415161718192021222324252627282930313233 |
- #ifndef OBJECT_H_
- #define OBJECT_H_
- #include <graphx.h>
- #include "sprite.h"
- typedef struct Scale {
- int x;
- int y;
- } Scale;
- typedef void (*Object_func)(struct Object*);
- typedef int (*Object_func_int)(struct Object*);
- typedef struct Object {
- int id;
- int x;
- int y;
- Scale scale;
- Sprite* sprite;
- struct Scene* scene;
- Object_func_int height;
- Object_func_int width;
- Object_func draw;
- Object_func update;
- Object_func load;
- Object_func free;
- } Object;
- void Object_draw(Object* self);
- void free_Object(Object* self);
- Object* new_Object(int x, int y);
- #endif
|