aboutsummaryrefslogtreecommitdiff
path: root/src/world.c
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-05-19 16:47:06 -0400
committerFranklin Wei <git@fwei.tk>2016-05-19 16:47:06 -0400
commitcb8af6e7bf5f6e70fc9722d36448213c719e83c8 (patch)
treeec9f93d6e1256d62a49fb628d8d7a3a931b58330 /src/world.c
parent7f3ba14388a586a946d721a71eb3a9862f7f6c02 (diff)
downloadnetcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.zip
netcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.tar.gz
netcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.tar.bz2
netcosm-cb8af6e7bf5f6e70fc9722d36448213c719e83c8.tar.xz
implement more of dunnet
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/world.c b/src/world.c
index d0e1711..45a1717 100644
--- a/src/world.c
+++ b/src/world.c
@@ -39,6 +39,9 @@ size_t netcosm_world_sz;
void (*netcosm_world_simulation_cb)(void) = NULL;
unsigned netcosm_world_simulation_interval = 0;
+void (*netcosm_write_userdata_cb)(int fd, void *ptr) = NULL;
+void *(*netcosm_read_userdata_cb)(int fd) = NULL;
+
const char *netcosm_world_name;
/* processed world data */
@@ -188,8 +191,6 @@ void world_free(void)
free(world);
world = NULL;
}
- if(sim_timer)
- free(sim_timer);
}
static void start_sim_callback(void)
@@ -440,6 +441,12 @@ bool world_verb_add(struct verb_t *verb)
return !hash_insert(verb_map, verb->name, verb);
}
+bool world_verb_del(struct verb_t *verb)
+{
+ init_map();
+ return hash_remove(verb_map, verb->name);
+}
+
void *world_verb_map(void)
{
init_map();