From cb8af6e7bf5f6e70fc9722d36448213c719e83c8 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 19 May 2016 16:47:06 -0400 Subject: implement more of dunnet --- src/world.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/world.c') 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(); -- cgit v1.1