summaryrefslogtreecommitdiff
path: root/src/map/magic-expr.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-24 22:09:54 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-24 22:31:00 -0700
commitdc0762c547cab250d4fe081706930582a27c0b46 (patch)
tree82b00bc460af9543769e4769521b2fc73fdb2437 /src/map/magic-expr.cpp
parentc093f4cce643e245ab2048e0782237744208eb9f (diff)
downloadtmwa-dc0762c547cab250d4fe081706930582a27c0b46.tar.gz
tmwa-dc0762c547cab250d4fe081706930582a27c0b46.tar.bz2
tmwa-dc0762c547cab250d4fe081706930582a27c0b46.tar.xz
tmwa-dc0762c547cab250d4fe081706930582a27c0b46.zip
Conform magic headers to the decl/def rule
Diffstat (limited to 'src/map/magic-expr.cpp')
-rw-r--r--src/map/magic-expr.cpp19
1 files changed, 12 insertions, 7 deletions
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<class T>
+bool CHECK_TYPE(T *v, TYPE t)
+{
+ return v->ty == t;
+}
+
static
void free_area(dumb_ptr<area_t> area)
{
@@ -791,8 +796,8 @@ int fun_hash_entity(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
return 0;
}
-int // ret -1: not a string, ret 1: no such item, ret 0: OK
-magic_find_item(Slice<val_t> 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<val_t> args, int index, struct item *item_, int *stackable)
{
struct item_data *item_data;
int must_add_sequentially;