X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=src%2Fserver%2Fthing_actions.c;h=e91f576aa3ebfd5ed84fbb296c2ba100f0f4d574;hb=891ba8fbca53d920f6b3704827fa6b8aee737de4;hp=b153ff868ef749fc92497e955a75cc849c725674;hpb=997edd45d2002dc021d1d74a12473e6055a82a75;p=plomrogue diff --git a/src/server/thing_actions.c b/src/server/thing_actions.c index b153ff8..e91f576 100644 --- a/src/server/thing_actions.c +++ b/src/server/thing_actions.c @@ -5,13 +5,13 @@ #include /* uint8_t, uint16_t */ #include /* sprintf() */ #include /* free() */ -#include /* strlen(), strcmp(), memcpy(), strncmp() */ -#include "../common/rexit.h" /* exit_err(), exit_trouble() */ +#include /* strlen(), memcpy(), strncmp() */ +#include "../common/rexit.h" /* exit_trouble() */ #include "../common/try_malloc.h" /* try_malloc() */ #include "../common/yx_uint8.h" /* struct yx_uint8 */ #include "field_of_view.h" /* build_fov_map() */ #include "hardcoded_strings.h" /* s */ -#include "things.h" /* structs Thing, ThingType, get_player(), own_thing(), +#include "things.h" /* Thing, ThingType, get_player(), own_thing(), * set_thing_position(), get_thing_type() */ #include "map.h" /* is_passable() */ @@ -238,36 +238,6 @@ static void playerbonus_use(uint8_t no_thing, uint8_t wrong_thing) -extern void free_thing_actions(struct ThingAction * ta) -{ - if (NULL == ta) - { - return; - } - free(ta->name); - free_thing_actions(ta->next); - free(ta); -} - - - -extern uint8_t get_thing_action_id_by_name(char * name) -{ - struct ThingAction * ta = world.thing_actions; - while (NULL != ta) - { - if (0 == strcmp(ta->name, name)) - { - break; - } - ta = ta->next; - } - exit_err(NULL == ta, "get_thing_action_id_by_name() did not find action."); - return ta->id; -} - - - extern void actor_wait(struct Thing * t) { if (t == get_player())