diff options
Diffstat (limited to 'src/map/magic-expr-eval.hpp')
-rw-r--r-- | src/map/magic-expr-eval.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp index f5ca6af..da9a0a4 100644 --- a/src/map/magic-expr-eval.hpp +++ b/src/map/magic-expr-eval.hpp @@ -4,9 +4,11 @@ /* Helper definitions for dealing with functions and operations */ static -int heading_x[8] = { 0, -1, -1, -1, 0, 1, 1, 1 }; +earray<int, DIR, DIR::COUNT> heading_x = +{ 0, -1, -1, -1, 0, 1, 1, 1 }; static -int heading_y[8] = { 1, 1, 0, -1, -1, -1, 0, 1 }; +earray<int, DIR, DIR::COUNT> heading_y = +{ 1, 1, 0, -1, -1, -1, 0, 1 }; int magic_signature_check(const char *opname, const char *funname, const char *signature, int args_nr, val_t *args, int line, int column); @@ -15,7 +17,7 @@ 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 @@ -24,7 +26,7 @@ void 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 |