summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-15 20:20:12 +0100
committerHaru <haru@dotalux.com>2015-12-15 20:21:28 +0100
commitb6efa351c0a55a2f45ef8724c066f26e1c67a90f (patch)
tree3f4a806852108fd9c94a47158a91d718c975e762 /src/map
parent83ec8701872e38ca2d801ab3812972cc19e8167e (diff)
downloadhercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.tar.gz
hercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.tar.bz2
hercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.tar.xz
hercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.zip
Added const qualifier to the w1~w4 arguments of npc_parse_unknown_object
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/npc.c19
-rw-r--r--src/map/npc.h2
2 files changed, 19 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 5a7c46f95..eb0d73ae2 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -4279,7 +4279,24 @@ const char *npc_parse_mapflag(const char *w1, const char *w2, const char *w3, co
return strchr(start,'\n');// continue
}
-const char* npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, const char* start, const char* buffer, const char* filepath, int *retval)
+/**
+ * Parses an unknown NPC object. This function may be used as override or hooking point by plugins.
+ *
+ * @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_unknown_object(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
{
ShowError("npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
start = strchr(start,'\n');// skip and continue
diff --git a/src/map/npc.h b/src/map/npc.h
index 829b915d7..96d00179e 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -236,7 +236,7 @@ struct npc_interface {
struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
const char *(*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);
const char *(*parse_shop) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
- const char* (*parse_unknown_object) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char *(*parse_unknown_object) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
void (*convertlabel_db) (struct npc_label_list *label_list, const char *filepath);
const char* (*skip_script) (const char *start, const char *buffer, const char *filepath, int *retval);
const char *(*parse_script) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval);