diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-05 21:32:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-06 01:35:11 +0100 |
commit | 0a6612286bfa8c2503c757da2b39da37aa05deaf (patch) | |
tree | 3606dbe2ee59026f0fcdba7377034dfcab13da0d /serialize | |
parent | 2679d49a53a3f9825ce855f6ed25b3b045ec5aa1 (diff) |
src/chunk: plug in lqt for collision detection
Diffstat (limited to 'serialize')
-rw-r--r-- | serialize/world-impl.hpp | 12 | ||||
-rw-r--r-- | serialize/world-reader.cpp | 4 | ||||
-rw-r--r-- | serialize/world-writer.cpp | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/serialize/world-impl.hpp b/serialize/world-impl.hpp index 99db4cc0..e74ebda2 100644 --- a/serialize/world-impl.hpp +++ b/serialize/world-impl.hpp @@ -54,12 +54,12 @@ constexpr inline atlasid scenery_id_max = int_max<atlasid> & ~scenery_id_flag_ma } // namespace enum : tilemeta { - meta_ground = 1 << (pass_bits + 0), - meta_wall_n = 1 << (pass_bits + 1), - meta_wall_w = 1 << (pass_bits + 2), - meta_short_atlasid = 1 << (pass_bits + 3), - meta_short_variant_ = 1 << (pass_bits + 4), - meta_scenery = 1 << (pass_bits + 5), + meta_ground = 1 << 2, + meta_wall_n = 1 << 3, + meta_wall_w = 1 << 4, + meta_short_atlasid = 1 << 5, + meta_short_variant_ = 1 << 6, + meta_scenery = 1 << 7, }; } // namespace floormat::Serialize diff --git a/serialize/world-reader.cpp b/serialize/world-reader.cpp index 98704599..f5459203 100644 --- a/serialize/world-reader.cpp +++ b/serialize/world-reader.cpp @@ -149,7 +149,7 @@ void reader_state::read_chunks(reader_t& s) return { atlas, v }; }; - t.passability() = pass_mode(flags & pass_mask); + //t.passability() = pass_mode(flags & pass_mask); if (flags & meta_ground) t.ground() = make_atlas(); if (flags & meta_wall_n) @@ -178,6 +178,7 @@ void reader_state::read_chunks(reader_t& s) t.scenery() = sc; } +#if 0 switch (auto x = pass_mode(flags & pass_mask)) { case pass_mode::shoot_through: @@ -188,6 +189,7 @@ void reader_state::read_chunks(reader_t& s) default: [[unlikely]] fm_throw("bad pass mode '{}' for tile {}"_cf, i, pass_mode_(x)); } +#endif } } } diff --git a/serialize/world-writer.cpp b/serialize/world-writer.cpp index 0ca84e7b..21fba2b3 100644 --- a/serialize/world-writer.cpp +++ b/serialize/world-writer.cpp @@ -319,8 +319,8 @@ void writer_state::serialize_chunk(const chunk& c, chunk_coords coord) if (flags != 0 && ashortp(img_g) && ashortp(img_n) && ashortp(img_w)) flags |= meta_short_atlasid; - fm_debug_assert((pass_mode_(x.passability) & pass_mask) == pass_mode_(x.passability)); - flags |= pass_mode_(x.passability); + //fm_debug_assert((pass_mode_(x.passability) & pass_mask) == pass_mode_(x.passability)); + //flags |= pass_mode_(x.passability); s << flags; |