summaryrefslogtreecommitdiff
path: root/src/map/magic-interpreter.t.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/magic-interpreter.t.hpp')
-rw-r--r--src/map/magic-interpreter.t.hpp45
1 files changed, 7 insertions, 38 deletions
diff --git a/src/map/magic-interpreter.t.hpp b/src/map/magic-interpreter.t.hpp
index 9310a7b..6c7ff81 100644
--- a/src/map/magic-interpreter.t.hpp
+++ b/src/map/magic-interpreter.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_INTERPRETER_T_HPP
-#define TMWA_MAP_MAGIC_INTERPRETER_T_HPP
+#pragma once
// magic-interpreter.t.hpp - Old magic.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,10 +19,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "../sanity.hpp"
+#include "fwd.hpp"
-# include "../generic/enum.hpp"
+#include "../generic/enum.hpp"
+
+namespace tmwa
+{
enum class SPELLARG : uint8_t
{
NONE,
@@ -47,38 +49,6 @@ enum class TYPE : uint8_t
NEGATIVE_1 = 255,
};
-// Note: there is also a typedef by this name in <dirent.h>
-// but we should be fine since we never include it.
-// (in the long term we should still rename this though)
-enum class DIR : uint8_t
-{
- S = 0,
- SW = 1,
- W = 2,
- NW = 3,
- N = 4,
- NE = 5,
- E = 6,
- SE = 7,
-
- COUNT,
-};
-
-constexpr
-earray<int, DIR, DIR::COUNT> dirx //=
-{{
- 0, -1, -1, -1, 0, 1, 1, 1,
-}}, diry //=
-{{
- 1, 1, 0, -1, -1, -1, 0, 1,
-}};
-
-constexpr
-bool dir_is_diagonal(DIR d)
-{
- return static_cast<uint8_t>(d) & 1;
-}
-
enum class AREA : uint8_t
{
LOCATION,
@@ -176,5 +146,4 @@ enum class INVOCATION_FLAG : uint8_t
ENUM_BITWISE_OPERATORS(INVOCATION_FLAG)
}
using e::INVOCATION_FLAG;
-
-#endif // TMWA_MAP_MAGIC_INTERPRETER_T_HPP
+} // namespace tmwa