From dc0762c547cab250d4fe081706930582a27c0b46 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 24 Apr 2014 22:09:54 -0700 Subject: Conform magic headers to the decl/def rule --- src/map/magic-expr.hpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'src/map/magic-expr.hpp') 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, val_t *result, Slice arga); }; -struct op_t -{ - ZString name; - ZString signature; - int (*op)(dumb_ptr env, Slice arga); -}; - /** * Retrieves a function by name * @param name The name to look up @@ -66,13 +59,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' */ @@ -109,4 +95,12 @@ int magic_find_item(Slice args, int index, struct item *item, int *stacka int magic_location_in_area(map_local *m, int x, int y, dumb_ptr area); +/* Helper definitions for dealing with functions and operations */ + +int magic_signature_check(ZString opname, ZString funname, ZString signature, + Slice 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 -- cgit v1.2.3-70-g09d2