diff options
Diffstat (limited to 'src/map/magic-expr-eval.hpp')
-rw-r--r-- | src/map/magic-expr-eval.hpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp index a08b964..d6decd9 100644 --- a/src/map/magic-expr-eval.hpp +++ b/src/map/magic-expr-eval.hpp @@ -1,20 +1,20 @@ -#ifndef MAGIC_EXPR_EVAL -#define MAGIC_EXPR_EVAL +#ifndef MAGIC_EXPR_EVAL_HPP +#define MAGIC_EXPR_EVAL_HPP -/* Helper definitions for dealing with functions and operations */ +#include "../common/utils2.hpp" + +#include "magic-interpreter.hpp" -static int heading_x[8] = { 0, -1, -1, -1, 0, 1, 1, 1 }; -static int heading_y[8] = { 1, 1, 0, -1, -1, -1, 0, 1 }; +/* Helper definitions for dealing with functions and operations */ -int magic_signature_check (const char *opname, const char *funname, const char *signature, - int args_nr, val_t * args, int line, int column); +int magic_signature_check(const char *opname, const char *funname, const char *signature, + int args_nr, val_t *args, int line, int column); -void -magic_area_rect (int *m, int *x, int *y, int *width, int *height, - area_t * area); +void magic_area_rect(int *m, int *x, int *y, int *width, int *height, + area_t *area); #define ARGINT(x) args[x].v.v_int -#define ARGDIR(x) args[x].v.v_int +#define ARGDIR(x) args[x].v.v_dir #define ARGSTR(x) args[x].v.v_string #define ARGENTITY(x) args[x].v.v_entity #define ARGLOCATION(x) args[x].v.v_location @@ -23,7 +23,7 @@ magic_area_rect (int *m, int *x, int *y, int *width, int *height, #define ARGINVOCATION(x) args[x].v.v_invocation #define RESULTINT result->v.v_int -#define RESULTDIR result->v.v_int +#define RESULTDIR result->v.v_dir #define RESULTSTR result->v.v_string #define RESULTENTITY result->v.v_entity #define RESULTLOCATION result->v.v_location @@ -31,13 +31,13 @@ magic_area_rect (int *m, int *x, int *y, int *width, int *height, #define RESULTSPELL result->v.v_spell #define RESULTINVOCATION result->v.v_invocation -#define TY(x) args[x].ty -#define ETY(x) ARGENTITY(x)->type +#define ARG_TYPE(x) args[x].ty +#define ENTITY_TYPE(x) ARGENTITY(x)->type #define ARGPC(x) ((struct map_session_data *)ARGENTITY(x)) #define ARGNPC(x) ((struct map_session_data *)ARGENTITY(x)) #define ARGMOB(x) ((struct map_session_data *)ARGENTITY(x)) -#define ARG_MAY_BE_AREA(x) (TY(x) == TY_AREA || TY(x) == TY_LOCATION) +#define ARG_MAY_BE_AREA(x) (ARG_TYPE(x) == TYPE::AREA || ARG_TYPE(x) == TYPE::LOCATION) -#endif /* !defined(MAGIC_EXPR_EVAL) */ +#endif // MAGIC_EXPR_EVAL_HPP |