summaryrefslogtreecommitdiff
path: root/src/map/magic-interpreter-aux.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/magic-interpreter-aux.hpp')
-rw-r--r--src/map/magic-interpreter-aux.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/magic-interpreter-aux.hpp b/src/map/magic-interpreter-aux.hpp
new file mode 100644
index 0000000..ea05b88
--- /dev/null
+++ b/src/map/magic-interpreter-aux.hpp
@@ -0,0 +1,8 @@
+#ifndef MAGIC_INTERPRETER_AUX_HPP
+#define MAGIC_INTERPRETER_AUX_HPP
+
+#define CHECK_TYPE(v, t) ((v)->ty == t)
+
+#define VAR(i) ((!env->vars || env->vars[i].ty == TY_UNDEF)? env->base_env->vars[i] : env->vars[i])
+
+#endif /* !defined(MAGIC_INTERPRETER_AUX_H_) */