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.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/map/magic-expr.cpp') diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp index 9f3f63e..ee422c1 100644 --- a/src/map/magic-expr.cpp +++ b/src/map/magic-expr.cpp @@ -1,6 +1,4 @@ -#include "magic-expr-eval.hpp" #include "magic-expr.hpp" -#include "magic-interpreter-aux.hpp" // magic-expr.cpp - Pure functions for the old magic backend. // // Copyright © 2004-2011 The Mana World Development Team @@ -38,14 +36,21 @@ #include "../mmo/dumb_ptr.hpp" #include "battle.hpp" -#include "npc.hpp" -#include "pc.hpp" #include "itemdb.hpp" - +#include "magic-expr-eval.hpp" #include "magic-interpreter.hpp" +#include "magic-interpreter-base.hpp" +#include "npc.hpp" +#include "pc.hpp" #include "../poison.hpp" +template +bool CHECK_TYPE(T *v, TYPE t) +{ + return v->ty == t; +} + static void free_area(dumb_ptr area) { @@ -791,8 +796,8 @@ int fun_hash_entity(dumb_ptr, val_t *result, Slice args) return 0; } -int // ret -1: not a string, ret 1: no such item, ret 0: OK -magic_find_item(Slice args, int index, struct item *item_, int *stackable) +// ret -1: not a string, ret 1: no such item, ret 0: OK +int magic_find_item(Slice args, int index, struct item *item_, int *stackable) { struct item_data *item_data; int must_add_sequentially; -- cgit v1.2.3-60-g2f50