simworld/common/src/entity/registry.h

35 lines
654 B
C
Raw Normal View History

#ifndef ENTITY_REGISTRY_H
#define ENTITY_REGISTRY_H
#include <stdlib.h>
#include "../error.h"
struct entity_registrant_t {
2024-09-29 07:33:16 +00:00
char const *name;
char tile;
};
enum error_t entity_registrant_init(
struct entity_registrant_t *,
2024-09-29 07:33:16 +00:00
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 *,
2024-09-29 07:33:16 +00:00
struct entity_registrant_t const *
);
#endif