35 lines
651 B
C
35 lines
651 B
C
#ifndef ENTITY_REGISTRY_H
|
|
#define ENTITY_REGISTRY_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "error.h"
|
|
|
|
struct entity_registrant_t {
|
|
char const *name;
|
|
char tile;
|
|
};
|
|
|
|
enum error_t entity_registrant_init(
|
|
struct entity_registrant_t *,
|
|
char const *, 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 const *
|
|
);
|
|
|
|
#endif
|