diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2020-06-23 08:00:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 08:00:00 +0800 |
commit | 520863eaeda83da14b88d09f6378cd8abd5a5174 (patch) | |
tree | 2496ea36744dc2f51d264741a78699e719ceeb3b /src/map/script.h | |
parent | 0b7768837bed2aa521de5b9b76b2348943d7db20 (diff) | |
parent | 9b89425550094f51d633e5b5d6e86af65bffbf39 (diff) | |
download | hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.gz hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.bz2 hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.xz hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.zip |
Merge branch 'master' into jedzkie-pr03
Diffstat (limited to 'src/map/script.h')
-rw-r--r-- | src/map/script.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/map/script.h b/src/map/script.h index 511497a66..df5297ac0 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -584,6 +584,8 @@ enum itemskill_flag { struct Script_Config { bool warn_func_mismatch_argtypes; bool warn_func_mismatch_paramnum; + bool functions_private_by_default; + bool functions_as_events; int check_cmdcount; int check_gotocount; int input_min_value; @@ -725,8 +727,14 @@ struct str_data_struct { uint8 deprecated : 1; }; +/** a label within a script (does not use the label db) */ struct script_label_entry { - int key,pos; + /** label name (held within str_data) */ + int key; + /** position within the script */ + int pos; + /** optional flags for the label */ + enum script_label_flags flags; }; struct script_syntax_data { @@ -917,7 +925,7 @@ struct script_interface { void (*set_constant) (const char *name, int value, bool is_parameter, bool is_deprecated); void (*set_constant2) (const char *name, int value, bool is_parameter, bool is_deprecated); bool (*get_constant) (const char* name, int* value); - void (*label_add)(int key, int pos); + void (*label_add)(int key, int pos, enum script_label_flags flags); void (*run) (struct script_code *rootscript, int pos, int rid, int oid); void (*run_npc) (struct script_code *rootscript, int pos, int rid, int oid); void (*run_pet) (struct script_code *rootscript, int pos, int rid, int oid); @@ -948,10 +956,11 @@ struct script_interface { int (*queue_create) (void); bool (*queue_clear) (int idx); /* */ - const char * (*parse_curly_close) (const char *p); - const char * (*parse_syntax_close) (const char *p); - const char * (*parse_syntax_close_sub) (const char *p, int *flag); - const char * (*parse_syntax) (const char *p); + const char *(*parse_curly_close) (const char *p); + const char *(*parse_syntax_close) (const char *p); + const char *(*parse_syntax_close_sub) (const char *p, int *flag); + const char *(*parse_syntax) (const char *p); + const char *(*parse_syntax_function) (const char *p, bool is_public); c_op (*get_com) (const struct script_buf *scriptbuf, int *pos); int (*get_num) (const struct script_buf *scriptbuf, int *pos); const char* (*op2name) (int op); @@ -984,6 +993,7 @@ struct script_interface { void (*load_parameters) (void); const char* (*print_line) (StringBuf *buf, const char *p, const char *mark, int line); void (*errorwarning_sub) (StringBuf *buf, const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos); + bool (*is_permanent_variable) (const char *name); int (*set_reg) (struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref); void (*set_reg_ref_str) (struct script_state* st, struct reg_db *n, int64 num, const char* name, const char *str); void (*set_reg_pc_ref_str) (struct script_state* st, struct reg_db *n, int64 num, const char* name, const char *str); |