summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-15 19:48:04 +0100
committerHaru <haru@dotalux.com>2015-12-15 20:21:28 +0100
commit7881ebb6cb8f90a3f586c1f7af1543a2c3e1b661 (patch)
treefcabc68e419d8b99fd704a2430410408749c1a6e /src/map/npc.c
parent6d6ee8c436aa37aaf0afa9e5873e5778234cef37 (diff)
downloadhercules-7881ebb6cb8f90a3f586c1f7af1543a2c3e1b661.tar.gz
hercules-7881ebb6cb8f90a3f586c1f7af1543a2c3e1b661.tar.bz2
hercules-7881ebb6cb8f90a3f586c1f7af1543a2c3e1b661.tar.xz
hercules-7881ebb6cb8f90a3f586c1f7af1543a2c3e1b661.zip
Added const qualifier to the w1~w4 arguments of npc_parse_warp
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index be03d5ab5..a70d3798d 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2630,8 +2630,25 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short
return nd;
}
-/// Parses a warp npc.
-const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
+/**
+ * Parses a warp NPC.
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_warp(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
+{
int x, y, xs, ys, to_x, to_y, m;
unsigned short i;
char mapname[32], to_mapname[32];