diff options
Diffstat (limited to 'eng/inc/vtable.h')
-rw-r--r-- | eng/inc/vtable.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/eng/inc/vtable.h b/eng/inc/vtable.h new file mode 100644 index 0000000..8811bce --- /dev/null +++ b/eng/inc/vtable.h @@ -0,0 +1,20 @@ +#pragma once + +struct Entity; + +typedef struct Vtable Vtable; +struct Vtable { + const char *name; + const char *parent; + unsigned long id; + void (*init)(struct Entity *this); + void (*deinit)(struct Entity *this); + void (*update)(struct Entity *this); + void (*draw)(struct Entity *this); + Vtable *next; +}; + +extern Vtable *___vtables; +extern unsigned long ___vtable_i; + +Vtable *vtable_get(const char *name); |