summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2019-09-08 02:53:24 +0200
committerHaru <haru@dotalux.com>2020-03-08 20:56:27 +0100
commitd13b24a62ac933364839c7ece1f70eba001e7c2d (patch)
treec10d9f953cf017579a22c9d58b9fc74fefc2956e /src/map/npc.c
parentfeb1f9d96a9cfc12602c96235106397b67f2aeb4 (diff)
downloadhercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.tar.gz
hercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.tar.bz2
hercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.tar.xz
hercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.zip
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.
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c2
1 files changed, 1 insertions, 1 deletions
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;