X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fserver%2Fcleanup.c;h=2e7ab83ab534840f6f979eecdd78fb43e14e7028;hb=e4ae4fc25ee35e0dcbba7331e7a4fe1eb4818422;hp=08e3bb6057027637850b348380f2ad21fa99091b;hpb=d12efb0addf420adc045cfb96647dff6241310ee;p=plomrogue diff --git a/src/server/cleanup.c b/src/server/cleanup.c index 08e3bb6..2e7ab83 100644 --- a/src/server/cleanup.c +++ b/src/server/cleanup.c @@ -5,8 +5,9 @@ #include /* free() */ #include /* unlink() */ #include "../common/readwrite.h" /* try_fclose() */ -#include "map_object_actions.h" /* free_map_object_actions() */ -#include "map_objects.h" /* free_map_objects(), free_map_object_defs() */ +#include "hardcoded_strings.h" /* s */ +#include "thing_actions.h" /* free_thing_actions() */ +#include "things.h" /* free_things(), free_thing_types() */ #include "world.h" /* global world */ @@ -25,30 +26,30 @@ extern void cleanup() free(world.map.cells); if (cleanup_flags & CLEANUP_WORLDSTATE) { - unlink(world.path_worldstate); + unlink(s[S_PATH_WORLDSTATE]); } - if (cleanup_flags & CLEANUP_MAP_OBJECTS) + if (cleanup_flags & CLEANUP_THINGS) { - free_map_objects(world.map_objs); + free_things(world.things); } - if (cleanup_flags & CLEANUP_MAP_OBJECT_DEFS) + if (cleanup_flags & CLEANUP_THING_TYPES) { - free_map_object_defs(world.map_obj_defs); + free_thing_types(world.thing_types); } - if (cleanup_flags & CLEANUP_MAP_OBJECT_ACTS) + if (cleanup_flags & CLEANUP_THING_ACTIONS) { - free_map_object_actions(world.map_obj_acts); + free_thing_actions(world.thing_actions); } if (cleanup_flags & CLEANUP_IN) { try_fclose(world.file_in, f_name); - unlink(world.path_in); + unlink(s[S_PATH_IN]); } if (cleanup_flags & CLEANUP_OUT) { try_fclose(world.file_out, f_name); free(world.server_test); - unlink(world.path_out); + unlink(s[S_PATH_OUT]); } }