2024-09-28 23:13:42 +00:00
|
|
|
#ifndef ENTITY_ENTITY_H
|
|
|
|
#define ENTITY_ENTITY_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2024-10-11 04:46:14 +00:00
|
|
|
#include <jansson.h>
|
|
|
|
|
|
|
|
#include "error.h"
|
|
|
|
|
2024-09-28 23:13:42 +00:00
|
|
|
struct entity_t {
|
|
|
|
size_t id;
|
|
|
|
size_t x;
|
|
|
|
size_t y;
|
|
|
|
};
|
|
|
|
|
|
|
|
void entity_init(struct entity_t *, size_t, size_t, size_t);
|
|
|
|
|
2024-10-11 04:46:14 +00:00
|
|
|
enum error_t entity_serialise(struct entity_t const *, struct json_t **);
|
|
|
|
enum error_t entity_deserialise(struct entity_t *, struct json_t *);
|
|
|
|
|
2024-09-28 23:13:42 +00:00
|
|
|
#endif
|