diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-05-25 13:49:50 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-05-25 13:49:50 -0700 |
commit | 1d0e18a186f67844ccd873eabb56ebdaa3f47f11 (patch) | |
tree | 94199c6dbcb6b4a86584c303f6e1e72073873f01 /src/map/magic-expr-eval.hpp | |
parent | 87218e07b2bc89593eae1cb4abe859cd1a7eaa0f (diff) | |
download | tmwa-1d0e18a186f67844ccd873eabb56ebdaa3f47f11.tar.gz tmwa-1d0e18a186f67844ccd873eabb56ebdaa3f47f11.tar.bz2 tmwa-1d0e18a186f67844ccd873eabb56ebdaa3f47f11.tar.xz tmwa-1d0e18a186f67844ccd873eabb56ebdaa3f47f11.zip |
Switch block_list and subclasses to dumb_ptr
Now we're well-defined, since we're actually calling ctors and dtors.
Most of this code will not survive long ...
Diffstat (limited to 'src/map/magic-expr-eval.hpp')
-rw-r--r-- | src/map/magic-expr-eval.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp index d61d397..bc5ce6e 100644 --- a/src/map/magic-expr-eval.hpp +++ b/src/map/magic-expr-eval.hpp @@ -16,7 +16,7 @@ void magic_area_rect(int *m, int *x, int *y, int *width, int *height, #define ARGINT(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 ARGENTITY(x) dumb_ptr<block_list>(args[x].v.v_entity) #define ARGLOCATION(x) args[x].v.v_location #define ARGAREA(x) args[x].v.v_area #define ARGSPELL(x) args[x].v.v_spell @@ -34,9 +34,9 @@ void magic_area_rect(int *m, int *x, int *y, int *width, int *height, #define ARG_TYPE(x) args[x].ty #define ENTITY_TYPE(x) ARGENTITY(x)->bl_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 ARGPC(x) (ARGENTITY(x)->as_player()) +#define ARGNPC(x) (ARGENTITY(x)->as_npc()) +#define ARGMOB(x) (ARGENTITY(x)->as_mob()) #define ARG_MAY_BE_AREA(x) (ARG_TYPE(x) == TYPE::AREA || ARG_TYPE(x) == TYPE::LOCATION) |