From d13b24a62ac933364839c7ece1f70eba001e7c2d Mon Sep 17 00:00:00 2001 From: skyleo Date: Sun, 8 Sep 2019 02:53:24 +0200 Subject: Refactor code using directions to use enum unit_dir This removes a lot of duplicated code, especially related to people not using the arrays dirx and diry. Assertions for whenever these arrays are used have been added as well, to ensure valid index range. Some trailing white space has been removed as well. --- src/map/npc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index e66888a74..2ac99948b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3391,7 +3391,7 @@ static bool npc_viewisid(const char *viewid) * @param class_ The NPC view class. * @return A pointer to the created NPC data (ownership passed to the caller). */ -static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) +static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_) { struct npc_data *nd; -- cgit v1.2.3-60-g2f50