summaryrefslogtreecommitdiff
path: root/src/map/magic-expr.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-02-07 19:38:32 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-02-07 22:41:23 -0800
commit83b2e0b3ceda907b7186acfcc56c214fc04d9c13 (patch)
treef4dcc8d8b59fd9a633bc2604cc92f0523cc76ee4 /src/map/magic-expr.hpp
parentc67c2b7435a13d7ce17b2075e22dc5c6036f702a (diff)
downloadtmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.gz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.bz2
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.xz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.zip
Remove some macros
Diffstat (limited to 'src/map/magic-expr.hpp')
-rw-r--r--src/map/magic-expr.hpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp
index 4d2ea3c..e7f27dc 100644
--- a/src/map/magic-expr.hpp
+++ b/src/map/magic-expr.hpp
@@ -60,7 +60,7 @@ int magic_eval_int(env_t *env, expr_t *expr);
*/
char *magic_eval_str(env_t *env, expr_t *expr);
-int map_is_solid(int m, int x, int y);
+bool map_is_solid(int m, int x, int y);
expr_t *magic_new_expr(EXPR ty);
@@ -70,14 +70,16 @@ void magic_copy_var(val_t *dest, val_t *src);
void magic_random_location(location_t *dest, area_t *area);
-int // ret -1: not a string, ret 1: no such item, ret 0: OK
+// ret -1: not a string, ret 1: no such item, ret 0: OK
+int magic_find_item(val_t *args, int index, struct item *item, int *stackable);
-
-
-
- magic_find_item(val_t *args, int index, struct item *item, int *stackable);
-
-#define GET_ARG_ITEM(index, dest, stackable) switch (magic_find_item(args, index, &dest, &stackable)) { case -1 : return 1; case 1 : return 0; }
+#define GET_ARG_ITEM(index, dest, stackable) \
+ switch (magic_find_item(args, index, &dest, &stackable)) \
+ { \
+ case -1: return 1; \
+ case 1: return 0; \
+ default: break; \
+ }
int magic_location_in_area(int m, int x, int y, area_t *area);