DoorKeeper/include/doorkeeper/components/tyler.hpp
King_DuckZ 701366bf86 Replace size_t with uint32_t for template parameter D
This fixes the build on 64-bit machines, where size_t and uint32_t from vector.hpp would mismatch.
2015-01-08 12:20:17 +01:00

45 lines
1.1 KiB
C++

#ifndef id6FB3FC97331449038D42AAAB4C01ABA1
#define id6FB3FC97331449038D42AAAB4C01ABA1
#include "doorkeeper/components/layer.hpp"
#include <vector>
#include <cassert>
#include <ciso646>
#include <memory>
#include <cstdint>
namespace dk {
template <typename T, uint32_t D>
class TileMapData;
template <uint32_t D>
class Tyler {
typedef std::unique_ptr<LayerBase<D>> LayerPtr;
typedef std::vector<LayerPtr> LayerList;
public:
typedef typename LayerBase<D>::coords coords;
Tyler ( void ) = delete;
Tyler ( const coords& parSize, const coords& parTileSize );
~Tyler ( void ) noexcept = default;
typename coords::value_type tiles_count ( void ) const;
const coords& map_size ( void ) const { return m_size; }
template <typename T>
Layer<T, D>& push_layer ( TileMapData<T, D>& parTilemap );
template <typename T>
Layer<T, D>& push_layer ( TileMapData<T, D>& parTilemap, const coords& parSubdiv );
void preload ( const coords& parFrom, const coords& parTo );
private:
const coords m_size;
const coords m_tilesize;
LayerList m_layers;
};
} //namespace dk
#include "doorkeeper/implem/tyler.inl"
#endif