diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-26 18:19:46 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-26 18:28:37 +0200 |
commit | 05dee8a02773141cbe6cbfb1c0557018210ced05 (patch) | |
tree | 25e1e9fd68a05912c146ccc45ceb07c3d6f99ae4 /src/chunk.hpp | |
parent | 50273c040e605b6dbee3389c0c2adce2b8d85701 (diff) |
a
Diffstat (limited to 'src/chunk.hpp')
-rw-r--r-- | src/chunk.hpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/chunk.hpp b/src/chunk.hpp index 2fecb6fe..c53bc3e8 100644 --- a/src/chunk.hpp +++ b/src/chunk.hpp @@ -1,19 +1,23 @@ #pragma once #include "object-id.hpp" +#include "tile-defs.hpp" #include "tile.hpp" -#include "tile-iterator.hpp" +#include "local-coords.hpp" #include "src/RTree.h" -#include <Corrade/Containers/Array.h> #include <type_traits> #include <array> #include <memory> #include <Magnum/GL/Mesh.h> +namespace Corrade::Containers { template<typename T, typename D> class Array; } + namespace floormat { struct anim_atlas; struct entity; struct entity_proto; +class tile_iterator; +class tile_const_iterator; enum class collision : unsigned char { view, shoot, move, @@ -78,12 +82,9 @@ struct chunk final const ArrayView<const uint16_t> ids; const size_t size; }; - struct draw_entity { entity* e; float ord; }; - struct scenery_mesh_tuple final { - GL::Mesh& mesh; - ArrayView<draw_entity> array; - size_t size; - }; + struct topo_sort_data; + struct draw_entity; + struct scenery_mesh_tuple; struct vertex { Vector3 position; @@ -138,6 +139,7 @@ private: _entities_sorted : 1 = true; void ensure_scenery_draw_array(Array<draw_entity>& array); + static topo_sort_data make_topo_sort_data(const entity& e); struct bbox final // NOLINT(cppcoreguidelines-pro-type-member-init) { |