diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-23 14:23:32 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-24 10:52:13 -0800 |
commit | a1a02150d710df2838060445b9ad447689538985 (patch) | |
tree | 8ae2d08ebbd04df92a2e07f738a614d4f22157f1 /src/map/magic-expr-eval.hpp | |
parent | 7afacd63fe36eb56b52490ecf22daeaa95657942 (diff) | |
download | tmwa-a1a02150d710df2838060445b9ad447689538985.tar.gz tmwa-a1a02150d710df2838060445b9ad447689538985.tar.bz2 tmwa-a1a02150d710df2838060445b9ad447689538985.tar.xz tmwa-a1a02150d710df2838060445b9ad447689538985.zip |
Enumify some more things ... maybe even everything
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 |