35 lines
648 B
C
35 lines
648 B
C
|
#ifndef ENTITY_REGISTRY_H
|
||
|
#define ENTITY_REGISTRY_H
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#include "../error.h"
|
||
|
|
||
|
struct entity_registrant_t {
|
||
|
const char *name;
|
||
|
char tile;
|
||
|
};
|
||
|
|
||
|
enum error_t entity_registrant_init(
|
||
|
struct entity_registrant_t *,
|
||
|
const char *, char
|
||
|
);
|
||
|
|
||
|
void entity_registrant_free(struct entity_registrant_t *);
|
||
|
|
||
|
|
||
|
struct entity_registry_t {
|
||
|
struct entity_registrant_t *entities;
|
||
|
size_t size;
|
||
|
};
|
||
|
|
||
|
enum error_t entity_registry_init(struct entity_registry_t *);
|
||
|
void entity_registry_free(struct entity_registry_t *);
|
||
|
|
||
|
enum error_t entity_registry_append(
|
||
|
struct entity_registry_t *,
|
||
|
struct entity_registrant_t *
|
||
|
);
|
||
|
|
||
|
#endif
|