diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-24 13:27:26 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-24 13:27:26 -0700 |
commit | b218ad7f381cb7e460bd7f464f4c8b6fab18a27e (patch) | |
tree | 8b69f77c7e983df0589739edc32a7fbea3ffe11c /src/map/magic-expr.c | |
parent | 0cf54b3627d8880bf9670b518740d96d8b80a8f4 (diff) | |
download | tmwa-b218ad7f381cb7e460bd7f464f4c8b6fab18a27e.tar.gz tmwa-b218ad7f381cb7e460bd7f464f4c8b6fab18a27e.tar.bz2 tmwa-b218ad7f381cb7e460bd7f464f4c8b6fab18a27e.tar.xz tmwa-b218ad7f381cb7e460bd7f464f4c8b6fab18a27e.zip |
Fixed looping over spells
Diffstat (limited to 'src/map/magic-expr.c')
-rw-r--r-- | src/map/magic-expr.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/map/magic-expr.c b/src/map/magic-expr.c index 0b030cb..0034441 100644 --- a/src/map/magic-expr.c +++ b/src/map/magic-expr.c @@ -497,13 +497,13 @@ magic_area_rect(int *m, int *x, int *y, int *width, int *height, area_t *area) } } -static int -location_in_area(int m, int x, int y, area_t *area) +int +magic_location_in_area(int m, int x, int y, area_t *area) { switch (area->ty) { case AREA_UNION: - return location_in_area(m, x, y, area->a.a_union[0]) - || location_in_area(m, x, y, area->a.a_union[1]); + return magic_location_in_area(m, x, y, area->a.a_union[0]) + || magic_location_in_area(m, x, y, area->a.a_union[1]); case AREA_LOCATION: case AREA_RECT: case AREA_BAR: { @@ -524,10 +524,10 @@ location_in_area(int m, int x, int y, area_t *area) static int fun_is_in(env_t *env, int args_nr, val_t *result, val_t *args) { - RESULTINT = location_in_area(ARGLOCATION(0).m, - ARGLOCATION(0).x, - ARGLOCATION(0).y, - ARGAREA(1)); + RESULTINT = magic_location_in_area(ARGLOCATION(0).m, + ARGLOCATION(0).x, + ARGLOCATION(0).y, + ARGAREA(1)); return 0; } @@ -656,7 +656,6 @@ magic_find_item(val_t *args, int index, struct item *item, int *stackable) || item_data->type == 7 || item_data->type == 8); /* Very elegant. */ - if (stackable) *stackable = !must_add_sequentially; |