From 9bc2a9ca1cda79005441c3b944d15598cba6892b Mon Sep 17 00:00:00 2001 From: rodri Date: Sat, 30 May 2020 14:17:41 +0000 Subject: added some draft for maps. --- map.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 map.c diff --git a/map.c b/map.c new file mode 100644 index 0000000..652a934 --- /dev/null +++ b/map.c @@ -0,0 +1,30 @@ +#include +#include +#include "dat.h" +#include "fns.h" + +typedef struct Entity Entity; +typedef struct Object Object; +typedef struct Room Room; + +struct Entity +{ + int id; + char *desc; +}; + +struct Object +{ + Entity; + int type; + double weight; + //Property props; +}; + +struct Room +{ + Entity; + Object *objects; + int nobject; + Room *neighbors[8]; +}; -- cgit v1.2.3