diff options
Diffstat (limited to 'src/map/magic-expr.hpp')
-rw-r--r-- | src/map/magic-expr.hpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp index 007491c..7276fd2 100644 --- a/src/map/magic-expr.hpp +++ b/src/map/magic-expr.hpp @@ -22,8 +22,6 @@ # include "fwd.hpp" -# include "magic-interpreter.hpp" - # include "../mmo/dumb_ptr.hpp" # include "../range/fwd.hpp" @@ -31,6 +29,8 @@ # include "../strings/zstring.hpp" # include "../strings/literal.hpp" +# include "magic-interpreter.t.hpp" + /* * Argument types: * i : int @@ -52,13 +52,6 @@ struct fun_t int (*fun)(dumb_ptr<env_t> env, val_t *result, Slice<val_t> arga); }; -struct op_t -{ - ZString name; - ZString signature; - int (*op)(dumb_ptr<env_t> env, Slice<val_t> arga); -}; - /** * Retrieves a function by name * @param name The name to look up @@ -67,13 +60,6 @@ struct op_t fun_t *magic_get_fun(ZString name); /** - * Retrieves an operation by name - * @param name The name to look up - * @return An operation of that name, or NULL, and a function index - */ -op_t *magic_get_op(ZString name); - -/** * Evaluates an expression and stores the result in `dest' */ void magic_eval(dumb_ptr<env_t> env, val_t *dest, dumb_ptr<expr_t> expr); @@ -109,4 +95,12 @@ int magic_find_item(Slice<val_t> args, int index, struct item *item, int *stacka int magic_location_in_area(map_local *m, int x, int y, dumb_ptr<area_t> area); +/* Helper definitions for dealing with functions and operations */ + +int magic_signature_check(ZString opname, ZString funname, ZString signature, + Slice<val_t> args, int line, int column); + +void magic_area_rect(map_local **m, int *x, int *y, int *width, int *height, + area_t& area); + #endif // TMWA_MAP_MAGIC_EXPR_HPP |