diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-02-04 00:49:50 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-02-07 12:54:23 -0800 |
commit | c67c2b7435a13d7ce17b2075e22dc5c6036f702a (patch) | |
tree | b84b7b205a361b39d65944a9edb2a353356a9ac9 /src/map/magic-interpreter.t.hpp | |
parent | b3a0b3e7c94bce46bc0654528df0748cf0c2a6ac (diff) | |
download | tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.tar.gz tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.tar.bz2 tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.tar.xz tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.zip |
Remove some more Skill-related stuff
Diffstat (limited to 'src/map/magic-interpreter.t.hpp')
-rw-r--r-- | src/map/magic-interpreter.t.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/magic-interpreter.t.hpp b/src/map/magic-interpreter.t.hpp index 49fd3e1..26dc8d9 100644 --- a/src/map/magic-interpreter.t.hpp +++ b/src/map/magic-interpreter.t.hpp @@ -64,6 +64,21 @@ enum class DIR : uint8_t 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, |