summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2020-05-30 14:17:41 +0000
committerrodri <rgl@antares-labs.eu>2020-05-30 14:17:41 +0000
commit9bc2a9ca1cda79005441c3b944d15598cba6892b (patch)
tree6a182342d2197c1d9da5755a7f0645b52796bc87
parent65436b96d21fd03a627707e7a140d56fde8bb941 (diff)
downloadst-9bc2a9ca1cda79005441c3b944d15598cba6892b.tar.gz
st-9bc2a9ca1cda79005441c3b944d15598cba6892b.tar.bz2
st-9bc2a9ca1cda79005441c3b944d15598cba6892b.zip
added some draft for maps.
-rw-r--r--map.c30
1 files changed, 30 insertions, 0 deletions
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 <u.h>
+#include <libc.h>
+#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];
+};